src/compiler/translator/VariableInfo.cpp


Log

Author Commit Date CI Message
Gregoire Payen de La Garanderie b3dced29 2015-01-12T14:54:55 Implementing gl_InstanceID in the HLSL compiler. Fixes: dEQP-GLES3.functional.instanced.draw_arrays_instanced.instance_id dEQP-GLES3.functional.instanced.draw_arrays_instanced.mixed dEQP-GLES3.functional.instanced.draw_elements_instanced.instance_id dEQP-GLES3.functional.instanced.draw_elements_instanced.mixed BUG=angle:601 Change-Id: I6e120eebc90d00e025fc58f096064e6ed1da826b Reviewed-on: https://chromium-review.googlesource.com/246911 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Erik Dahlström 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>
Zhenyao Mo 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>
Zhenyao Mo 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Zhenyao Mo 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Dan Glastonbury b66feb31 2014-05-14T15:38:55 Handle interface blocks in getVariableInfo and getUserDefinedVariableInfo. BUG=angle:654 Change-Id: I07a230bbf2387e85168c50cb3719c669a7890f8a Reviewed-on: https://chromium-review.googlesource.com/199687 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Zhenyao Mo 3cdfcce8 2014-03-07T13:00:08 Remove SH_MAP_LONG_VARIABLE_NAMES We use hashing to map all variables/strcuture field names, etc, so we no longer need this option. Checked with Firefox and WebKit, they no longer use this option either. Time to remove it. Change-Id: Ie3e79b91a05258b04af419a9c42b2fd1b00e67c4 Reviewed-on: https://chromium-review.googlesource.com/189236 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/189568
Zhenyao Mo 4a667fe9 2014-02-11T12:35:01 Add an option to initialize varyings without static use in vertex shaders ANGLEBUG=554 TEST=webgl conformance test on mac: shaders-with-varyings.html r=kbr@chromium.org,nicolascapens@chromium.org cc=alokp@chromium.org,shannonwoods@chromium.org Change-Id: I2e692d43fb15f1cf3ade3e398020d1fedb2b32f0 Reviewed-on: https://chromium-review.googlesource.com/185922 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org> Conflicts: src/common/version.h src/compiler/translator/Compiler.cpp Change-Id: If7db13ef345bd6199d4ea0d7786f0de20885f2f3 Reviewed-on: https://chromium-review.googlesource.com/186144 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Geoff Lang 17732823 2013-08-29T13:46:49 Moved the compiler source files into directories based on their project and added a compiler.gypi to generate the compiler projects.