src/compiler/translator/UniformHLSL.cpp


Log

Author Commit Date CI Message
Shannon Woods 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
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 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>
Jamie Madill 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>
Jamie Madill 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>