|
d5f1afb5
|
2017-12-04T15:42:59
|
|
Make TSymbol immutable
There's still an exception for changing the names of structures, but
otherwise the data stored in the TSymbol base class is never changed.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I5b3f44cd365320ad09b46d2cfa3654a7d3f4bbc3
Reviewed-on: https://chromium-review.googlesource.com/806556
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
030017a4
|
2017-12-06T14:06:53
|
|
Mark StaticType related functions as constexpr
Fixes compilation on some versions of GCC and probably Clang.
Follow-up to http://crrev.com/c/786317
Bug: angleproject:1432
Change-Id: I3fc3ad0f65492f9543eb27fcdce6ca29a9ad06e5
Reviewed-on: https://chromium-review.googlesource.com/812220
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
|
|
378c3a51
|
2017-12-04T11:32:13
|
|
Clean up storing interface blocks in the symbol table
Merge TInterfaceBlock with TInterfaceBlockName, so that there are no
duplicate data structures for interface blocks. This is similar to the
refactoring that was already done to structs.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I67d2af6ccbe5344bddf9c99030d118fe532fbbd8
Reviewed-on: https://chromium-review.googlesource.com/805819
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
12a18ad3
|
2017-12-01T16:59:47
|
|
Simplify interface block instance recording
Instead of storing instance names as part of TInterfaceBlock, store
instance names only in interface block instance symbols. Wherever the
instance name is needed it can be fetched from the instance symbol.
BUG=angleproject:2267
TEST=angle_end2end_tests
Change-Id: Ia265e4db7901eebec57c9c3769d84c17651a35ba
Reviewed-on: https://chromium-review.googlesource.com/803221
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
614dd0f5
|
2017-11-22T14:04:48
|
|
Replace TCache with static TType instances
Replaces TCache with (static generation + static/dynamic lookups) of
TType instances, using compile-time template and constexpr magic.
Work started by jmadill here: https://crrev.com/c/776280
With more contributions from jmadill here: https://crrev.com/c/801494
Bug: angleproject:1432
Change-Id: I07181543f8fee4b2606cdd2d0738351e83d4ce57
Reviewed-on: https://chromium-review.googlesource.com/786317
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3de2703d
|
2017-11-30T12:16:47
|
|
Fix handling matrix qualifiers on block members
Individual block member row_major/column_major layout qualifiers may
override the qualifiers set on the block. During parsing, this was
already being handled correctly, so that the qualifier is resolved for
each block member and recorded for each TField / InterfaceBlockField.
Now we always write the qualifiers on a per-member granularity to the
output GLSL shaders, so that the native driver gets the correct
per-member qualifiers. This replaces earlier behavior where the matrix
qualifiers were only written per-block.
Also only use qualifiers from individual members in block layout.
Since the block-level qualifier information is no longer used after
parsing, it is no longer kept in the AST. A dummy value is still set
to the InterfaceBlock structs exposed through the ShaderVars
interface, since that has existing usage in Chromium that needs to be
removed before the field can be removed.
Some AMD OpenGL drivers don't seem to handle matrix layout qualifiers
correctly, so most of the added tests need to be skipped for AMD GL.
On NVIDIA and Intel the tests pass.
BUG=angleproject:2271
TEST=angle_unittests, angle_end2end_tests,
dEQP-GLES31.functional.program_interface_query.uniform.matrix*
Change-Id: I1baa7a633bc2da548743c2190cb72db491b5227a
Reviewed-on: https://chromium-review.googlesource.com/800174
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d5f44c98
|
2017-11-29T17:15:40
|
|
Simplify parsing struct field declarators
This removes the dummy type that was attached to struct declarators
while parsing. This makes TParseContext::addStructDeclaratorList in
particular simpler to understand.
The new TDeclarator data type is the parsed representation of the
struct_declarator grammar rule. It is completely immutable. The name
and location stored in TField can also be qualified as constant now.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I2834f87fc0eee0bdb7673ef495a55fb463023c55
Reviewed-on: https://chromium-review.googlesource.com/797033
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
035419fa
|
2017-11-28T14:27:15
|
|
Clean up storing struct types in the symbol table
Instead of storing struct symbols as TVariable objects, store them
as TStructure objects. This way struct type symbols don't need to
store bogus data that's associated with arbitrary types, and on the
other hand the name and unique id of struct types are only stored in
a single place. This change is a refactoring with no effect on
generated output.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I173793e0cc77a890cdac6868d72d9f275ac9461a
Reviewed-on: https://chromium-review.googlesource.com/793814
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5d69db12
|
2017-11-24T16:51:15
|
|
Reset symbol unique id counter between compilations
This guarantees identical compilation results on different
compilations using the same compiler instance, guards against
overflow, and is useful as a building block for tracking more symbol
information in the symbol table.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: Ib5a7cec2fff6712ead969d935d238d28a87fd4a7
Reviewed-on: https://chromium-review.googlesource.com/796795
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
97fa8557
|
2017-11-28T16:28:42
|
|
Refactor TStructure
Move methods and member variables that generalize to different types
of field lists into TFieldListCollection and put implementations of
methods in cpp files.
This prepares for making TStructure inherit from TSymbol.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I63095242dd17aac2d2efd616b49be1143cfc1f92
Reviewed-on: https://chromium-review.googlesource.com/793813
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
54a29ffd
|
2017-11-28T17:35:20
|
|
Refactor TSymbol to follow naming conventions
This will make it easier to make TStructure inherit from TSymbol.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I73a5a25234c7f965b6970891821ee9d6f0a23aca
Reviewed-on: https://chromium-review.googlesource.com/793812
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
ae04e1e4
|
2017-11-27T16:00:39
|
|
Fix scalarizing vec and mat constructor args
Scalarizing vec and mat constructor args can generate new statements
in the parent block of the constructor. To preserve the correct
execution order of expressions, scalarized vector and matrix
constructors need to be first moved out from inside loop conditions
and sequence operators. This is done whenever the compiler flag to
scalarize args is on.
BUG=chromium:772653
TEST=angle_unittests
Change-Id: Id40f8d848a9d087e186ef2e680c8e4cd440221d9
Reviewed-on: https://chromium-review.googlesource.com/790412
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f13cadd8
|
2017-11-28T10:53:09
|
|
Fix checking negative index when indexing matrix/vector
It's important that the test against the maximum of the valid range
is only done if the index is positive, so the sanitized index value
is guaranteed to end up in the valid range.
This fixes a regression from commit "Add GLSL support for
runtime-sized arrays in SSBOs".
BUG=chromium:789029
TEST=angle_unittests
Change-Id: Ic7125e383a64e46994b072df6d7e642432c521af
Reviewed-on: https://chromium-review.googlesource.com/792935
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
57ea533f
|
2017-11-22T14:04:48
|
|
TType: Store array sizes vector as a pointer.
This makes TType a literal type, and thus is something that could be
constexpr.
Work started by jmadill here: https://crrev.com/c/776278
Bug: angleproject:1432
Change-Id: I707ddf81eaf029f49d62d2836b7166d265cbdfa1
Reviewed-on: https://chromium-review.googlesource.com/786316
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ebee5b3b
|
2017-11-23T12:56:32
|
|
Add GLSL support for runtime-sized arrays in SSBOs
The GLSL parser now allows a runtime-sized array as the last member in
a shader storage block. Clamping indexing against the memory bounds is
done by determining the array length at runtime.
Runtime-sized arrays are used in dEQP tests for many compute shader
tests, so these now work on the OpenGL backend.
BUG=angleproject:1951
TEST=angle_unittests,
dEQP-GLES31.functional.shaders.linkage.shader_storage_block.*
dEQP-GLES31.functional.shaders.builtin_functions.*compute*
Change-Id: Ibecca24623ca8e4723af6f0e0421fe9711ea828d
Reviewed-on: https://chromium-review.googlesource.com/787976
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
7881cfdf
|
2017-08-23T18:00:21
|
|
Add parsing of arrays of arrays
This changes the grammar so that multiple array sizes can be chained
together, and adds arrays of arrays support to TPublicType. In
TPublicType the array sizes are stored using a pointer to a vector, a
plain vector won't work due to bison restrictions.
A larger subset of program interface query tests now pass. Some are
still failing due to unrelated bugs.
BUG=angleproject:2125
TEST=angle_unittests, angle_end2end_tests,
dEQP-GLES31.functional.shaders.arrays_of_arrays.*
dEQP-GLES31.functional.uniform_location.nested_array.*
dEQP-GLES31.functional.program_interface_query.*
dEQP-GLES31.functional.ubo.*level*array.*
Change-Id: Iee16477a3752b953f5068c0473a2ed62fead8155
Reviewed-on: https://chromium-review.googlesource.com/633944
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
1f73b7c6
|
2017-11-23T16:31:22
|
|
Add separate entries for inner arrays in block layout
Generating separate entries for array of array members in blocks is
needed so that block member queries work correctly.
This change will be tested more fully once support for parsing arrays
of arrays lands in the compiler.
BUG=angleproject:2125
Change-Id: I052837ddd4ee44a5c2390d3af44c0f1d21fa5fc7
Reviewed-on: https://chromium-review.googlesource.com/787975
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
465835d6
|
2017-09-26T13:34:10
|
|
Support arrays of arrays in the API
The ShaderVariable class that is used as an interface between the
compiler and the rest of the code gets arrays of arrays support.
Array of array variables are passed from the compiler just like any
other variables. However, when stored in Program state each innermost
array constitutes a separate variable. This is done to make the
implementation match the GLES specification for program interface
query APIs.
This will be tested more fully once support for parsing arrays of
arrays lands in the compiler.
TEST=angle_end2end_tests, angle_unittests
BUG=angleproject:2125
Change-Id: I0f7159000f039be92a87a52b3b68cd9a215a21cb
Reviewed-on: https://chromium-review.googlesource.com/684742
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
acf2f3ad
|
2017-11-21T19:22:44
|
|
Apply Chromium style fixes.
This addresses several minor code quality issues that are validated
in Chromium, but not yet applied to ANGLE:
* constructors and destructors must be defined out-of-line
* auto is not allowed for simple pointer types
* use override everywhere instead of virtual
* virtual functions must also be defined out-of-line
Slightly reduces binary size for me (~2k on Win, 150k on Linux).
Bug: angleproject:1569
Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6
Reviewed-on: https://chromium-review.googlesource.com/779959
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
89be29a5
|
2017-11-06T14:36:45
|
|
ES31: Implement creation and attaching geometry shader on OpenGL
This patch intends to implement the creation of a geometry shader
and attaching a geometry shader to a program on OpenGL back-ends.
This patch also adds all geometry shader related dEQP-GLES31 test
failures to deqp_gles31_test_expectations.txt.
BUG=angleproject:1941
TEST=angle_end2end_tests
Change-Id: Ib0b497030255b15dacd967e48bc59eef0009af46
Reviewed-on: https://chromium-review.googlesource.com/757979
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
902e8c18
|
2017-11-18T09:34:16
|
|
Reland "Make TType store a const char * for mangled name."
This is a reland of dc7bffd06b526bbffd3d1c1ddbd6c763a2cc7287
Reland fixes the memory regression by not calling new, instead
calling the pool allocator directly.
Original change's description:
> Make TType store a const char * for mangled name.
>
> We would only ever use the c_str value from the mangled name. This
> makes it easier to make constexpr TTypes.
>
> Bug: angleproject:1432
> Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9
> Reviewed-on: https://chromium-review.googlesource.com/776277
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Bug: angleproject:1432
Change-Id: I1aaeea883186b9061955d55f2fa77d27f5d9b725
Reviewed-on: https://chromium-review.googlesource.com/782406
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
39f74df5
|
2017-11-20T16:09:57
|
|
Remove unreferenced struct types from the AST
This expands pruning unreferenced variables so that unreferenced named
struct types can also be removed from the AST.
Includes a small cleanup in GLSL output so that the output code
matching tests can test against clean output.
BUG=chromium:786535
TEST=angle_unittests
Change-Id: I20974ac99a797e478d82f9203c179d2d58fac268
Reviewed-on: https://chromium-review.googlesource.com/779519
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
c7965001
|
2017-11-20T23:29:11
|
|
Revert "Make TType store a const char * for mangled name."
This reverts commit dc7bffd06b526bbffd3d1c1ddbd6c763a2cc7287.
Reason for revert: Causes a memory leak, detected by ASAN bot:
https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/494713
Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x847aa2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3
#1 0x193a833 in sh::TType::buildMangledName() const third_party/angle/src/compiler/translator/Types.cpp:545:21
#2 0x193d2e8 in getMangledName third_party/angle/src/compiler/translator/Types.cpp:751:24
#3 0x193d2e8 in sh::TType::realize() third_party/angle/src/compiler/translator/Types.cpp:759
#4 0x1834474 in sh::TCache::getType(sh::TBasicType, sh::TPrecision, sh::TQualifier, unsigned char, unsigned char) third_party/angle/src/compiler/translator/Cache.cpp:89:11
#5 0x1859ac7 in getType third_party/angle/src/compiler/translator/Cache.h:36:16
#6 0x1859ac7 in sh::InsertBuiltInFunctions(unsigned int, ShShaderSpec, ShBuiltInResources const&, sh::TSymbolTable&) third_party/angle/src/compiler/translator/Initialize.cpp:28
Bug: angleproject:1432
Original change's description:
> Make TType store a const char * for mangled name.
>
> We would only ever use the c_str value from the mangled name. This
> makes it easier to make constexpr TTypes.
>
> Bug: angleproject:1432
> Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9
> Reviewed-on: https://chromium-review.googlesource.com/776277
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
TBR=jmadill@chromium.org,kainino@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:1432
Change-Id: Ib112a2ce9871a4f4afc53101ac1a3ddd166008cf
Reviewed-on: https://chromium-review.googlesource.com/780420
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2f294c9a
|
2017-11-20T14:47:26
|
|
Add constructors for TMemoryQualifier and TLayoutQualifier.
These replace the ::create methods, to facilitate constexpr versions.
Also adds a constructor of WorkGroupSize that can be made to be
constexpr.
Bug: angleproject:1432
Change-Id: I413d1a56102c94d6a383775110a2b850a7532ea0
Reviewed-on: https://chromium-review.googlesource.com/776279
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
|
|
4dd167fb
|
2017-11-09T13:08:31
|
|
Vulkan: Assign locations to varyings.
These were actually always required, but only was caught by the newer
versions of the SPIR-V toolchain.
BUG=angleproject:2237
Change-Id: I43fef179e8792e46a602b39a6decafcab03b19df
Reviewed-on: https://chromium-review.googlesource.com/760638
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
dc7bffd0
|
2017-11-18T09:34:16
|
|
Make TType store a const char * for mangled name.
We would only ever use the c_str value from the mangled name. This
makes it easier to make constexpr TTypes.
Bug: angleproject:1432
Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9
Reviewed-on: https://chromium-review.googlesource.com/776277
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
|
|
90ed1e49
|
2017-11-17T11:14:43
|
|
Reland "Clean up the TType class."
This is a reland of 3f286cd1b6e29605a159ee0bd20c76929d4d5a9f
Original change's description:
> Clean up the TType class.
>
> Move more methods into the cpp file, and rename member variables to
> start with the "m" prefix.
>
> Also move most of the TPublicType methods into the cpp.
>
> Bug: angleproject:1432
> Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261
> Reviewed-on: https://chromium-review.googlesource.com/776276
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bug: angleproject:1432
Bug: chromium:786603
Change-Id: I7f91557d9f9065f4aa90130ce30dc27e9f796065
Reviewed-on: https://chromium-review.googlesource.com/777715
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
758bc6a9
|
2017-11-18T00:02:09
|
|
Revert "Clean up the TType class."
This reverts commit 3f286cd1b6e29605a159ee0bd20c76929d4d5a9f.
Reason for revert: crbug.com/786603
Original change's description:
> Clean up the TType class.
>
> Move more methods into the cpp file, and rename member variables to
> start with the "m" prefix.
>
> Also move most of the TPublicType methods into the cpp.
>
> Bug: angleproject:1432
> Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261
> Reviewed-on: https://chromium-review.googlesource.com/776276
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
TBR=jmadill@chromium.org,oetuaho@nvidia.com,kainino@chromium.org
Change-Id: Ib3062a71118095a3e58e75bfee2474c2e4ae9431
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:1432
Reviewed-on: https://chromium-review.googlesource.com/777801
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
|
|
3f286cd1
|
2017-11-17T11:14:43
|
|
Clean up the TType class.
Move more methods into the cpp file, and rename member variables to
start with the "m" prefix.
Also move most of the TPublicType methods into the cpp.
Bug: angleproject:1432
Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261
Reviewed-on: https://chromium-review.googlesource.com/776276
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3d70ca9c
|
2017-11-10T16:53:26
|
|
Remove unreferenced variables from the AST
Unreferenced local and global variables are now pruned from the AST.
They will be removed unless their initializer has side effects.
The CollectVariables step needs to be run after the pruning, as the
pruning may affect which interface variables are statically used.
It's also good to gather built-ins that need to be emulated after the
pruning, so unnecessary built-in emulation functions are not added to
the translator output.
This will help handle some dEQP tests for arrays of arrays that have
extremely large local arrays that are only used in an array length
query. By constant folding the length and pruning unused variables we
will avoid adding a large amount of array initialization code to the
generated shaders.
BUG=angleproject:2166
TEST=angle_unittests, angle_end2end_tests
Change-Id: Ic918bfe8f16460bcd6101d73a7a674145f5aeecd
Reviewed-on: https://chromium-review.googlesource.com/766434
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
2c7f34c8
|
2017-10-09T17:18:02
|
|
Initialize uninitialized GLSL arrays in a for loop
Previously, creating nodes for initializing each single array element
could result in memory bloat during translation when dealing with
large arrays. The resulting shader could also end up very long.
Initialize most arrays using a simple for loop instead. The loop is
compatible with ESSL 1.00 Appendix A limitations.
An exception is made for fragment outputs, so that they are not
indexed by non-constant values.
On some platforms using the a loop to initialize variables can cause
problems, so we also have a compiler flag for turning this behavior
off. The flag was already added earlier for a staggered rollout of
this functionality.
BUG=chromium:735497
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
Change-Id: Iec727821d8137db56b440ddbe007879b1b55f61f
Reviewed-on: https://chromium-review.googlesource.com/707195
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
bb27c3a1
|
2017-11-15T16:32:25
|
|
Fix VectorizeVectorScalarArithmetic statement insertion
The traverser must avoid inserting two statements to the same position
on a single traversal, so it doesn't trigger an assert.
BUG=chromium:784078
TEST=angle_unittests
Change-Id: I855054e62cc1b1cf4e6bb02af527954151c7d0e7
Reviewed-on: https://chromium-review.googlesource.com/771611
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b5601eb6
|
2017-11-15T18:08:04
|
|
Only initialize globals if initialization flag is set
This avoids the possibility of initializing globals twice in Chromium.
Now we also never initialize variables redundantly in case we're
writing HLSL output. This was already the intent of the code before,
but a mistake had slipped in and the code didn't actually check the
output type properly.
This also simplifies DeferGlobalInitializers by running it after
SeparateDeclarations.
BUG=chromium:735497
TEST=WebGL conformance tests
Change-Id: I95036a24ac8cf18113755510376a2fca286b3ee6
Reviewed-on: https://chromium-review.googlesource.com/771555
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
a3106c58
|
2017-11-03T09:39:39
|
|
ES31: Add atomic memory functions
BUG=angleproject:1442
TEST=angle_unittests, angle_end2end_tests
dEQP-GLES31.functional.compute.shared_var.atomic*
dEQP-GLES31.functional.compute.basic.shared_atomic_op*
dEQP-GLES31.functional.ssbo.atomic.*
Change-Id: I82b54fde3a852d3bd917b1e19680baa1c28fce4d
Reviewed-on: https://chromium-review.googlesource.com/765061
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
858ff481
|
2017-11-15T13:41:46
|
|
Make isNamelessStruct a member of TType
This will be needed outside of InitializeVariables when removing
unreferenced variables is added. Named struct type declarations
cannot be pruned as easily as they might be referenced later.
BUG=angleproject:2166
TEST=angle_unittests
Change-Id: If1462abe67e62ae19bde97de3c8f3d15e99ae9ea
Reviewed-on: https://chromium-review.googlesource.com/771790
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
1d33c219
|
2017-11-13T10:21:39
|
|
Fix standalone mac compilation
BUG=
Change-Id: I225bd1693f595a64179b8e500cb1e7101fd2e197
Reviewed-on: https://chromium-review.googlesource.com/766472
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
7af63727
|
2017-11-13T15:03:40
|
|
Fix nullptr dereference on struct parameter error
Function parameter name string does not necessarily exist, so it's
better to use the function name as the token in the error message.
BUG=chromium:784158
TEST=angle_unittests
Change-Id: I8f3b8604fd702bdc9486b8d721a5f60de1ff3fa7
Reviewed-on: https://chromium-review.googlesource.com/765972
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
703671e9
|
2017-11-08T17:47:18
|
|
Unify extension behavior checks
Some supportsExtension and isExtensionEnabled checks are now turned
into checkCanUseExtension checks. Using checkCanUseExtension is
preferable so that warnings are generated correctly when an extension
is used and a warn directive is present.
isExtensionEnabled is still used in some places where an error message
about the extension could be confusing, particularly when a core spec
version adds support for something that is also present in an
extension.
Also make it possible to disable ARB_texture_rectangle extension using
an extension directive. ARB_texture_rectangle extension functionality
is enabled by default in GLSL when the extension is supported.
BUG=angleproject:2238
TEST=angle_unittests
Change-Id: I7455293412ff469f54bc7da79df146e7bc127379
Reviewed-on: https://chromium-review.googlesource.com/760737
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
cac94a91
|
2017-11-10T10:09:32
|
|
Optimize ShaderVariable::isBuiltIn.
This makes the check a bit faster, by inlining the prefix check.
Also some cleanups to ValidateVertexShaderAttributeTypeMatch.
BUG=angleproject:2202
Change-Id: Ifeab4cd85a91a1639a461f44776a68ac98c5bd79
Reviewed-on: https://chromium-review.googlesource.com/761240
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3a9090fa
|
2017-09-27T14:37:04
|
|
ES31: Add BUFFER_VARIABLE and SHADER_STORAGE_BLOCK program interfaces
This patch collects the shader storage block members information.
It implements getShaderStorageBlockMemberInfo and getShaderStorageBlockSize
for OpenGL backend. Meanwhile, it implements BUFFER_VARIABLE and SHADER_STORAGE_BLOCK
interfaces for program query.
BUG=angleproject:1920
TEST=angle_end2end_tests:ProgramInterfaceTest*
dEQP-GLES31.functional.layout_binding.ssbo*
dEQP-GLES31.functional.compute.basic.empty
dEQP-GLES31.functional.compute.basic.ssbo_rw*
dEQP-GLES31.functional.compute.basic.ssbo_local_barrier*
dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_small
dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_groups
dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_invocations
dEQP-GLES31.functional.compute.basic.copy_ssbo_single_invocation
dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_small
dEQP-GLES31.functional.compute.basic.shared_var*
dEQP-GLES31.functional.compute.basic.ubo_to_ssbo*
dEQP-GLES31.functional.compute.basic.write_multiple_arr*
dEQP-GLES31.functional.compute.shared_var.basic_type.*
dEQP-GLES31.functional.compute.shared_var.work_group_size.*
dEQP-GLES31.functional.atomic_counter.*
Change-Id: Ie8b81fde5a2e919aab77adb3d137c9ff2f193409
Reviewed-on: https://chromium-review.googlesource.com/712235
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
661fc487
|
2017-10-16T12:17:05
|
|
Work around NVIDIA GLSL vector-scalar op bug
This adds a new AST transform VectorizeVectorScalarArithmetic. The AST
transform works around incorrect handling of certain types of GLSL
arithmetic operations by NVIDIA's GL driver. It works around only the
most common cases where the bug reproduces, since detecting all the
cases would take more sophisticated analysis of the code than what
is currently easily implementable in ANGLE.
When a float add operator has both vector and scalar operands, the AST
transform turns the scalar operand into a vector operand. Example:
vec4 f;
f += 1.0;
gets turned into:
vec4 f;
f += vec4(1.0);
When a vector constructor contains a binary scalar float
multiplication or division operation as its only argument, the AST
transform turns both operands of the binary operation into vector
operands. Example:
float f, g;
vec4(f * g);
gets turned into:
float f, g;
vec4(vec4(f) * vec4(g));
Another example with compound assignment:
float f, g;
vec4(f *= g);
gets turned into:
float f, g;
vec4 s0 = vec4(f);
(s0 *= g, f = s0.x), s0;
This latter transformation only works in case the compound assignment
left hand expression doesn't have side effects.
BUG=chromium:772651
TEST=angle_end2end_tests
Change-Id: I84ec04287793c56a94845a725785439565debdaf
Reviewed-on: https://chromium-review.googlesource.com/721321
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
0e883134
|
2017-10-26T09:53:50
|
|
ES31: Support EXT_geometry_shader in GLSL compiler
This patch intends to support "EXT_geometry_shader" as a valid
extension string in ANGLE GLSL compiler.
We decide to support it because in dEQP-GLES31 all geometry
shader related tests are using "EXT_geometry_shader" instead of
"OES_geometry_shader".
1. Support new extension string "EXT_geometry_shader"
2. Enable geometry shader layout qualifiers with EXT_geometry_shader
3. Enable geometry shader builtins with EXT_geometry_shader
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: Iaedd01a9100ccf56243c957db36ff0c983d17060
Reviewed-on: https://chromium-review.googlesource.com/737933
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
ef7fb388
|
2017-11-07T16:33:49
|
|
Size const unsized arrays without an initializer
The array size for unsized arrays needs to be sanitized in all cases,
since subsequent checks on array indexing depend on all arrays being
sized.
BUG=chromium:781729
TEST=angle_unittests
Change-Id: I3af6c08bb249a19f7c2ef169c877a2b863eb31d3
Reviewed-on: https://chromium-review.googlesource.com/757101
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d80f2944
|
2017-11-06T12:44:45
|
|
Struct definition not allowed as function parameter type
Struct definitions are not allowed as a function parameter type now.
This is specified in ESSL 3.00.6 section 12.10. ESSL 3.00.6 section
6.1.1 contradicts this, but that seems like a mistake, it's been fixed
in subsequent spec versions.
BUG=angleproject:2225
TEST=angle_unittests
Change-Id: I6b97d120c440f0c0a45d31bbfaf292fb497160ce
Reviewed-on: https://chromium-review.googlesource.com/754606
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
bd3cd506
|
2017-11-03T15:48:52
|
|
Clean up HLSL constructor output
Split generating HLSL struct constructors from generating built-in
type constructors, as these didn't have much in common. Struct
constructors are now only generated when they are needed, as opposed
to before, when they were generated on any use of a struct.
This changes built-in constructor naming to include "_ctor" and gets
rid of having special built-in type names just for constructors.
This will make it easier to do changes to constructor output, for
example to add constructors for structs in std140 layout. This might
be needed to implement SSBOs efficiently.
This includes one bug fix for writing out struct declarations for
varyings.
Also improves const-correctness of accessing structs through TType
in general.
BUG=angleproject:2218
TEST=angle_unittests, angle_end2end_tests
Change-Id: If865fb56f86486b9c4a2c31e016ea16427f4a5fa
Reviewed-on: https://chromium-review.googlesource.com/753883
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
2ef23e2d
|
2017-11-01T16:39:11
|
|
Fix writing uniform block maps to HLSL output
HLSL output maps structs in std140 uniform blocks to a different
layout in order to eliminate padding. The padding may have been
inserted to comply with std140 packing rules.
There used to be two issues in writing the maps: Sometimes the same
map could be written multiple times, and the maps were not being
written for uniform blocks with instance names.
Rewrite how the uniform buffer struct maps get generated so that
the code works correctly. Instead of flagging accesses, structs inside
uniform blocks are gathered from uniform block declarations. When
accesses to structs in uniform blocks are written out in OutputHLSL,
it's checked whether a mapped struct needs to be used instead of the
original one.
This code could still be optimized further by limiting mapped structs
generation to those ones that really need to be used. This is left to
be done later.
BUG=angleproject:2084
TEST=angle_end2end_tests
Change-Id: Iee24b3ef15847d2af64554ac74b8e4be5060d18c
Reviewed-on: https://chromium-review.googlesource.com/751506
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d10cf69e
|
2017-11-02T11:06:14
|
|
Remove repeated "success" check from compileTreeImpl
This refactoring simplifies the compilation code by putting AST checks
and simplification into a separate function. This function will
immediately return false when an error is encountered. This is easier
to maintain than repeated checking of a "success" boolean.
BUG=angleproject:2068
TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests
Change-Id: I1ae1c8def3625ada1482104a6babe605405229ef
Reviewed-on: https://chromium-review.googlesource.com/750085
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
640d597d
|
2017-11-02T10:37:31
|
|
Add missing check in Compiler
Further AST traversals should not be run in case the expression
complexity check failed and set success=false. Otherwise traversal
can result in stack overflow.
BUG=chromium:780545
TEST=WebGL conformance tests
Change-Id: Icfde8c051038c691563e199a6d3a17b1e8e5ebf5
Reviewed-on: https://chromium-review.googlesource.com/750781
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d78e33a8
|
2017-10-30T12:33:52
|
|
preprocessor: Fix lineno overflow on line continuations
BUG=chromium:774807
Change-Id: I4b3fbee31683f411810080572cfff0f8307b93bf
Reviewed-on: https://chromium-review.googlesource.com/744183
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
c1f14fbe
|
2017-10-28T19:17:23
|
|
Remove empty switch statements from translated shaders
The native HLSL compiler does not accept switch statements with an
empty statement list. The simplest way to accommodate this is to
simply remove them from the AST after parsing and some initial
pruning.
This is done by the new RemoveEmptySwitchStatements traverser. It
preserves init statements of switch statements in case they have side
effects. So for example
switch(++i) {}
gets translated to
++i;
BUG=angleproject:2206
TEST=angle_end2end_tests
Change-Id: I550a3c9b010a3566016bdfd93344ac30fd860604
Reviewed-on: https://chromium-review.googlesource.com/742922
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
b8ee9dd3
|
2017-10-30T12:43:27
|
|
Validate empty statements in switch statements
Even an empty statement like ";" is a statement according to the
grammar. They should not be allowed in switch statements before the
first case statement, but on the other hand a switch statement that
has just an empty statement after the last statement is valid.
Now the parser creates AST nodes from empty statements so that we can
validate switch statements correctly. However, they are pruned shortly
after parsing completes in PruneNoOps, so they don't affect further
processing of the AST.
BUG=angleproject:2181
TEST=angle_unittests
Change-Id: I1085056fc34b146142546fc5f2b7f3124b910ab9
Reviewed-on: https://chromium-review.googlesource.com/743621
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
722bfb51
|
2017-10-26T17:00:11
|
|
Fix detecting duplicate field names in structures
Previously field names that were listed in the first declarator list
inside a struct declaration were not checked against each other.
BUG=angleproject:2204
TEST=angle_unittests
Change-Id: Ibf821d45556f6dfe0223dae673644f6795daf4cb
Reviewed-on: https://chromium-review.googlesource.com/739825
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
55bc905f
|
2017-10-25T17:33:06
|
|
Always consider type arrayness for atomic counters
Atomic counter arrays may be declared with various different syntax -
the array size may be declared as a part of the type or as a part of
the declarator. Take this into account when determining whether atomic
counter offsets overlap.
BUG=angleproject:1729
TEST=angle_unittests
Change-Id: I7435ded9401c4c1caab22c22d83fd2ad301df768
Reviewed-on: https://chromium-review.googlesource.com/738140
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
87c35883
|
2017-10-19T15:19:38
|
|
Prune no-op statements with a single traverser
We put pruning literal statements and pruning empty declarations in
the same traverser, as some of the required logic is the same. This
pruning of no-ops is always done as one of the first processing steps
after parsing, so further processing of the AST is simpler.
Since we now prune pure literals before removing no-op cases from the
end of switch statements, we also don't need any sort of special
handling for switch statements in pruning pure literals.
BUG=angleproject:2181
TEST=angle_unittests
Change-Id: I2d86efaeb80baab63ac3cc803f3fd9e7ec02908a
Reviewed-on: https://chromium-review.googlesource.com/727803
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
65c56dd9
|
2017-10-13T16:18:57
|
|
Fix incorrect hashing on built-in interface block fields
This patch intends to fix an error in translating built-in interface
block fields. Any field of a built-in interface block should be kept
and cannot be hashed.
This patch can fix a bug in handling the interface block gl_in when
we try to output the translated geometry shader string.
BUG=angleproject:1941
TEST=angle_unittest
Change-Id: Iebfba4b6a30c8942ed0f66131ad30d12ad96c62a
Reviewed-on: https://chromium-review.googlesource.com/719454
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
ca68d988
|
2017-09-18T16:41:56
|
|
ES31: Add std430 support for OpenGL backend
BUG=angleproject:1920
TEST=angle_unittests
Change-Id: Ie8e171abec053c2c5dca93d6e79db534f74520e7
Reviewed-on: https://chromium-review.googlesource.com/737532
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
4ddae359
|
2017-10-26T16:20:18
|
|
Use array_specifier in struct declarator parsing
This will make implementing arrays of arrays simpler for struct
members as well. Similar refactoring was already done for other types
of array declarations.
BUG=angleproject:2125
TEST=angle_unittests
Change-Id: I0483c3a7c006d37090c7c972cb3d7763d3909c8f
Reviewed-on: https://chromium-review.googlesource.com/739824
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
9cd7163e
|
2017-10-26T14:43:20
|
|
Fix setting array sizes on a constructor
Take any array sizes that have been explicitly specified in the shader
text into account, and only set the ones that are unsized according to
the arguments.
BUG=angleproject:2125
TEST=angle_unittests
Change-Id: I37d08a86c25f7cd4f3ce5689f2c9fad444e7d5ad
Reviewed-on: https://chromium-review.googlesource.com/738141
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
454c34cb
|
2017-10-25T16:35:56
|
|
Accept valid geometry shader inputs regardless of syntax
Before, only the following style of declarations were accepted:
in float f[];
Now also these styles are accepted:
in float[] f;
in float f[], g[];
BUG=angleproject:2201
TEST=angle_unittests
Change-Id: I0af7d355a5e06a67ceef2d6bd69af7e23c180a04
Reviewed-on: https://chromium-review.googlesource.com/738234
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
55bde916
|
2017-10-25T13:41:13
|
|
Parse array specifier with a separate grammar rule
This brings the grammar closer to the GLSL ES 3.10 spec.
Some corner cases related to handling unsized arrays are fixed.
BUG=angleproject:2125
TEST=angle_unittests, angle_end2end_tests
Change-Id: I9bcf87b17b97da0e2ec2954d32037c272fde3080
Reviewed-on: https://chromium-review.googlesource.com/738233
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d4556dfc
|
2017-09-27T16:45:22
|
|
Reland 'Adds TUnorderedMap and uses it for tLevel in TSymbolTableLevel.'
Reland of https://crrev.com/c/526672
Bug: 697758
Change-Id: I410e4774c4ad85595eb8789603901878b209c857
Reviewed-on: https://chromium-review.googlesource.com/688296
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
|
|
8e4b355b
|
2017-08-30T14:20:58
|
|
ES31: Implement Geometry Shader inputs and outputs
This patch intends to implement Geometry Shader inputs and
outputs in ANGLE GLSL compiler.
1. Only accept arrays as the inputs of a Geometry Shader.
2. Allow unsized arrays as the inputs of a Geometry Shader after a
valid input primitive declaration and assign size to them.
3. Implement Geometry Shader outputs.
4. Allow Geometry Shader inputs and outputs using interpolation
qualifiers ('flat', 'smooth', 'centroid').
5. Allow using 'location' layout qualifier on Geometry Shader inputs
and outputs.
BUG=angleproject:1941
TEST=angle_unittests
Change-Id: Ia7e250277c61f45c8479437b567c2831ff26b433
Reviewed-on: https://chromium-review.googlesource.com/650211
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
283c2194
|
2017-10-23T17:11:50
|
|
Support arrays of arrays in UseInterfaceBlockFields
This can be tested more fully once parsing arrays of arrays will be
supported.
BUG=angleproject:2125
Change-Id: I89c8f33b8cca5d6f5aa3f20aab23dccac53a956f
Reviewed-on: https://chromium-review.googlesource.com/733128
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
e7c2857d
|
2017-10-23T16:29:33
|
|
Clean up direct access of ShaderVariable::arraySize
This change is pure refactoring. It's intended to help with adding
support for arrays of arrays.
BUG=angleproject:2125
TEST=angle_unittests
Change-Id: I82881a98c3c476fd6666a551ce6be255ae0de4cf
Reviewed-on: https://chromium-review.googlesource.com/733127
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
de03e003
|
2017-10-21T14:04:20
|
|
Vulkan: Add shader handling for textures.
BUG=angleproject:2167
Change-Id: I33940288331a23b940753795e5e43b8cabcb87f5
Reviewed-on: https://chromium-review.googlesource.com/732189
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
89a69a03
|
2017-10-23T12:20:45
|
|
Generate performance warnings in HLSL translation
Generate performance warnings for some code that undergoes heavy
emulation when translated to HLSL:
1. Dynamic indexing of vectors and matrices.
2. Non-empty fall-through cases in switch/case.
The warnings are generated only when code is translated to HLSL.
Generating them in the parsing stage would add too much maintenance
burden.
Improves switch statement fall-through handling in cases where an
empty fall-through case follows a non-empty one so that extra
performance warnings are not generated.
BUG=angleproject:1116
Change-Id: I7c85d78fe7c4f8e6042bda72ceaaf6e37dadfe6c
Reviewed-on: https://chromium-review.googlesource.com/732986
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
4cd889ec
|
2017-10-20T11:19:57
|
|
Remove unnecessary work from VariablePacker
The VariablePacker does not check the staticUse flag, variables should
be pre-filtered according to their staticUse flag before passing them
to CheckVariablesInPackingLimits if that's desired.
The names of the variables are also not relevant to the packing. We
keep the "name" field to make the code easier to debug, but updating
the mappedName is not useful.
This will make implementing arrays of arrays simpler.
BUG=angleproject:2125
TEST=angle_unittests
Change-Id: I5ce91885f6478ad436e6fa60ca9675e161d10256
Reviewed-on: https://chromium-review.googlesource.com/730104
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
76e471e9
|
2017-10-21T09:56:01
|
|
Vulkan: Implement basic uniforms.
This implementation adds one descriptor set with two bindings: one for
default vertex uniforms and the other for fragment. It adds two
corresponding uniform buffers, and the logic for updating the
descriptor sets bound to Vulkan. It doesn't handle much in the way of
synchronization and dependency management, or uniform update.
If there are only vertex or fragment uniforms the empty uniform buffer
is omitted from the descriptor set. If both are missing, there is no
descriptor set bound.
Note that as our implementation progresses we might not be able to
initialize our descriptor sets at link time, due to streaming in
uniform data.
BUG=angleproject:2167
Change-Id: I4ce4c3879ab454114df43bfac8d87ddf817fc045
Reviewed-on: https://chromium-review.googlesource.com/706340
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
711b7a12
|
2017-10-09T13:38:12
|
|
ES31: Support images in the compiler on D3D backend.
BUG=angleproject:1987
TEST=angle_end2end_tests
Change-Id: I83f5f9ffda7e676a8f98b963d1f1c50e9463faf4
Reviewed-on: https://chromium-review.googlesource.com/706247
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
cbcb96fc
|
2017-10-19T14:14:06
|
|
Fix switch/case last case validation for ESSL 3.10
No statement should be required after the last case label of a switch
statement in ESSL 3.10. The validation is still kept for ESSL 3.00 for
dEQP compatibility. If the dEQP tests are changed in the future, we
might consider just issuing a warning regardless of shader version.
BUG=angleproject:2189
TEST=angle_unittests
Change-Id: Ic53e71e0176668a7dbffa315712885846e217f03
Reviewed-on: https://chromium-review.googlesource.com/727802
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
1bfa6b71
|
2017-10-13T14:07:45
|
|
Generalize GetUniformBlockInfo.
This method is useful for the Vulkan back-end as well as D3D11. It can
produce a uniform block layout for the default uniform blocks as well
as for interface blocks. Put it in blocklayout.h in the translator.
BUG=angleproject:2167
Change-Id: I13160906921da439746c1811a623006250aaeefd
Reviewed-on: https://chromium-review.googlesource.com/713941
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
2d88e9bc
|
2017-07-21T16:52:03
|
|
Guarantee that symbol nodes get unique ids
The code is refactored so that symbol nodes can only be initialized
with an unique id object. This prevents accidentally forgetting to
create an id for a symbol node.
This opens up possibilities for future optimization: For example the
names and types of symbols could be stored in a central location
inside the SymbolTable, and TIntermSymbol nodes would only need to
store the symbol id. The symbol id could be used to look up the name
and type of the node.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: Ib8c8675d31493037a5a28c7b36bb9d1113cc10f6
Reviewed-on: https://chromium-review.googlesource.com/580955
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
40dbdd6c
|
2017-10-13T13:34:19
|
|
Clean up remaining extra semicolons from HLSL output
There are many types of statements after which a semicolon is not
needed. Skip writing the semicolon in HLSL output in these cases to
make the output code more readable.
BUG=angleproject:1013
TEST=angle_end2end_tests
Change-Id: I8f6a5e4ecfe5def456fdf19cca5ca451c13d7f35
Reviewed-on: https://chromium-review.googlesource.com/718420
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f6d242ed
|
2017-10-12T17:21:06
|
|
Wrap switch statements in blocks in HLSL
If variables are declared inside a GLSL switch statement, they are
scoped until the end of the switch statement. This is not compatible
with HLSL rules, where the scoping is until the end of the case. To
work around this, wrap switch statements in a block that declares
the variables in HLSL.
This is done after most other transformations done to the AST are
complete, since some of the other transformations may introduce
temporary variables.
BUG=angleproject:2179
TEST=angle_end2end_tests
Change-Id: Id0bb89affe103177fd3d6a6b2f3619b5e1ada0a6
Reviewed-on: https://chromium-review.googlesource.com/716381
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
4bd730c8
|
2017-10-10T14:14:19
|
|
Recognize more non-fallthrough cases in switch/case
RemoveSwitchFallThrough now treats cases where break; or return; is
nested inside a block as non-fallthrough to avoid unnecessary
duplication of code. For example, the case 1 below would previously
get treated as fall-through:
switch(foo)
{
case 1:
{
break;
}
default:
break;
}
Now RemoveSwitchFallThrough doesn't do anything to this code.
BUG=chromium:772695
TEST=angle_end2end_tests
Change-Id: Iafab6d8b05c63bcdb5f54834dbc1f41192c31dd4
Reviewed-on: https://chromium-review.googlesource.com/709197
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d736cccf
|
2017-10-11T15:08:22
|
|
Add :extra_warnings to all units in BUILD.gn.
Fix resulting warnings.
Change-Id: Ie251012ee01aa484a8c489f9deeec385a50528f9
Reviewed-on: https://chromium-review.googlesource.com/713695
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
56612d6a
|
2017-10-12T15:46:30
|
|
Clean up TIntermTraverse API
Make NodeInsertMultipleEntry private and clarify some comments in
IntermTraverse.h.
BUG=angleproject:2100
TEST=angle_unittests, angle_end2end_tests
Change-Id: Iae60a46714c8b5cb9ad1e9d70aa6776f9deaf3d5
Reviewed-on: https://chromium-review.googlesource.com/715718
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
923ecef6
|
2017-10-11T12:01:38
|
|
Fix switch statement validation corner cases
The grammar needs to generate AST nodes even for no-op statements,
since they might be the last statement in a switch statement that is
required for switch statement validity. Change the grammar to generate
nodes from empty blocks and empty declarations.
We also need to do some further processing of the AST. This is because
PruneEmptyDeclarations will still remove empty declarations, and at
least the NVIDIA driver GLSL compiler doesn't accept some types of
no-op statements as the last statement inside a switch statement. So
after parsing has finished we do rudimentary dead code elimination to
remove dead cases from the end of switch statements.
BUG=angleproject:2181
TEST=angle_unittests
Change-Id: I586f2e4a3ac2171e65f1f0ccb7a7de220e3cc225
Reviewed-on: https://chromium-review.googlesource.com/712574
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
852fe873
|
2017-10-10T15:13:59
|
|
Fix HLSL for switch statements that don't end in a branch
In case the last case inside a switch statement is not terminated in
a branch statement, RemoveSwitchFallThrough needs to add it before
calling handlePreviousCase. This ensures that all preceding
fall-through cases will get a copy of the branch statement and so will
not fall through.
This also fixes running RemoveSwitchFallThrough so that it's only
executed once per each switch statement.
The error was not caught by the dEQP tests, so a new ANGLE test is
added.
BUG=angleproject:2178
TEST=angle_end2end_tests
Change-Id: I26b6989aa4d32de2d74cde56d72ee24f61195445
Reviewed-on: https://chromium-review.googlesource.com/709196
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
78507c6e
|
2017-10-10T15:06:45
|
|
Fix statements disappearing from switch statements in HLSL
RemoveSwitchFallThrough now correctly records the existence of
declaration and swizzle statements inside switch statements.
BUG=angleproject:2177
TEST=angle_end2end_tests
Change-Id: I1ef83997db7ae510ded002a9568c29272c00c2fe
Reviewed-on: https://chromium-review.googlesource.com/709195
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
af5070f7
|
2017-10-10T13:53:25
|
|
Hide RemoveSwitchFallThrough implementation in the .cpp file
This cleans up the API provided by RemoveSwitchFallThrough.h, and adds
documentation about caveats of RemoveSwitchFallThrough. This change is
pure refactoring without any functional changes.
BUG=angleproject:2177
TEST=angle_end2end_tests
Change-Id: I2646e4fe3b53130b07977823cb1344e5096f67e4
Reviewed-on: https://chromium-review.googlesource.com/709194
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
8886f0fc
|
2017-10-10T11:59:45
|
|
Clean redundant semicolons from HLSL branch statements
Branch statements can only exist inside block nodes. The block node
that contains a branch will take care of writing a semicolon after
each statement.
BUG=angleproject:1013
TEST=angle_end2end_tests
Change-Id: Ie5d9077c5d2e090c704282dba39b4d46845cbf1e
Reviewed-on: https://chromium-review.googlesource.com/708894
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
180f43c6
|
2017-10-09T17:00:44
|
|
Refactor creating temporary symbols
This makes creating temporary symbols easy also outside of traversers.
This will be needed for improving variable initialization.
TEST=angle_unittests
BUG=chromium:735497
Change-Id: Id048fc338e0be6c76bb6f082421ae106618e5003
Reviewed-on: https://chromium-review.googlesource.com/707194
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
a3d384ad
|
2017-10-06T16:12:50
|
|
Fix signed integer overflow in GLSL preprocessor left shift
Signed integer overflow is undefined in C++, whereas unsigned integer
overflow is not. Always cast left shift operand to unsigned to avoid
UB.
On common compilers, the behavior was already the same before this
patch, so this patch is done mostly for the benefit of automated fuzz
testing.
BUG=chromium:743136
TEST=angle_unittests
Change-Id: I7aab939036bb19a37f258cef4297b560da3cd9d5
Reviewed-on: https://chromium-review.googlesource.com/704659
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
6276b922
|
2017-09-25T02:35:57
|
|
Vulkan: Implement basic uniform shader parsing.
This is a first step at implementing uniforms with descriptor sets.
It does not actually bind uniforms and upload data, but it does
implement uniform shader parsing. Uniforms are gathered into a single
uniform block which is bound to set 0, with binding 0 for vertex
uniforms and binding 1 for fragment uniforms.
Also adds a ReplaceSubstring helper to string_utils.
Also removes the precision writing from OutputVulkanGLSL since this
was generating warnings with glslang.
BUG=angleproject:2167
Change-Id: I9ec8351ec1973e583100f99292b0080ee968067b
Reviewed-on: https://chromium-review.googlesource.com/699938
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
2a9e107c
|
2017-09-22T11:31:57
|
|
Vulkan: Support multiple vertex outputs.
This is a bit of a hack, similar to how D3D11 works. We need to write
output locations in the GLSL shader before we send them to glslang,
so we wait until the link call, then string-replace some hard-coded
identifeir code to the attribute location determined by ANGLE.
This CL also fills in some of the vertex format conversion tables in
formatutilsvk.cpp.
BUG=angleproject:2167
Change-Id: I2424d0d990bdbcd831a4dd130e61e87d8f8f479f
Reviewed-on: https://chromium-review.googlesource.com/677555
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
4cc89e2b
|
2017-08-31T14:25:54
|
|
ES31: Enable 'location' layout qualifier on shader interfaces in compiler
This patch enables 'location' layout qualifier for vertex outputs and
fragment shader inputs when the shader version is 3.1 in ANGLE GLSL
compiler and adds the check on location conflicts for these varyings.
According to GLSL ES 3.1 SPEC (Chapter 4.4.1 and Chapter 4.4.2),
'location' layout qualifier is allowed on both inputs and outputs of
vertex and fragment shaders.
'location' layout qualifier on shader interfaces is only valid on shaders
whose version is 3.1 and above. According to GLSL ES 3.0 SPEC, vertex shader
cannot have output layout qualifiers (Chapter 4.3.8.2) and fragment shader
cannot have input layout qualifiers (Chapter 4.3.8.1).
The 'location' qualifier on varyings is used in the shader interface
matching defined in OpenGL ES 3.1. (OpenGL ES 3.1 SPEC Chapter 7.4.1). This
new link rule will be added to Program.cpp in another patch.
For the OpenGL ES 3.1 extension GL_OES_geometry_shader, according to
GL_OES_shader_io_blocks SPEC (Chapter 4.4.1 and Chapter 4.4.2), 'location'
layout qualifier is both valid on geometry shader inputs and outputs. This
feature will be implemented together with other rules on geometry shader
inputs and outputs.
BUG=angleproject:2144
TEST=angle_unittests
Change-Id: I62d85f7144c177448321c2db36ed7aaeaa1fb205
Reviewed-on: https://chromium-review.googlesource.com/645366
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
729b2c6e
|
2017-08-14T09:36:11
|
|
ES31: Enable shader storage buffer support for OpenGL backend
BUG=angleproject:1951
TEST=angle_end2end_tests:ShaderStorageBuffer
Change-Id: I1afc3cd005ad2e595c6ce937fc53e17423f8ec8b
Reviewed-on: https://chromium-review.googlesource.com/618132
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
84aa2dcf
|
2017-09-11T15:51:02
|
|
Add textureGather and textureGatherOffset
The patch adds new built-ins and extends the semantic parser to add
support for textureGather and textureGatherOffset.
BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_deqp_gles31_tests.exe
--deqp-case=dEQP-GLES31.functional.texture.gather*
--deqp-egl-display-type=angle-gl
Change-Id: Iaf98c3420fbd61193072fdec8f5a61ac4c574101
Reviewed-on: https://chromium-review.googlesource.com/660124
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
bb5a7e29
|
2017-08-30T13:03:12
|
|
Allow length() on arbitrary array expressions
This is required to pass some dEQP GLES 3.1 tests for arrays of
arrays, and WebGL conformance tests were also recently fixed to
require this behavior. The intent of the GLSL ES spec was not to
restrict usage of length().
In practice GL drivers don't implement array length() on expressions
with side effects correctly in all cases. HLSL doesn't have an array
length operator either. Because of this we always remove array length
ops from the AST before output.
BUG=angleproject:2142
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
Change-Id: I863a92e83ac5315b013af9a5626348482bad72b3
Reviewed-on: https://chromium-review.googlesource.com/643190
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9df395c8
|
2017-09-12T15:19:44
|
|
Include string.h for strncmp in ExtensionBehavior.cpp
BUG=angleproject:2147
Change-Id: I53062a84d48e1c106901a8c32fa49b0148baa344
Reviewed-on: https://chromium-review.googlesource.com/664059
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
a16a84f3
|
2017-09-12T13:49:18
|
|
GLSL: Fix initializing globals declared after main()
Initialize globals in a separate function instead of a block in the
beginning of main(). This way it works also for globals declared after
main().
BUG=chromium:764036
TEST=angle_end2end_tests
Change-Id: I2fcbb97d046589301287757dc3dde5471172a3f6
Reviewed-on: https://chromium-review.googlesource.com/663158
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
5b03f475
|
2017-01-09T10:22:53
|
|
ES31: Implement getMultisamplefv for D3D part.
Implement getMultisamplefv for d3d part.Because standard D3D sample
positions from https://msdn.microsoft.com/en-us/library/windows/
desktop/ff476218.aspx are fixed sample pattern,we put the sample
positions into a constant array in renderer11_utils.cpp with a
function to query it.
BUG=angleproject:1590
TEST=dEQP-GLES31.functional.texture.multisample.samples_*.sample_position
Change-Id: I6e6006ed1c4e22fe006522e9ffd3297247bee75e
Reviewed-on: https://chromium-review.googlesource.com/594970
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2a1e8f95
|
2017-07-14T11:49:36
|
|
Refer to GLSL extensions through TExtension enum
Extensions are now referred to by enum values instead of strings most
of the time. This gets rid of unnecessary copying of strings. The code
is easier to work with than before as typoing the extension enum names
will be caught by the compiler.
BUG=angleproject:2147
TEST=angle_unittests
Change-Id: Ifa61b9f86ef03211188fc23bc23a5ce4e4d8c390
Reviewed-on: https://chromium-review.googlesource.com/571002
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ec3a9cbb
|
2017-09-07T12:18:01
|
|
Only support GL_OVR_multiview extension variant
The WebGL spec proposal was changed so that only GL_OVR_multiview
extension name is supported, instead of having two variants
OVR_multiview and OVR_multiview2. We're only supporting the WebGL
version of the shader extension, so we drop compiler support for
GL_OVR_multiview2. Shader restrictions were also removed from the
WebGL spec, so no special validation for how ViewID_OVR gets used is
needed.
Tests that were testing for the shader restrictions are either removed
or changed from negative tests to positive tests.
BUG=angleproject:1669
TEST=angle_unittests
Change-Id: I83f92b879376d41b727b5aca419fd75fb6f53477
Reviewed-on: https://chromium-review.googlesource.com/654608
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
15c3406a
|
2017-09-07T17:10:09
|
|
Restructure InstanceID initialization to fix HLSL warning
This patch casts gl_InstanceID to uint before doing division by the
number of views to circumvent the HLSL compiler's warning on performance
degradation.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: I326530ee112f34f82becdec5239edd5054c4104f
Reviewed-on: https://chromium-review.googlesource.com/655298
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
72b4e1e5
|
2017-08-31T15:42:56
|
|
D3D11: Add support for multiview layered rendering
A branch is added in the geometry shader to select either the
viewport, or texture layer which is being rendered to based on the
value of a uniform in the driver constant buffer. Using this approach
there is no need for separate programs for side-by-side and layered
rendering.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: I66701164ff02a851c13695d5409f8ad350534e69
Reviewed-on: https://chromium-review.googlesource.com/645547
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
f00f7ffe
|
2017-08-31T14:39:15
|
|
Add a Uniform type info table.
Currently most uniform type info is determined by switching on the
uniform type. Some values are computed from other values, which can
result in three or more switch statements plus some multiplies or
other math. This patch attempts to improve the speed by pre computing
necessary values into constant static tables.
Improves performance by about 7% in a uniform stress test.
BUG=angleproject:1390
Change-Id: I29bef259a17f6d6536171ade4950e2d712bfd39c
Reviewed-on: https://chromium-review.googlesource.com/643791
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
bb2bbfbb
|
2017-08-24T15:43:33
|
|
Refactor GLSL array length method parsing
This prepares for accepting arbitrary expressions as the "this" node
of the array length method.
BUG=angleproject:2142
TEST=angle_unittests
Change-Id: I728adb6e76d2779dedbabfaeec7d096872e0d00d
Reviewed-on: https://chromium-review.googlesource.com/633945
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
c634a637
|
2017-05-18T14:09:49
|
|
Remove webgl_ prefix from emulated function names
The prefix is unnecessary now that user-defined names are prefixed in
both GLSL and HLSL output. Removing the prefix makes compiler output
a bit simpler to read.
BUG=angleproject:2038
TEST=angle_unittests
Change-Id: I9ffc508f50d6146a2d85798875c88e2c385b83fe
Reviewed-on: https://chromium-review.googlesource.com/508730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|