|
6c85047a
|
2014-12-02T16:23:17
|
|
Reject compound assignments of the type scalar op= vector/matrix
scalar op vector/matrix produces a vector/matrix, which can't be
assigned to a scalar. Handle this correctly for addition, subtraction and
division. Multiplication was already handled correctly as a special case.
BUG=angle:832
TEST=WebGL conformance tests
Change-Id: I318cae8bf353a5c58c588876ce3f29d18389263c
Reviewed-on: https://chromium-review.googlesource.com/232601
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
2c43325d
|
2014-12-03T12:36:54
|
|
Fix double delete with invariant varyings.
The compiler would leave some TString variables lying around
after the pool gets released, leading to a potential crash.
BUG=angle:846
Change-Id: I484ed9b14bba9bf653f6ed4001ae79f87791b0dd
Reviewed-on: https://chromium-review.googlesource.com/232780
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
2ec386bb
|
2014-12-03T14:44:38
|
|
Rename IsSampler to IsSamplerType.
BUG=angle:733
Change-Id: I62aece16c11aefdbf13c0b5faf83040fdb8555e6
Reviewed-on: https://chromium-review.googlesource.com/232960
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
352beffc
|
2014-11-19T13:45:55
|
|
Remove RemoveAllTreeNodes, since it was a no-op
IntermNode operator delete() or any of the IntermNode destructors don't
do anything, since all the AST memory is allocated on the PoolAllocator.
Because of this, RemoveAllTreeNodes was simply a no-op, and redundant
with the PoolAllocator deallocation procedure, and could confuse people
reading the code to think that IntermNodes should be deleted
individually, when in fact this is not the case.
BUG=angle:831
Change-Id: Ie1ccaa51986aabf267280d92a8e76ca9f97a19e5
Reviewed-on: https://chromium-review.googlesource.com/230730
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
ea7a2121
|
2014-11-17T16:15:57
|
|
Add GLSL/ESSL validator/translator support for GL_EXT_shader_framebuffer_fetch.
BUG=angle:834
Change-Id: I2d4e25909a8e1266b9bb7f1d4421324143157c8a
Reviewed-on: https://chromium-review.googlesource.com/231032
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Erik Dahlström <ed@opera.com>
|
|
60305f14
|
2014-11-18T13:25:26
|
|
Fix error in dumping direct struct indexes.
The parser would become confused over the purported array size
of struct indexes. In reality they were always a single direct
index into a struct, but it would take the object size of the
represented type (EG, a vec4 would have size 4) and deference
out-of-bounds memory.
BUG=434033
Change-Id: I92349aa04e6faadc766cb28c04e28d5f19c4e1ec
Reviewed-on: https://chromium-review.googlesource.com/230530
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
853dc1ab
|
2014-11-06T17:25:48
|
|
Add mediump and lowp precision emulation support for GLSL output
This implements the rounding as specified in WEBGL_debug_shader_precision
extension proposal for desktop GLSL and ESSL output. The bulk of the new
functionality is added in the form of a new EmulatePrecision AST
traverser, which inserts calls to the rounding routines angle_frm and
angle_frl in the appropriate places, and writes the rounding routines
themselves to the shader.
Compound assignments which are subject to emulation are transformed from
"x op= y" to "angle_compound_op_frm(x, y)", a call to a function which
does the appropriate rounding and places the result of the operation to
x.
The angle_ prefixed names should not clash with user-defined names if
name hashing is on. If name hashing is not on, the precision emulation
can only be used if the angle_ prefix is reserved for use by ANGLE.
To support the rounding routines in output, a new operator type is added
for internal helper function calls, which are not subject to name
hashing.
In ESSL output, all variables are forced to highp when precision
emulation is on to ensure consistency with how precision emulation
performs on desktop.
Comprehensive tests for the added code generation are included.
BUG=angle:787
Change-Id: I0d0ad9327888f803a32e79b64b08763c654c913b
Reviewed-on: https://chromium-review.googlesource.com/229631
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>
|
|
e371f1d7
|
2014-11-21T11:25:22
|
|
Update the DISALLOW_COPY_AND_ASSIGN macro to use c++ operator deletion.
Also remove the TSymbol copy constructor which is not used.
BUG=angle:836
Change-Id: I4f35f554c90d01dc2132d244a1974d9a8dc89bbd
Reviewed-on: https://chromium-review.googlesource.com/231231
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
21203702
|
2014-11-13T16:16:21
|
|
Fix precision tracking of constructor return values
Precision should be set for constructor return values if they are of a
built-in type. Structs should not be precision qualified.
BUG=angle:787
Change-Id: Ie5efd5be25a788ff6f01c5b989254572c00231eb
Reviewed-on: https://chromium-review.googlesource.com/229560
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
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>
|
|
76acee83
|
2014-11-04T13:44:03
|
|
Name mangle function prototypes and print them in interm output
This patch changes function prototype handling so that they get assigned
the same kind of a mangled name as function definitions and function
calls. This name is now also printed in interm output so that function
prototypes can be accurately identified in the interm output.
BUG=angle:821
TEST=compiler_tests
Change-Id: Ia150b8ac5b816b8096c964767cd8666bdee28539
Reviewed-on: https://chromium-review.googlesource.com/227390
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
4de44cb6
|
2014-10-29T18:03:46
|
|
Change ShaderLang APIs from c style to c++ style.
BUG=angle:816
TEST=gpu_unittests,angle_unittests,webgl_conformance
Change-Id: I0b46c11f6055a82511bb946a6dc491360835526e
Reviewed-on: https://chromium-review.googlesource.com/226410
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
|
|
db9b40b0
|
2014-10-29T15:00:04
|
|
Reject shaders of a version that the compiler doesn't support.
For example, WebGL 1.0 compiler should not compile WebGL 2.0 shaders.
BUG=angle:
TEST=815
Change-Id: Iaec66fa5127426778aff6e3891e2c214048d7457
Reviewed-on: https://chromium-review.googlesource.com/226380
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
409078f1
|
2014-10-28T13:23:18
|
|
Remove ShGetVariableInfo() and related code.
BUG=angle:775
TEST=chromium builds and runs fine
Change-Id: Ic62d3a3c9a8f034880b77a96f7f1c6be2691985e
Reviewed-on: https://chromium-review.googlesource.com/226004
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
2a517272
|
2014-10-27T16:09:57
|
|
Fix an issue with separate invariant statement.
Basically we end up with an extra "invariant xxx ;;" on GL backend.
This is not handled correctly by Mac drivers and also out shader translator.
BUG=angle:776
TEST=webgl conformance on mac/windows
Change-Id: If32867efba64ab0d3e6e690155790b90d736439f
Reviewed-on: https://chromium-review.googlesource.com/225780
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d2a67b96
|
2014-10-21T16:42:57
|
|
Fix precision tracking for built-in function return values
Previously, the type of the return value of all function calls was set to
the type of the return value in the function signature. This did not
carry precision information.
This patch changes this so that the return value precision is set
correctly for built-in functions. For single-argument math functions, it
mostly depends on that addUnaryMath sets the type of the return value to
be the same as the type of the operand. The type is replaced but the
precision information from the operand type is retained when needed. For
multi-argument math functions, precision is determined based on all the
nodes in the aggregate after the type has been set. For texture
functions, the precision is set according the sampler type as per ESSL
1.0 spec. For textureSize, the precision is always highp as per ESSL 3.0
spec.
BUG=angle:787
Change-Id: I48448e3ffe38656b91177dee9b60dd07a03cd095
Reviewed-on: https://chromium-review.googlesource.com/224951
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
b5e17750
|
2014-10-22T10:57:10
|
|
Get rid of use of "static const std::string".
BUG=angle:807
TEST=angle_unittests
Change-Id: Ifa4d713deeb25d52a7aafc362a7e4630024fd511
Reviewed-on: https://chromium-review.googlesource.com/225004
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
0783efd8
|
2014-10-21T15:51:59
|
|
Fix initialization sequence translation bug.
BUG=angle:805
TEST=https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/expression-list-in-declarator-initializer.html
Change-Id: I94fbdd0824dbe73034f8bf022aa53627582ad48b
Reviewed-on: https://chromium-review.googlesource.com/224813
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
|
|
70a0b2a1
|
2014-10-21T11:48:39
|
|
Fix varying interpolation parsing.
This was broken sometime in the CollectVariables refactor.
BUG=angle:803
Change-Id: Iaa09449f02290c4547f87c1560465dc8998d957c
Reviewed-on: https://chromium-review.googlesource.com/224104
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
f9004131
|
2014-10-20T18:26:48
|
|
Always include precision in interm output if it's available
This helps with debugging precision propagation issues.
BUG=angle:787
Change-Id: Ia969481c8d933455cdafef4ae25c6ab3946bc1c2
Reviewed-on: https://chromium-review.googlesource.com/224281
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
|
|
7c1cfd61
|
2014-10-15T14:59:57
|
|
Make ShBuiltInResources comparable with memcmp
Chromium builds a std::map with ShBuiltInResources as part of the key.
Comparator for == and < are needed for the map implementation.
Currently Chromium uses memcmp as the comparator. Padding
in ShBuiltInResources causes uninitialized reads.
Fix this by clearing the padding with memset during ShBuiltInResources
initialization.
Change-Id: I78aa3c59ce165503831aa2a67c96cf8af316c152
Reviewed-on: https://chromium-review.googlesource.com/223431
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
|
|
94ac7b78
|
2014-10-15T18:22:08
|
|
Invariant related processing.
* Fix a bug in PreProcessor for STDGL pragma.
* Record all invariant settings and set them in ShaderVariable.
* Write #pragma STDGL invariant(all) in GL
BUG=angle:776
TEST=https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shaders-with-invariance.html
Change-Id: Ie28b75480deed79f0c9f26e3b98f1778d1290182
Reviewed-on: https://chromium-review.googlesource.com/223610
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5e0c80ad
|
2014-10-10T10:11:54
|
|
Use attributes to avoid unrolling and flatten conditionals.
[loop] and [flatten] help avoid unrolling make more shaders compile
successfully. When unrolling has to happen, an error X3531 is generated
so we have to try compiling again without these attributes.
BUG=395048,395286
Change-Id: I91ea8ac3a822ab1f1ac24907d42326e3c6c9d9af
Reviewed-on: https://chromium-review.googlesource.com/222810
Tested-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
964df49d
|
2014-10-13T11:54:39
|
|
Fix a crash with the WebGL conformance test suite.
Undefined behavior caused by an overflowed enum was causing
the translator symbol table stack to not get popped correctly
when the compiler completed, causing dangling symbols who's storage
was reclaimed and reused when the allocation pool was popped.
The error occurred in the "shader-with-reserved-words" test, which
passes when the compiler fails due to the use of reserved words as
identifiers. As such, this test would pass even if the GPU process
crashes but further tests in the test suite would fail.
BUG=angle::785, 786
Change-Id: I365cb55f962f8dfe409f40532effeb10b8189432
Reviewed-on: https://chromium-review.googlesource.com/223093
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Gus Fernandez <gusfernandez@chromium.org>
|
|
de1e00e1
|
2014-10-09T16:55:32
|
|
Implement support of unary operator "+" in translator.
BUG=angle:779
TEST=conformance/glsl/misc/struct-unary-operators.html
Change-Id: Ia827e07dcfc8ad3bbbc078e54336815be9027945
Reviewed-on: https://chromium-review.googlesource.com/222720
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
|
|
fa41aa08
|
2014-10-06T17:40:13
|
|
Perform short-circuit unfolding on separate declarations.
BUG=415694
Change-Id: I812abb21d2ab4af0b63631a23026d5860df61672
Reviewed-on: https://chromium-review.googlesource.com/221945
Tested-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
d974db43
|
2014-10-07T10:50:19
|
|
Split combined declarations into separate statements.
BUG=415694
Change-Id: I7afb08a8a5ed10bbc6f7d23638daca6982f7c88b
Reviewed-on: https://chromium-review.googlesource.com/221455
Tested-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
ed13636a
|
2014-10-03T13:23:01
|
|
Add type comparison, type retrieval, original name retrieval to ShaderVariable.
This is needed to effectively use the new APIs to get shader variable info.
BUG=angle::770
TEST=ShaderVariableTest
Change-Id: Ia591eb567868ebe898f4a7449c64167ad212f59b
Reviewed-on: https://chromium-review.googlesource.com/221388
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
e61209af
|
2014-09-26T12:01:17
|
|
Add option to support EXT_draw_buffers with NV_draw_buffers
After this patch, it is possible to set a flag to change
EXT_draw_buffers extension directives to NV_draw_buffers in ESSL.
This enables users of ANGLE to emulate EXT_draw_buffers by using
NV_draw_buffers in combination with GLES3.0.
Change-Id: I5dacdbd6cd0d0362424ea3791557342c42efd4bd
Reviewed-on: https://chromium-review.googlesource.com/219941
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a2fbb840
|
2014-09-03T09:40:47
|
|
Move CollectVariables to sh namespace.
BUG=angle:466
Change-Id: I903ea840e333dfeb44f242a1759aed39974d0510
Reviewed-on: https://chromium-review.googlesource.com/213505
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Jamie Madill <jmadill@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>
|
|
a6f267f9
|
2014-08-27T11:44:15
|
|
Fix row-major layout tracking in interface blocks.
Some block field types, such as nested structs, were bugged. This
only affects our "CollectVariables" path, not our current HLSL
UBO path.
BUG=angle:466
Change-Id: I2b8daf58aa7ec1ad06a80d38f57e76087eacccdc
Reviewed-on: https://chromium-review.googlesource.com/213503
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
b547ddf5
|
2014-08-25T16:20:46
|
|
Fix interface block static use tracking.
The current code couldn't handle some uses of interface blocks,
such as blocks with instance names.
BUG=angle:466
Change-Id: I0a3746f277af0538cede30232532c6788412da1c
Reviewed-on: https://chromium-review.googlesource.com/213502
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
42bcf32e
|
2014-08-25T16:20:46
|
|
Refactor ShaderVariables to store fields in the base.
Instead of only storing structure information in Varyings, Uniforms
and Interface Block Fields, store it in the base class. Also only
store base variable information for struct fields, instead of fully
typed information. This works because stuff like interpolation type,
invariance, and other properties are for the entire variable, not
individual fields.
Also add new fields for interface block instance name, varying
invariance and structure name for all struct types.
BUG=angle:466
Change-Id: If03fc071e6becb7aad6dea5093989bba7daee69e
Reviewed-on: https://chromium-review.googlesource.com/213501
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
3b5c2dae
|
2014-08-19T15:23:32
|
|
Add a new invariant declaration operator.
BUG=angle:711
Change-Id: I54a48b636a68c317b8d44ee2d578847b80095289
Reviewed-on: https://chromium-review.googlesource.com/213500
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
33a74bde
|
2014-08-18T15:47:59
|
|
Fix std140 UBO layouts.
A call to "prePadding" instaed of "prePaddingString" was confusing
the HLSL output engine.
A separate bug was causing HLSL errors because HLSL puts all cbuffer
members in a flattened namespace, which caused our internal padding
variables to overlap.
BUG=angle:725
Change-Id: I69a01fefa430a83e433385c64a532a69e6851ae8
Reviewed-on: https://chromium-review.googlesource.com/212930
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
ffd7387a
|
2014-08-21T13:49:16
|
|
Prevent accessing more arguments than provided.
BUG=390111
Change-Id: Iecc2ac2354a82cca937a823e5c588c662264e36c
Reviewed-on: https://chromium-review.googlesource.com/213551
Tested-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5f438061
|
2014-08-20T16:38:34
|
|
Only set declaration operator if not already set.
This allows us to return different operators from single
declarations, which will be useful for treating invariant
declarations as different operators.
BUG=angle:711
Change-Id: Id278b91854bbefe8e635380d7b27198198236fef
Reviewed-on: https://chromium-review.googlesource.com/212939
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
47e3ec08
|
2014-08-20T16:38:33
|
|
Add a helper method to parse invariant declarations.
This pulls out more functionality from the grammar into simple
c++ source files.
BUG=angle:711
Change-Id: I19121d710dc1543585361cb53a0deb2ea0479db9
Reviewed-on: https://chromium-review.googlesource.com/212938
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
5c09702f
|
2014-08-20T16:38:32
|
|
Add a getNamedVariable helper method to TParseContext.
This method will be useful in more than one place, since we need
to get a TType from an indentifier when parsing invariant
declarations.
BUG=angle:711
Change-Id: I1c1befbdcc93ea626428fb4e313b8c6326c158f6
Reviewed-on: https://chromium-review.googlesource.com/212937
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
b9b5c105
|
2014-08-20T17:28:54
|
|
Rename intermediate.h to Intermediate.h.
This was breaking the Linux build.
Change-Id: I8f63527cfa37ee774ea5d1e6eb0043a4c7ccc734
Reviewed-on: https://chromium-review.googlesource.com/213300
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@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>
|
|
b8c0a832
|
2014-08-15T16:41:12
|
|
Amend comment about nameless structs & layout qualifiers
Change-Id: I1177c808bffd2beba7d52bd8f8869125a1624698
Reviewed-on: https://chromium-review.googlesource.com/212700
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
|
|
bc75f36b
|
2014-08-11T14:08:19
|
|
Fix nameless struct handling.
BUG=401296
The addition of layout qualifier handling in es3 development inadvertently
broke handling of nameless structs.
Change-Id: I805bab7a981d1f7f6227ae043720296fc3454662
Reviewed-on: https://chromium-review.googlesource.com/211860
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
|
|
daf56572
|
2014-08-06T16:18:30
|
|
For SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS, assign precision to temp variables.
Otherwise on Windows or other platforms with GLES backend, using this workaround
will trigger shader compile failure.
For the moment, to simplify the workaround, for any missing precisions in float,
we always assign the highest available precion to it.
BUG=angle:695
TEST=webgl conformance tests
Change-Id: I810579442bc7fc61d6a52b76aff31a779046fa22
Reviewed-on: https://chromium-review.googlesource.com/211253
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
e740addb
|
2014-07-18T17:01:01
|
|
Add compiler option SH_REGENERATE_STRUCT_NAMES.
BUG=angle:701
TEST=webgl conformance tests
Change-Id: I13b35900956e7d840d5891a5bab90a400347cd6f
Reviewed-on: https://chromium-review.googlesource.com/209229
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
a2ad4e8a
|
2014-07-17T14:16:32
|
|
Export shader variables from the translator DLL.
This will allow us to use these methods when compiling the translator
as a DLL.
BUG=angle:466,697
Change-Id: Ic9169fb7c69fe0bf5f98addfc128a30ee6b2159d
Reviewed-on: https://chromium-review.googlesource.com/208752
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
1c28e1f0
|
2014-08-04T11:37:54
|
|
Fix shaders with invariant keyword.
We would trigger assertion failures in Debug mode, and fail to
parse and translate correctly in Release.
BUG=angle:711
Change-Id: Ibb7f33b288376617598578f48c7bbdbdec044279
Reviewed-on: https://chromium-review.googlesource.com/210822
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
f4e39bfd
|
2014-08-01T17:22:17
|
|
Fix non-square matrix-to-matrix constructors.
This fixes some broken tests in dEQP:
functional.shaders.conversions.matrix_to_matrix
BUG=angle:712
Change-Id: I0538595f2913a2c1d4f0da901d65d608a6580d19
Reviewed-on: https://chromium-review.googlesource.com/210882
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
cf3af0bd
|
2014-08-01T17:22:16
|
|
Fix non-square scalar-to-matrix constructors.
This fixes some broken tests in dEQP:
functional.shaders.conversions.scalar_to_matrix
BUG=angle:712
Change-Id: Ia01d720307ea6ca70da266b2085a878eaaab2412
Reviewed-on: https://chromium-review.googlesource.com/210881
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
e294bb87
|
2014-07-17T14:16:26
|
|
Add new shader inspection APIs.
Each new entry point corresponds to one of the variable types:
varyings, attributes, uniforms, output variables, and interface
blocks. They return a pointer to the vector with all of the
parsed variables, which then the app can copy to its own memory.
Currently we do not support the staticUse field in the HLSL
translator.
BUG=angle:466
Change-Id: I7dc09e761ab070feef5360ad27740110c44853b3
Reviewed-on: https://chromium-review.googlesource.com/208750
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>
|
|
a3fe2b4e
|
2014-07-18T10:33:13
|
|
Update non-default constructors in shadervars.h.
Most of these constructors are unused. Remove the unused ones,
and change the usage of existing constructors to be consistent.
BUG=angle:466,697
Change-Id: I455dd314036e1dfcb8c4690bab577b81dd0e060c
Reviewed-on: https://chromium-review.googlesource.com/208355
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
4836d22a
|
2014-07-24T06:55:51
|
|
Fix ASSERT when rewriting else-if blocks with no else.
The code assumed an else-if would end in an else. We can also save a
few allocations in the cases where there is no else.
BUG=angle:699
Change-Id: I550857366775b4a34aea97e117ef732297d3f448
Reviewed-on: https://chromium-review.googlesource.com/208681
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
e04a5b7b
|
2014-07-18T10:33:12
|
|
Remove sh::InterfaceBlock member info.
We can compute the interface block member info entirely on the
API side. This will allow us to get rid of some un-necessary
code in the compiler.
BUG=angle:466
Change-Id: I664ffc82de5f2723156e51f4e9ffc07e4de162aa
Reviewed-on: https://chromium-review.googlesource.com/207781
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
28f70c3a
|
2014-07-18T10:33:10
|
|
Remove sh::Uniform::registerIndex and elementIndex.
With the previous cleanups, these fields aren't needed any longer.
We can also clean up some unused methods and simplify existing code.
BUG=angle:466
Change-Id: I96df8d152324bda5e6868b5eccdf52bdc09155e9
Reviewed-on: https://chromium-review.googlesource.com/207256
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@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>
|
|
e40d1e9c
|
2014-07-16T17:40:36
|
|
Fix style violations.
BUG=angle:650
TEST=no behavior change
Change-Id: I3096615a181b1ec2c18ce60566c3d6249975b84e
Reviewed-on: https://chromium-review.googlesource.com/208569
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
cd68fe79
|
2014-07-11T10:45:44
|
|
Add a compiler option to rewrite vec/mat constructors
If one of the parameters is a vec/mat, expand it into scalars.
This is to work around Linux NVIDIA/AMD and Mac NVIDIA driver bugs.
BUG=angle:695
TEST=webgl conformance test
Change-Id: I35e1e25167d99f873dcb03bfb57a30e84b1aeed5
Reviewed-on: https://chromium-review.googlesource.com/207479
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
|
|
fc43d273
|
2014-07-11T17:02:02
|
|
Remove the sh::InterfaceBlock::dataSize member.
We can replace this by doing the same calculation in the HLSL-side
code.
BUG=angle:466
Change-Id: Iecae4a92e9037e851419ce73e6267094ee8071a2
Reviewed-on: https://chromium-review.googlesource.com/207251
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
d4116ff3
|
2014-07-11T17:02:01
|
|
Remove sh::InterfaceBlock::registerIndex.
This value is HLSL-only and we can use the new query API to hide it
from GLSL programs.
BUG=angle:466
Change-Id: I75dc2fbbf1b29b1f6d561568174a15dea1f5b130
Reviewed-on: https://chromium-review.googlesource.com/207250
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@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>
|
|
d5512cd4
|
2014-07-10T17:50:08
|
|
Collect shader outputs and interface block information.
This paves the way for returning ES3-specific info from the shader
translator with the new query methods.
BUG=angle:466
Change-Id: Ib13cdb604854cdf11e9dc00dd94f18eadc946561
Reviewed-on: https://chromium-review.googlesource.com/206770
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
23a8a433
|
2014-07-09T13:27:42
|
|
Store compact and expanded shader variables.
The current shader API ShGetVariableInfo relies on an expanded
list of shader variables. That means that struct, or user-defined
variables, are expanded into separate entries for the app to
easily query struct members. The new API will preserve the struct
layout, so we can store both to support both the old and new
queries.
BUG=angle:466
Change-Id: Id30a1d7d1bb49c7e745510e0d699f94ad3184b9c
Reviewed-on: https://chromium-review.googlesource.com/206569
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
77f74853
|
2014-07-08T15:02:34
|
|
Add a GetVariableInfo helper method.
This method replaces the similar logic in storing uniforms,
varyings, and interface blocks when collecting variable info.
We can also re-use this method for both GLSL and HLSL programs.
BUG=angle:466
Change-Id: Ie6c13abe0f09f38b2f9b36e117caae4833eaccbf
Reviewed-on: https://chromium-review.googlesource.com/206566
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
4667c454
|
2014-07-08T15:02:36
|
|
Refactor style in VariableInfo.cpp.
This patch simplifies the functionality change in a subsequent patch.
BUG=angle:466
Change-Id: Ib1c360438fad74fb15cd6cbf983240229c0eee76
Reviewed-on: https://chromium-review.googlesource.com/206568
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
787fc03f
|
2014-07-07T12:49:45
|
|
Fix HLSL compiler error with else-rewriting in functions.
In functions with return types where we would use if-else rewriting,
we would potentially generate a spurious HLSL error that warned of
branches with no return value in the function.
This was causing a maps regression where overlays would not draw
in Earth mode.
BUG=346463
BUG=391697
Change-Id: I9f4fa959057a3a2dab6cdd98f8381b5871cabf03
Reviewed-on: https://chromium-review.googlesource.com/206824
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@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>
|
|
ed3eef1f
|
2014-02-26T09:47:11
|
|
Fix not rewriting else-if blocks.
We would miss expanding the else-if clauses in a chain
of selection statements.
BUG=346463
BUG=391697
Change-Id: Iee644b875cf68d0ed3dc0b73542efc49ecb23242
Reviewed-on: https://chromium-review.googlesource.com/206822
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
47cdb2aa
|
2014-07-03T16:05:38
|
|
Allow ConvertPrecision to return undefined.
The overly-restrictive check would fail on sampler types or other
GL types with no defined precision.
This fixes failures on the Debug GPU FYI bots.
BUG=angle:691
Change-Id: I443b7038a7b7a05675898b9b21e6112b1ac4c5ca
Reviewed-on: https://chromium-review.googlesource.com/206552
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
1da63af4
|
2014-07-03T15:00:53
|
|
Fix ConvertPrecision.
This method had never been fully implemented, and was returning
"highp" for every case value.
This should fix problems with the GPU FYI bots.
BUG=angle:691
Change-Id: Ie6ffa80cf2c063e506df06fb25d622227edeffa3
Reviewed-on: https://chromium-review.googlesource.com/206565
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ed27c729
|
2014-07-02T15:31:23
|
|
Consolidate shader variable storage in Compiler.
The Compiler base class now stores all the shader variables and
interface block information, instead of duplicating the information
in the HLSL translator.
BUG=angle:466
Change-Id: Ia69079fde64fbd6b0cbfc66defd5e37d99ee3e6e
Reviewed-on: https://chromium-review.googlesource.com/206020
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
a718c1e0
|
2014-07-02T15:31:22
|
|
Use shader variable types for variable collection.
Retire the old TVariableInfoList structure, and use the new
objects which we will expose more directly through the API.
BUG=angle:466
Change-Id: I999a97369bfb67cf73cd659c4fe885b41429d304
Reviewed-on: https://chromium-review.googlesource.com/205839
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
865d1451
|
2014-07-02T15:31:20
|
|
Consolidate varying packing sort order methods.
We were using the same list in the shader varying sorting
as well as in the varying packing validation in the
translator.
BUG=angle:466
Change-Id: Ic11758288e7a522d7c18a293de9e137e487e3978
Reviewed-on: https://chromium-review.googlesource.com/205595
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
aa72d782
|
2014-07-02T15:31:19
|
|
Remove duplicate SH and GL functions.
In several places we were using variable query methods that
were duplicated between the old SH enums and the corresponding
GL enums. We can use the common GL enum versions now.
BUG=angle:466
Change-Id: Ib8797fe6bc75828e05aed37b1f5fbd4b9ba03d22
Reviewed-on: https://chromium-review.googlesource.com/205594
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
183bde55
|
2014-07-02T15:31:19
|
|
Return shader variable information using GLenum values.
Instead of duplicating GL header define values, explictly return
GLenum for variable queries in the shader inspection API. This
reduces the duplicate defines in the shader compiler header.
BUG=angle:466
Change-Id: Iddaaff597b188251fa2e546f352bf77ab3ac43bc
Reviewed-on: https://chromium-review.googlesource.com/205860
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
ce505553
|
2014-06-26T14:56:33
|
|
Revert "Return variable type queries using GLenum values."
Breaks the FYI bots until we get Chromium patched.
BUG=angle:466
This reverts commit 53221f5a0382887155d90f7f286e41190d4f5bfb.
Change-Id: Ib28548df5c10a6f76f46e4cf8f2013dca5cf0ee2
Reviewed-on: https://chromium-review.googlesource.com/205850
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
53221f5a
|
2014-06-25T16:04:59
|
|
Return variable type queries using GLenum values.
Instead of duplicating GL header define values, explictly return
GLenum for variable queries in the shader inspection API. This
reduces the duplicate defines in the shader compiler header.
BUG=angle:466
Change-Id: If631b20ce68747297a946e1371def7709027a613
Reviewed-on: https://chromium-review.googlesource.com/204937
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@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>
|
|
d4a3a317
|
2014-06-25T16:04:56
|
|
Rename ShHandle.h to Compiler.h.
Since the above source file matches Compiler.cpp, more closely
follow our standard naming convention.
BUG=angle:466
Change-Id: Ib1422f87f16097f91f2bcdad550ec5bd940ce711
Reviewed-on: https://chromium-review.googlesource.com/204681
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@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>
|
|
961d5e98
|
2014-06-20T15:23:34
|
|
Use a const_iterator in structsHeader().
This was breaking the build for some compilers (GCC on android).
Change-Id: Ibfe5603710961497b6c15aa2d9cb568096ca1dd4
Reviewed-on: https://chromium-review.googlesource.com/204897
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9e5317f4
|
2014-06-20T14:56:37
|
|
Add end-of-file newline to StructureHLSL.cpp.
BUG=angle:680
Change-Id: I37aee0d136021a1ce1c3c398d680cdbc4820e6d0
Reviewed-on: https://chromium-review.googlesource.com/204905
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@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>
|
|
2bf8b372
|
2014-06-16T17:18:51
|
|
Fix link error when using varyings with "dx_".
Varyings beginning with "dx_" would not get decorated properly, or
at all, which could cause potential internal variables and certainly
caused link errors. Fix this by no longer treating the "dx_" prefix
differently.
Also fix our naming of "dx_Position" to be consistent with our other
internal types.
BUG=angle:678
Change-Id: I03da0494a3d934d82ae7b3f8f12a576ff9bc3869
Reviewed-on: https://chromium-review.googlesource.com/203777
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
adfffe46
|
2014-06-17T02:13:36
|
|
Duplicate reused symbol table entries.
BUG=angle:651
Change-Id: Ifce3c19d41a0a5a5ca5ee90ede528adf397d1da5
Reviewed-on: https://chromium-review.googlesource.com/204290
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
2a59292d
|
2014-06-11T16:22:57
|
|
Implement support for constructing a 2x2 matrix from a vector.
BUG=380353
Change-Id: Ica0b94104e39f87b4a3439df40221b1f682fd678
Reviewed-on: https://chromium-review.googlesource.com/203293
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
f26ecc81
|
2014-06-16T13:36:28
|
|
Fix build warnings about unused private variables on clang
BUG=angle:638,677
Change-Id: Id9e80f0b86d9c24633b2d353a409844c22441d21
Reviewed-on: https://chromium-review.googlesource.com/203429
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
|
|
16004fca
|
2014-06-11T11:29:11
|
|
Eliminate conversion operations.
They've been replaced by using constructor nodes, so any code handling conversion operators
can be removed.
BUG=380353
Change-Id: I70413179e7443efccbf997a5dd0f053c23689589
Reviewed-on: https://chromium-review.googlesource.com/203453
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-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>
|
|
6ed8d8af
|
2014-06-11T11:25:20
|
|
Produce constructors instead of conversions.
GLSL only supports explicit conversion through constructors. Therefore the conversion
nodes are redundant.
BUG=380353
Change-Id: Id871c34750191dac431bf72aac9afed7b0db7f8e
Reviewed-on: https://chromium-review.googlesource.com/203452
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-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>
|
|
01df23e7
|
2014-06-11T10:56:03
|
|
Add constant casting support.
BUG=380353
Change-Id: I5a350ca09e2b7e7abb9fa079365adb5aad5af607
Reviewed-on: https://chromium-review.googlesource.com/203450
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
|
|
f7f7616b
|
2014-06-06T15:48:21
|
|
Fix constructing vectors from matrices.
BUG=380353
Change-Id: I3b0fe55b829602554bb63bbd281ad58d47364502
Reviewed-on: https://chromium-review.googlesource.com/202966
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
|
|
906744ac
|
2014-06-06T15:18:07
|
|
Restrict the size of shader arrays.
This prevents overflow issues in the HLSL translator and some drivers. The
limit it hard-coded to 65536 to be larger than the Shader Model 5 register
limit (4096) to account for register allocation optimizations and future
hardware.
BUG=379799
Change-Id: I20f05c9dd230fbfc1c92af52533cd2b50f2ff994
Reviewed-on: https://chromium-review.googlesource.com/202939
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
|
|
44fa7594
|
2014-05-30T11:50:07
|
|
Refactor platform related functionality into platform.h and tls.h.
Since libGLESv2 and libEGL will eventually be cross platform, it will be
useful to have platform defines and TLS functions that work everywhere.
BUG=angle:664
Change-Id: Ia357925a0992d82e8b446d88d32a1984d319e6e8
Reviewed-on: https://chromium-review.googlesource.com/202133
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@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>
|