|
1d9dcc24
|
2017-01-19T11:25:32
|
|
Make AST path always include the current node being traversed
AST traversers tend to sometimes call traverse() functions manually
during PreVisit. Change TIntermTraverser so that even if this happens,
all the nodes are automatically added to the traversal path, instead
of having to add them manually in each individual AST traverser.
This also makes calling getParentNode() return the correct node during
InVisit.
This does cause the same node being added to the traversal path twice
in some cases, where nodes are repeatedly traversed, like in
OutputHLSL, but this should not have adverse side effects. The more
common case is that the traverse() function is called on the children
of the node being currently traversed.
This fixes a bug in OVR_multiview validation, which did not previously
call incrementDepth and decrementDepth when it should have.
BUG=angleproject:1725
TEST=angle_unittests, angle_end2end_tests
Change-Id: I6ae762eef760509ebe853eefa37dac28c16e7a9b
Reviewed-on: https://chromium-review.googlesource.com/430732
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b123938d
|
2016-12-13T15:07:05
|
|
D3D11: Add support to compile and link compute shaders
This is a reland of 2cd9d7e032fb412b539a907c58342060340387a1.
BUG=angleproject:1442
TEST=angle_end2end_tests
Change-Id: I5be0032b97617c31cdd4c66a823e8eb3b518867a
Reviewed-on: https://chromium-review.googlesource.com/430199
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
16c745a3
|
2017-01-16T17:02:27
|
|
Split TIntermFunctionPrototype from TIntermAggregate
Function prototypes now have their own class TIntermFunctionPrototype.
It's only used for prototypes, not function parameter lists.
TIntermAggregate is still used for parameter lists and function calls.
BUGS=angleproject:1490
TEST=angle_unittests
Change-Id: I6e246ad00a29c2335bd2ab7f61cf73fe463b74bb
Reviewed-on: https://chromium-review.googlesource.com/427944
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
417df92f
|
2017-01-12T09:23:07
|
|
Revert "D3D11: Add support to compile and link compute shaders."
Fails https://build.chromium.org/p/chromium.gpu.fyi/builders/Linux%20Debug%20%28New%20Intel%29/builds/5769
BUG=angleproject:1442
This reverts commit 2cd9d7e032fb412b539a907c58342060340387a1.
Change-Id: Ic1610d20ba0449b423528fa9840aa951c012cf84
Reviewed-on: https://chromium-review.googlesource.com/427229
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
2cd9d7e0
|
2016-12-13T15:07:05
|
|
D3D11: Add support to compile and link compute shaders.
BUG=angleproject:1442
Change-Id: I13240e931e6f121d175d2cd6b41324d38bb39a5c
Reviewed-on: https://chromium-review.googlesource.com/405831
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d68924e5
|
2017-01-02T17:34:40
|
|
Use GetOperatorString when writing GLSL unary built-in calls
GetOperatorString is now used when writing GLSL for built-in calls
that fall under TIntermUnary. Component-wise not TOperator enum is
renamed for consistency.
This also cleans up some unnecessary creation of string objects when
writing built-in functions.
BUG=angleproject:1682
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
Change-Id: I89b2ef222bf5af479d4977417f320789b58ace85
Reviewed-on: https://chromium-review.googlesource.com/424552
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
bf4e1b73
|
2016-12-09T11:30:15
|
|
Split TIntermInvariantDeclaration from TIntermAggregate
This change is pure refactoring and doesn't fix bugs related to
invariant declarations. Invariant declarations are supposed to accept
a list of identifiers, but this refactoring keeps the current behavior
of only accepting a single identifier in an invariant declaration.
When the bug will be fixed, the new TIntermInvariantDeclaration class
that now has only a single child node can be changed so that it may
have multiple children.
TIntermAggregate is still used for function calls, function
prototypes and function parameter lists.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I3e22092c87e1c06445fd7e123d9922c2fcb59428
Reviewed-on: https://chromium-review.googlesource.com/419415
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d7b1ab58
|
2016-12-12T14:42:19
|
|
Fix up translator style.
Using git cl format.
BUG=angleproject:650
Change-Id: I7d3f98d2b0dcfb0a8de6c35327db74e55c28d761
Reviewed-on: https://chromium-review.googlesource.com/419059
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
56a2f95f
|
2016-12-08T12:16:27
|
|
Output infinity and NaN literals correctly in shaders
Previously infinity and NaN resulting from constant folding would be
clamped to finite 32-bit float range when they were written in shader
output. Now they are written as a bit pattern in case the shader
version allows it.
This does not guarantee that NaNs work, but this is fine, since ESSL
3.00.6 spec has very loose requirements when it comes to NaNs.
BUG=angleproject:1654
TEST=angle_end2end_tests
Change-Id: I9997000beeaa8ed22523c22d5cf6929cdfc93f60
Reviewed-on: https://chromium-review.googlesource.com/417301
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
13389b66
|
2016-10-16T11:48:18
|
|
Split TIntermDeclaration from TIntermAggregate
The new class TIntermDeclaration is now used for struct, interface
block and variable declarations. TIntermDeclaration nodes do not have
a type - rather the type is stored in each child node. The types may
differ in case the declaration is a series of array declarators with
mismatching sizes.
TIntermAggregate is still used for function calls, function
prototypes, function parameter lists and invariant declarations.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I0457188f354481470855f61ac1c878fc2579b1d1
Reviewed-on: https://chromium-review.googlesource.com/400023
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
336b1470
|
2016-10-05T16:37:55
|
|
Split TIntermFunctionDefinition from TIntermAggregate
This makes the code easier to understand. Function definition nodes
always have just two children, the parameters node and the function
body node, so there was no proper reason why they should be aggregate
nodes.
As a part of this change, intermediate output is modified to print
symbol table ids of functions so that debugging function id related
functionality will be easier in the future.
After this patch, TIntermAggregate is still used for function
prototypes, function parameter lists, function calls, variable and
invariant declarations and the comma (sequence) operator.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: Ib88b4ca5d21abd5f126836ca5900d0baecabd19e
Reviewed-on: https://chromium-review.googlesource.com/394707
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
6d40bbdd
|
2016-09-30T13:49:38
|
|
Split TIntermBlock from TIntermAggregate
The new TIntermBlock node class replaces TIntermAggregate nodes with
the EOpSequence op. It represents the root node of the tree which is
a list of declarations and function definitions, and any code blocks
that can be denoted by curly braces. These include function and loop
bodies, and if-else branches.
This change enables a bunch of more compile-time type checking, and
makes the AST code easier to understand and less error-prone.
The PostProcess step that used to be done to ensure that the root node
is TIntermAggregate is removed in favor of making sure that the root
node is a TIntermBlock in the glslang.y parsing code.
Intermediate output formatting is improved to print the EOpNull error
in a clearer way.
After this patch, TIntermAggregate is still used for function
definitions, function prototypes, function parameter lists, function
calls, variable and invariant declarations and the comma (sequence)
operator.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: I04044affff979a11577bc1fe75d747e538b799c8
Reviewed-on: https://chromium-review.googlesource.com/393726
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
b6fa043d
|
2016-09-28T16:28:05
|
|
Split vector swizzle AST nodes into a different node class
This avoids creating a weird aggregate node with a sequence of
constant union nodes to store the offsets. They're stored neatly
inside a vector instead. This makes code that needs to iterate
over the swizzle offsets much simpler.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I156b95723529ee05a94d30295ffb6d0952a98564
Reviewed-on: https://chromium-review.googlesource.com/390832
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
5796127e
|
2016-09-14T13:57:46
|
|
Rename TIntermSelection to TIntermIfElse
Now that ternary nodes are not represented by TIntermSelection any
more, TIntermIfElse is an easier name to understand for newcomers to
the code.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: Ia1e04e356ab93409400245092a84533d7dfd129d
Reviewed-on: https://chromium-review.googlesource.com/385416
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
7ebb97fc
|
2016-09-08T18:01:50
|
|
Use 64-bits compile options
BUG=chromium:645071
Change-Id: I31825123bf4cb45fb37a93f538e8936487beb5ff
Reviewed-on: https://chromium-review.googlesource.com/382712
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d0bad2c7
|
2016-09-09T18:01:16
|
|
Split ternary node class from TIntermSelection
Ternary operator nodes are typed parts of expressions, they always
have two children and the children are also guaranteed to be
TIntermTyped. "If" selection nodes can't be a part of an expression,
they can have either one or two children and the children are code
blocks. Due to all of these differences it makes sense to store these
using two different AST node classes.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I913ab1d806e3cdb5c21106f078cc9c0b6c72ac54
Reviewed-on: https://chromium-review.googlesource.com/384512
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
5858f7e3
|
2016-04-08T13:08:46
|
|
Re-land "Refactor texture function handling in OutputHLSL"
This change is pure refactoring, it does not introduce any functional
changes.
Separate texture function output into a helper class and further into
different helper functions to make the code more maintainable.
Some of the logic is simplified slightly by eliminating duplicate
cases and limiting the scope of variables where possible, but care
has been taken to preserve the exact same functionality as before.
Re-land with a fix to typo in include guard.
BUG=angleproject:1349
TEST=dEQP-GLES3.functional.shaders.texture_functions.* (no regression)
dEQP-GLES3.texture.* (no regression)
Change-Id: I57c1ec1950fa05bd16275ca578eb5ee99b34a5ae
Reviewed-on: https://chromium-review.googlesource.com/339180
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c2ed9380
|
2016-04-15T13:29:25
|
|
Revert "Refactor texture function handling in OutputHLSL"
It triggered an include guard warning on Windows Clang
This reverts commit 6f6c5580553d1f3c584df692823c2f5640e23d88.
Change-Id: Ibd4f2851f311a494f16376d8eed38f3119594761
Reviewed-on: https://chromium-review.googlesource.com/338933
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
6f6c5580
|
2016-04-08T13:08:46
|
|
Refactor texture function handling in OutputHLSL
This change is pure refactoring, it does not introduce any functional
changes.
Separate texture function output into a helper class and further into
different helper functions to make the code more maintainable.
Some of the logic is simplified slightly by eliminating duplicate
cases and limiting the scope of variables where possible, but care
has been taken to preserve the exact same functionality as before.
BUG=angleproject:1349
TEST=dEQP-GLES3.functional.shaders.texture_functions.* (no regression)
dEQP-GLES3.texture.* (no regression)
Change-Id: I5d81b842d693c0055890d5724eae6c105e454cd8
Reviewed-on: https://chromium-review.googlesource.com/337931
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
3d932d83
|
2016-04-12T11:10:30
|
|
Defer global initializers when necessary
Move global variable initializers that are not constant expressions to
a function that gets called at the start of main(). This is done
with an AST transformation. This needs to be done because global
variable initializers must be constant in native GL, but ANGLE is more
lenient with what can be put into ESSL 1.00 global initializers to
remain compatible with legacy WebGL content.
Non-constant global variable initializers also caused issues in HLSL
output, since in HLSL output some types of expressions get unfolded
into multiple statements. These include short-circuiting operators and
array initialization. To make sure that these cases are covered, any
initializers that can't be constant folded are deferred, even if they
have the const qualifier.
The old deferring mechanism in OutputHLSL is removed in favor of this
new AST transformation based approach.
BUG=angleproject:819
BUG=angleproject:1205
BUG=angleproject:1350
BUG=596616
TEST=WebGL conformance test
conformance/glsl/misc/global-variable-init.html
Change-Id: I039cc05d6b8c284baeefbdf7f10062cae4bc5716
Reviewed-on: https://chromium-review.googlesource.com/338291
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
9696316d
|
2016-03-21T11:54:33
|
|
Support ESSL structs containing samplers on D3D
Since HLSL can't natively handle samplers in structs, samplers need to
be extracted out of structs into separate variables in the translated
shader code. In HLSL 4.1, samplers that were in structs go into the
normal sampler arrays and are identified by index constants. In other
HLSL versions, samplers that were in structs are translated as uniform
variables.
These transformations are done inside the HLSL output classes, not as
tree transformations. This helps to keep the uniform API provided by
the shader translator intact.
Wherever a struct containing samplers is passed into a user-defined
function, the translated HLSL code passes the separate sampler
variables alongside a struct where the samplers have been removed.
The D3D backend in libANGLE queries the uniform registers of any
samplers that were in uniform structs, and adds them to the register
maps, so that correct sampler state gets assigned to them.
The extracted sampler variables are prefixed with "angle_" instead of
the usual "_" to prevent any name conflicts between them and regular
variables.
BUG=angleproject:504
TEST=angle_end2end_tests,
dEQP-GLES*.functional.shaders.struct.uniform.* (all pass),
dEQP-GLES*.functional.uniform_api.* (most now pass)
Change-Id: Ib79cba2fa0ff8257a973d70dfd917a64f0ca1efb
Reviewed-on: https://chromium-review.googlesource.com/333743
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
b076adde
|
2016-01-11T16:45:46
|
|
Implement gl_VertexID
BUG=angleproject:1217
Change-Id: Ibb9423d7de4966bce231734925a804b6340b5059
Reviewed-on: https://chromium-review.googlesource.com/321420
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
8c46ab11
|
2015-12-07T16:39:19
|
|
OutputHLSL: Avoid using info sink stack as much as possible.
Due to how the traversers work, it might not be trivial to avoid the
info sink stack entirely, but minimize its use to keep the code as
functional as possible.
BUG=angleproject:958
Change-Id: I354313f10f496feea7c6a6f167b0617aeadbe5b0
Reviewed-on: https://chromium-review.googlesource.com/316412
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
18b9deb4
|
2015-11-05T12:14:50
|
|
Support writing initializers using HLSL literal syntax
Instead of using constructor functions to initialize variables, it is
better to use literal initializer syntax provided by HLSL when it is
possible. This way shader complexity is reduced and constant array
initialization doesn't have to go through as many AST transformations.
Before this patch, vec4 initialization would result in the following
kind of HLSL:
float4 f = float4(1.0, 2.0, 3.0, 4.0);
After this patch, it will be:
float4 f = {1.0, 2.0, 3.0, 4.0};
Before this patch, vec2 array initialization would result in the
following kind of HLSL:
float2 f[2] = {0, 0, 0, 0};
angle_construct_into_2_float2(f, float2(1.0, 2.0), float2(3.0, 4.0));
After this patch, it will be:
float2 f[2] = {1.0, 2.0, 3.0, 4.0};
BUG=angleproject:1094
BUG=541551
TEST=WebGL conformance tests
Change-Id: I9816a8d95a2cba3964922f6b561862d478da6145
Reviewed-on: https://chromium-review.googlesource.com/311160
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
d81ed841
|
2015-05-12T12:46:35
|
|
Defer executing if statements in the global scope
Unfolding of short-circuiting operators (ternary and logical operators) may
create if statements in the global scope, which is not valid HLSL. Use existing
deferred global initialization function to defer execution of if statements in
the global scope.
TEST=WebGL conformance tests
BUG=angleproject:819
Change-Id: I2b0afcc6824dab6bb87eb6abed609e75b1384dab
Reviewed-on: https://chromium-review.googlesource.com/270461
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a6f22096
|
2015-05-08T18:31:10
|
|
Make UnfoldShortCircuit to change AST instead of writing output
This is needed to make way for further AST transformations to handle array
expressions that need to work correctly together with unfolding short-
circuiting operators. This also improves the maintainability of HLSL output
by isolating the unfolding into a separate compilation step.
The new version of UnfoldShortCircuit traverser will traverse the tree until
an expression that needs to be unfolded is encountered. It then unfolds it and
gets reset. The traverser will be run repeatedly until no more operations to
unfold are found. This helps with keeping the traverser's design relatively
simple.
All declarations are separated to single declarations before short-circuit
unfolding is run. Previously OutputHLSL already output every declaration
separately.
BUG=angleproject:960
TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests
Change-Id: Id769be396adbd4c0223e418980dc464dd855f019
Reviewed-on: https://chromium-review.googlesource.com/270460
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
6ba6eadc
|
2015-05-04T14:21:21
|
|
Rename ConstantUnion to TConstantUnion.
This clarified that we're using the Pool allocator/deallocator for
this type.
BUG=angleproject:993
Change-Id: If8c95f6054d07291e7014be0d4e35766ba2e943b
Reviewed-on: https://chromium-review.googlesource.com/269131
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
2e295e23
|
2015-04-29T10:41:33
|
|
hlsl: Fix struct specifiers in uniforms.
We would miss the definition for structs specfied in uniforms. Fix
this by always checking to add the constructor. Fixes the WebGL
test 'glsl/misc/struct-specifiers-in-uniforms'.
BUG=angleproject:818
BUG=433412
Change-Id: I411e4a4477f7ef34fceb9faa77489f77d8efdce8
Reviewed-on: https://chromium-review.googlesource.com/267797
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
1239ee94
|
2015-03-19T14:38:02
|
|
Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]
These attributes are now used exactly in the loops and ifs
that require them, limiting the number of failed compilations
due to excessive unrolling and flattening.
Also output Lod0 functions only when needed.
Adds unit tests for LOOP, FLATTEN and Lod0 generation.
The patch was tested against the WebGL CTS 1.0.4 for which all the
failures existed prior to this patch and seem to be unrelated to this
change. It also works correctly on the following sites that had trouble
with [[loop]] and [[unroll]]:
* dev.miaumiau.cat/rayTracer "Skull Demo"
* The turbulenz engine particle demo
* Lots of ShaderToy samples (including "Volcanic" and "Metropolis")
* Google Maps Earth mode
* Lots of Chrome Experiments
* Lagoa
* madebyevan.com/webgl-water
* SketchFab
* Unit Tests
BUG=angleproject:937
BUG=395048
Change-Id: I856de9025f10b79781929ec212dbffc2064a940e
Reviewed-on: https://chromium-review.googlesource.com/264791
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
938f0029
|
2015-04-08T19:35:40
|
|
Revert "Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]"
Caused linking failures on mac because the unit test asks for TranslatorHLSL which is not compiled.
This reverts commit 3342e01f2a29343ea95961f0194f9d4f422cb840.
Change-Id: I02b2f54ca5b90611f11b7a549e75bf2e8310639d
Reviewed-on: https://chromium-review.googlesource.com/264790
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
3342e01f
|
2015-03-19T14:38:02
|
|
Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]
These attributes are now used exactly in the loops and ifs
that require them, limiting the number of failed compilations
due to excessive unrolling and flattening.
Also output Lod0 functions only when needed.
Adds unit tests for LOOP, FLATTEN and Lod0 generation.
The patch was tested against the WebGL CTS 1.0.4 for which all the
failures existed prior to this patch and seem to be unrelated to this
change. It also works correctly on the following sites that had trouble
with [[loop]] and [[unroll]]:
* dev.miaumiau.cat/rayTracer "Skull Demo"
* The turbulenz engine particle demo
* Lots of ShaderToy samples (including "Volcanic" and "Metropolis")
* Google Maps Earth mode
* Lots of Chrome Experiments
* Lagoa
* madebyevan.com/webgl-water
* SketchFab
* Unit Tests
BUG=angleproject:937
BUG=395048
Change-Id: If7baddae1cdae0b3a414aa49e5a4c4babedbfe50
Reviewed-on: https://chromium-review.googlesource.com/261263
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
f4eab3b9
|
2015-03-18T12:55:45
|
|
Implement gradient operation AST analysis
This will allow narrowing down which usages of
[[flatten]] and [[unroll]] are actually useful.
BUG=angleproject:937
BUG=395048
Change-Id: Ib8d7b98431b8cd3563e1eff8ecc9ed5df1a9b7d6
Reviewed-on: https://chromium-review.googlesource.com/263775
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
9638c352
|
2015-04-01T14:34:52
|
|
Support assigning array constructors in HLSL output
This adds support to the following type of shader code, where an array
constructor is used as a source of assignment:
float a[3];
a = float[3](0.0, 1.0, 2.0);
The assignment gets replaced in the HLSL code by a function call where
the array is an out parameter and the constructor parameters are regular
parameters.
Constructors cannot yet be used in initializers.
With this change in place, some of the relevant dEQP tests start passing.
TEST=dEQP-GLES3.functional.shaders.arrays.constructor.*
BUG=angleproject:941
Change-Id: I13ed603c02a30d9f9950a61c4d562ae9fac058ec
Reviewed-on: https://chromium-review.googlesource.com/263403
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
711d8663
|
2015-04-02T19:43:57
|
|
Revert "Implement gradient operation AST analysis"
This reverts commit 2fc57a2ace58b7ae3106344c56be94948f761b2a.
Change-Id: I619297090c8441c1b90099437f8764263cdd68cc
Reviewed-on: https://chromium-review.googlesource.com/263728
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
2fc57a2a
|
2015-03-18T12:55:45
|
|
Implement gradient operation AST analysis
This will allow narrowing down which usages of
[[flatten]] and [[unroll]] are actually useful.
BUG=angleproject:937
BUG=395048
Change-Id: Ic31e434c7b5bb6c32eff2336e5949391bfee25a5
Reviewed-on: https://chromium-review.googlesource.com/260930
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
1269076c
|
2015-03-31T12:55:28
|
|
Add basic support for assigning arrays in HLSL output
Implement support for assignments where the return value of the assignment
is not used in another part of the expression.
TEST=WebGL conformance tests
BUG=angleproject:960
Change-Id: Ibf9d71a75d27d139d2aabb5162ab04a0974321d3
Reviewed-on: https://chromium-review.googlesource.com/263222
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ae37a5c8
|
2015-03-20T16:50:15
|
|
Support equality between structs containing arrays in HLSL output
This requires sorting all equality functions together so that struct
equality functions can have dependencies on array equality functions, but
support for array equality functions that have dependencies on struct
equality functions is also maintained.
There's no automated test coverage for this specifically. The change was
tested by manually inspecting shader output and ensuring that there were
no test regressions in tests listed below.
TEST=dEQP-GLES3.functional.shaders.*
BUG=angleproject:954
Change-Id: If7199ab2446804afae50f103bb625101172882b9
Reviewed-on: https://chromium-review.googlesource.com/261550
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
7fb4955d
|
2015-03-18T17:27:44
|
|
Support array equality operator in HLSL output
This requires adding functions to the shader source that can do the
comparison for a specific array size.
There's no automated test coverage specifically for this functionality,
since all deqp tests that cover this also require array constructors to
be supported. The change has been tested by manually inspecting shader
output. No regressions were seen in automated tests listed below.
TEST=dEQP-GLES3.functional.shaders.*, angle_unittests
BUG=angleproject:941
Change-Id: Ie2ca7c016a3f0bcb3392a96d6d20d6f803d28bf0
Reviewed-on: https://chromium-review.googlesource.com/261530
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
44efa0b8
|
2015-03-04T17:11:05
|
|
Conditionally enable IEEE strictness for isnan()
ANGLE's ESSL3 built-in function isnan() implementation just uses HLSL
intrinsic function isnan(). For HLSL intrinsic function isnan() to work
properly, IEEE strictness needs to be enabled for D3D compiler.
This change detects use of isnan() in shaders and passes compiler flag
D3DCOMPILE_IEEE_STRICTNESS whenever isnan is used in shaders. This
change also moves existing workarounds in D3DWorkaroundType to
D3DCompilerWorkarounds.
BUG=angle:927
TEST= dEQP tests
dEQP-GLES3.functional.shaders.builtin_functions.common.isnan.*
Change-Id: I1ce5b1a7a825fdd720a37dc9aeb71320e55162d9
Reviewed-on: https://chromium-review.googlesource.com/255834
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
8efc5ad5
|
2015-03-03T17:21:10
|
|
Initialize BuiltInFunctionEmulator outside Compiler
This moves GLSL output specific code from the Compiler class to the
GLSL/ESSL translators.
BUG=angleproject:865
Change-Id: I2d552e9cdb41f7d8ddfee7b0249a99d629a6d7d7
Reviewed-on: https://chromium-review.googlesource.com/255471
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
3c1dfb5a
|
2015-02-20T11:34:03
|
|
Add stubs for switch and case output
BUG=angle:921
Change-Id: I58bd645a8d53ef5bad9b680e54c8948d50932fca
Reviewed-on: https://chromium-review.googlesource.com/251525
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
29190088
|
2015-02-20T16:42:54
|
|
Make Angle code 40 KB smaller by using string literals directly.
The implicit conversion of hundreds of string literals
to TString generated a lot of machine code. By keeping them
as string literals all the way the code will be smaller and faster.
This is the change with clang for x64 (note VisitUnary in particular):
Total change: -41392 bytes
==========================
2 added, totalling +469 bytes across 1 sources
2 removed, totalling -472 bytes across 1 sources
5 shrunk, for a net change of -41389 bytes (54126 bytes before, 12737 bytes after) across 1 sources
279692 unchanged, totalling 51433327 bytes
------------------------------------------------------------------------------------------------------------------------------------
-41392 - Source: /home/bratell/src/chromium/src/third_party/angle/src/compiler/translator/OutputHLSL.cpp - (gained 469, lost 41861)
------------------------------------------------------------------------------------------------------------------------------------
New symbols:
+328: sh::OutputHLSL::outputConstructor(Visit, TType const&, char const*, TVector<TIntermNode*> const*) type=t, size=328 bytes
+141: sh::OutputHLSL::outputTriplet(Visit, char const*, char const*, char const*) type=t, size=141 bytes
Removed symbols:
-133: sh::OutputHLSL::outputTriplet(Visit, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&) type=t, size=133 bytes
-339: sh::OutputHLSL::outputConstructor(Visit, TType const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, TVector<TIntermNode*> const*) type=t, size=339 bytes
Shrunk symbols:
-388: sh::OutputHLSL::writeEmulatedFunctionTriplet(Visit, char const*) type=t, (was 628 bytes, now 240 bytes)
-714: sh::OutputHLSL::visitBranch(Visit, TIntermBranch*) type=t, (was 1017 bytes, now 303 bytes)
-9738: sh::OutputHLSL::visitAggregate(Visit, TIntermAggregate*) type=t, (was 17609 bytes, now 7871 bytes)
-14132: sh::OutputHLSL::visitBinary(Visit, TIntermBinary*) type=t, (was 17627 bytes, now 3495 bytes)
-16417: sh::OutputHLSL::visitUnary(Visit, TIntermUnary*) type=t, (was 17245 bytes, now 828 bytes)
Change-Id: Id0f87d72f6d7f1ab7b543f0d28d5a8b7c7db9ec7
Reviewed-on: https://chromium-review.googlesource.com/251090
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: bratell at Opera <bratell@opera.com>
|
|
a3a5cc6a
|
2015-02-13T13:12:22
|
|
Expose the IntermNode tree generated in the compiler for testing
This refactoring makes it possible for tests to access the IntermNode
tree produced by compilation by calling compileTree(). Removing
ParseContext usage from OutputHLSL has the additional benefit of better
separation between parsing and output.
BUG=angle:916
Change-Id: Ib40954832316328772a5c1dcbbe6b46b238e4e65
Reviewed-on: https://chromium-review.googlesource.com/249723
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
55e79e09
|
2015-02-09T15:35:00
|
|
Implement equality ops for nested structs.
This fixes the WebGL test glsl_misc_struct_equals as well as
several dEQP tests in functional.shaders.struct.
BUG=391957
BUG=angle:910
Change-Id: I09f3cd3f51bbc3541b64dbcfddfe01884ddba6f5
Reviewed-on: https://chromium-review.googlesource.com/247083
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
b3dced29
|
2015-01-12T14:54:55
|
|
Implementing gl_InstanceID in the HLSL compiler.
Fixes:
dEQP-GLES3.functional.instanced.draw_arrays_instanced.instance_id
dEQP-GLES3.functional.instanced.draw_arrays_instanced.mixed
dEQP-GLES3.functional.instanced.draw_elements_instanced.instance_id
dEQP-GLES3.functional.instanced.draw_elements_instanced.mixed
BUG=angle:601
Change-Id: I6e120eebc90d00e025fc58f096064e6ed1da826b
Reviewed-on: https://chromium-review.googlesource.com/246911
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
37997145
|
2015-01-28T10:06:34
|
|
Defer dependent HLSL global var inits.
Some global initializers depend on other globals, for instance a
varying or attribute value. Since we use a static proxy variable for
these varyings, we need to initialize the global static after we
initialize the proxy in the shader preamble. This fixes a long-
standing compiler bug.
We should also add a WebGL test for this.
BUG=angle:878
Change-Id: I71db103a6b8c24fb862e0d8b32293da9bc2e8103
Reviewed-on: https://chromium-review.googlesource.com/243581
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
32aab01d
|
2015-01-27T14:12:26
|
|
Use a stack for OutputHLSL info log output.
Previously we would always reference mBody in several intermediate
output methods. This made using these traversals from within the
header, or for utility methods, very difficult. Instead, use a stack
where we write to the top InfoLog, and can push/pop from the stack.
This gives us more flexibility.
BUG=angle:878
Change-Id: I8a6c0382bad18b44d75158274c701db13d4d4e65
Reviewed-on: https://chromium-review.googlesource.com/243580
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
e17e3197
|
2015-01-02T12:47:59
|
|
Use BuiltInFunctionEmulatorHLSL for all emulated functions
Implementation of missing built-in functions is a separate concern from
outputting the intermediate tree itself as HLSL, so it makes sense to
have all of the built-in emulation in a class that is separate from
OutputHLSL. Being able to reuse the same logic for different emulated
functions also makes the code more compact.
Change-Id: Id503dc3a5c5e743ec65722add56d6ba216a03a7f
Reviewed-on: https://chromium-review.googlesource.com/239872
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
9e0478f6
|
2015-01-13T11:13:54
|
|
Move the block layout code to translator.
This code is easily accessible from the translator, with the proper
export calls. This facilitates adding a common static library, since
this code calls some methods in translator.
BUG=angle:773
Change-Id: I0c50098ec3f67c2df7749b3c2518be0a9fd939e2
Reviewed-on: https://chromium-review.googlesource.com/240093
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
5c9cd3d1
|
2014-12-18T13:04:25
|
|
Implement hyperbolic function support for ESSL 3.00
Emulating arc hyperbolic functions is required on HLSL, where they do
not exist natively. For this, BuiltInFunctionEmulator is split into GLSL
and HLSL subclasses. The GLSL subclass handles the pre-existing built-in
emulation implemented for working around OSX bugs, and the HLSL subclass
handles emulating asinh, acosh and atanh on HLSL.
BUG=angle:855
Change-Id: I0dfeffb862ac27ba7f9ecf5492ec31d9d952b273
Reviewed-on: https://chromium-review.googlesource.com/236861
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
0a73dd85
|
2014-11-19T16:18:08
|
|
Fix include guards.
BUG=angle:733
Change-Id: I08b2c11c4831f1161c178c1842b10e807185aced
Reviewed-on: https://chromium-review.googlesource.com/230831
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
80bacde5
|
2014-11-10T12:07:37
|
|
Use the [[flatten]] attribute only when a loop is present.
Flattening branch-heavy shaders that contained no loops caused regressions.
As a temporary workaround we only flatten ifs when there exists a loop.
BUG=395048
Change-Id: I95c40f0249643b98c62304a0f2a4563561d1fbbc
Reviewed-on: https://chromium-review.googlesource.com/228722
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
54ad4f81
|
2014-09-03T09:40:46
|
|
Use the CollectVariables path on the HLSL translator.
This approach consolidates our two methods, and lets us reuse the
same code for both methods of variable collection.
BUG=angle:466
Change-Id: Ie92f76ff0b6d0d0dbfd211a234d0ab86290fa798
Reviewed-on: https://chromium-review.googlesource.com/213504
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
b1a85f48
|
2014-08-19T15:23:24
|
|
Rename compiler intermediate source files.
This prevents confusion between "TIntermediate" and "TIntermNode".
BUG=angle:711
Change-Id: Ib7a086382a479db3f77bf2ab06ce321aa7b35d13
Reviewed-on: https://chromium-review.googlesource.com/212936
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
13cfd276
|
2014-07-17T14:16:28
|
|
Move shader variables header to include folder.
This allows the API to query for clear type introspection into the
parsed GL types from the translator. The returned types are not
expanded and have properly nested fields.
This patch uses the types from ShaderVars.h to return GL type
information. The app must include this header to get access to
the types structs.
BUG=angle:466
Change-Id: I28ad0d6f11a964804dd234ef0d00651f665d1ae3
Reviewed-on: https://chromium-review.googlesource.com/208751
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
9fe25e9e
|
2014-07-18T10:33:08
|
|
Add a uniform register query to the translator.
This returns the uniform index that we assigned for default uniforms.
All the dependent structure offsets can be determined from the base
register, so we won't have to store uniform information in the shader
variable.
BUG=angle:466
Change-Id: I0dd05251e8dba00c20d09fd865dfb150de56738e
Reviewed-on: https://chromium-review.googlesource.com/207254
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
4e1fd412
|
2014-07-10T17:50:10
|
|
Store a map of interface block registers.
The shader translator can return the assigned register for a
block via a new API. This will let us delete the member variable
in interface blocks for the register -- a nice thing for GLSL.
BUG=angle:466
Change-Id: I9bc38e0cd031e32f90787be42c2324fc7c79dbf9
Reviewed-on: https://chromium-review.googlesource.com/206828
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
4cfb1e89
|
2014-07-07T12:49:23
|
|
Add a new TIntermRaw node type to translator.
This raw node stores text strings that we directly copy to the
output. This allows for more tricky substitutions that don't fit
in to the HLSL/GLSL shared parsing model.
BUG=346463
BUG=391697
Change-Id: Ibbde6db4fc98ef6d892f219631ca1a258a902a86
Reviewed-on: https://chromium-review.googlesource.com/206823
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
f51639a4
|
2014-06-25T16:04:57
|
|
Use a common include for GL headers.
A common place to define required GL includes gives us a nice
point to centralize GL customizations. In the header currently
are the basic GLES headers with extensions, and a define
carried over from desktop GL.
BUG=angle:466
Change-Id: I6fc61947b4514654ec21355a786904eac04656c0
Reviewed-on: https://chromium-review.googlesource.com/204936
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
|
|
f2575989
|
2014-06-25T16:04:54
|
|
Use the sh namespace for shader variables.
Since these types originate from the translator, use an appropriate
namespace. Also rename some of the gl helper functions to be more
specific to their functionality.
BUG=angle:466
Change-Id: Idc29987b2053b3c40748dd46b581f3dbd8a6fd61
Reviewed-on: https://chromium-review.googlesource.com/204680
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
f91ce811
|
2014-06-13T10:04:34
|
|
Split OutputHLSL uniform code into new module.
Refactoring patch only, should have no externally visible changes.
BUG=angle:466
Change-Id: I01088a3b2979b96702d0a3c424d26928eb72b5b2
Reviewed-on: https://chromium-review.googlesource.com/203731
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
8daaba15
|
2014-06-13T10:04:33
|
|
Split OutputHLSL structure code into new module.
Refactoring patch only.
BUG=angle:466
Change-Id: I2c57096e1e24574e7de3d35d608645fde3b0c681
Reviewed-on: https://chromium-review.googlesource.com/203730
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
|
|
033dae67
|
2014-06-18T12:56:28
|
|
Move OutputHLSL utility methods to other files.
OutputHLSL was become a large, unweildy file. Some were also useful
to other classes, even on the GL back-end, but were inacessible.
Refactoring patch only.
BUG=angle:466
Change-Id: Id216147122ca105c6ccdf0ba0c5f6c5038726965
Reviewed-on: https://chromium-review.googlesource.com/203459
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
3891fd27
|
2014-06-13T10:04:30
|
|
Add a std140 padding helper class.
Using a helper class keeps our main parser stateless as we define
std140 structs which need padding. The only functional change
should be that we no longer use a global counter for struct padding
hidden variables, but a local padding per-struct.
BUG=angle:466
Change-Id: I8b92d65884b86571c8b2f052b0cba6150a4bbab0
Reviewed-on: https://chromium-review.googlesource.com/202911
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
|
|
1af18dc9
|
2014-06-11T11:07:32
|
|
Create constructors just once.
BUG=380353
Change-Id: I9828a3f193ccfdda2013fa3de0e41e6e28953ea2
Reviewed-on: https://chromium-review.googlesource.com/203451
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
80ebce59
|
2014-06-06T11:54:12
|
|
Store the std140 layout offsets in a pre-pass.
Instead of recording data and mutating a local table as we parse,
store all of the offsets for the std140 structs when we first
generate the struct. This should have no behavioural change, as
structs should always be defined first in any case.
BUG=angle:466
Change-Id: I1b732d67bd4f5b908211410e5e7796d72d836174
Reviewed-on: https://chromium-review.googlesource.com/202910
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
bfa91f47
|
2014-06-05T15:45:18
|
|
Redesign HLSL scoped structures to a unique ID.
A unique ID gives a more flexible renaming scheme than our
current method of using nested scope identifiers. The reduced
complexity allows for fewer points of breakage and fixes an
outstanding bug with scoped structures (with added test).
BUG=angle:618
Change-Id: I6551248bb9fa2d185ab67248721f898dd50151f0
Reviewed-on: https://chromium-review.googlesource.com/202183
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
d7e7d735
|
2014-05-27T16:10:46
|
|
Move the GL_APICALL and similar defines to the project level.
BUG=angle:658
Change-Id: Ib4fa10bb89a6658efbc20d5a763d8ec9c3a5506f
Reviewed-on: https://chromium-review.googlesource.com/201465
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
834e8b77
|
2014-04-11T13:33:58
|
|
Move ShaderVariables to common shared source.
Also move the block layout encoding utilities to the common folder.
The combined changes allow us to include the shader and block code
into both libGLESv2 and the translator separately. This in turn
fixes the Chromium component build, where we were calling internal
translator functions directly from libGLESv2.
BUG=angle:568
Change-Id: Ibcfa2c936a7c737ad515c10bd24061ff39ee5747
Reviewed-on: https://chromium-review.googlesource.com/192891
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
84cfa124
|
2014-04-14T13:48:45
|
|
Fix Lod0 texture functions that take a bias parameter.
Texture functions that are in a divergent path can still take a bias parameter.
Treat the bias parameter as an explicit lod. The logic behind this is that the
implicit lod is considerd to be 0 like with other Lod0 functions, and then the
bias is added to it.
BUG=angle:604
Change-Id: I2dbc309c497d37e960209f08849f9d2bc9e1fbcc
Reviewed-on: https://chromium-review.googlesource.com/194544
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
655fe36e
|
2014-04-11T13:12:34
|
|
Use shader optimization level 3 selectively.
Default to HLSL compiler optimization level 1 and work around a compiler bug with break in nested loops by using optimization level 3.
BUG=angle:603
Change-Id: I4f7985a5648f1b5f54d80554c21aced7fc1777c2
Reviewed-on: https://chromium-review.googlesource.com/194129
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
d11d549f
|
2014-02-19T17:06:10
|
|
Implement textureGrad.
BUG=angle:564
Change-Id: I95dcd95a274f6d560250c197be0d6e64a5b23516
Reviewed-on: https://chromium-review.googlesource.com/187081
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
fc01454b
|
2014-02-18T14:47:13
|
|
Implement texelFetch and texelFetchOffset.
BUG=angle:564
Change-Id: I7ad3484061f5d6912d7842bdadc6297de3e82ef8
Reviewed-on: https://chromium-review.googlesource.com/186990
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b1f45b70
|
2013-12-19T17:37:19
|
|
Create HLSL texture offset functions.
BUG=angle:541
Change-Id: I63dd47c40d693724aa6bed93e9967e3b1f8535bd
Reviewed-on: https://chromium-review.googlesource.com/181521
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
3c9eeb97
|
2013-11-04T11:09:26
|
|
Disable optimizations for shaders with conditional discard in D3D9, and
only use expanded short-circuiting conditionals for expressions with
potential side-effects.
Conservatively assume aggreate and selection operators have side effects for now.
BUG=
ANGLEBUG=486
R=geofflang@chromium.org, kbr@chromium.org, nicolas@transgaming.com, shannonwoods@chromium.org
Review URL: https://codereview.appspot.com/14441075
Conflicts:
src/common/version.h
src/compiler/translator.vcxproj
src/compiler/translator.vcxproj.filters
src/compiler/translator/OutputHLSL.cpp
src/libGLESv2/ProgramBinary.cpp
src/libGLESv2/Shader.cpp
src/libGLESv2/Shader.h
Change-Id: Iaf9f10b5de7b33c927ef032f3c4fe9d5095f64dd
|
|
6b9cb259
|
2013-10-17T10:45:47
|
|
Rename ParseHelper.cpp/h to ParseContext.cpp/h.
TRAC #24002
Signed-off-by: Shannon Woods
Signed-off-by: Geoff Lang
|
|
17732823
|
2013-08-29T13:46:49
|
|
Moved the compiler source files into directories based on their project and added a compiler.gypi to generate the compiler projects.
|