|
73941deb
|
2015-02-25T14:34:49
|
|
Disable the HLSL code in Angle if it is not being used.
We're only using the HLSL code in Windows so
it's not necessary to compile and distribute it on other platforms.
This adds a defined ANGLE_ENABLE_HLSL that can be checked in files that
are used by non-HLSL code as well. Mostly the HLSL code is just not
include by the build system.
Details of the space savings (heavily truncated)
Total change: -165717 bytes
===========================
-606 - Source: angle/src/common/utilities.cpp
-627 - Source: angle/src/compiler/translator/FlagStd140Structs.cpp
-695 - Source: /usr/include/c++/4.8/bits/stl_algo.h
-710 - Source: angle/src/compiler/translator/TranslatorHLSL.cpp
-713 - Source: angle/src/compiler/translator/IntermNode.h
-863 - Source: /usr/include/c++/4.8/bits/stl_map.h
-935 - Source: angle/src/compiler/translator/blocklayout.cpp
-1515 - Source: angle/src/compiler/translator/BuiltInFunctionEmulator.cpp
-1655 - Source: angle/src/compiler/translator/UnfoldShortCircuit.cpp
-2375 - Source: /usr/include/c++/4.8/bits/vector.tcc
-3135 - Source: angle/src/compiler/translator/RewriteElseBlocks.cpp
-4656 - Source: angle/src/compiler/translator/UtilsHLSL.cpp
-5265 - Source: angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp
-6505 - Source: /usr/include/c++/4.8/bits/stl_tree.h
-11480 - Source: angle/src/compiler/translator/UniformHLSL.cpp
-13580 - Source: angle/src/compiler/translator/StructureHLSL.cpp
-18964 - Source: ??
(constant strings and a few vtbls)
-89332 - Source: angle/src/compiler/translator/OutputHLSL.cpp
Change-Id: I23ccc98abd0a21f847dd34f9482800b3ba679d56
Reviewed-on: https://chromium-review.googlesource.com/251528
Tested-by: bratell at Opera <bratell@opera.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a3a5cc6a
|
2015-02-13T13:12:22
|
|
Expose the IntermNode tree generated in the compiler for testing
This refactoring makes it possible for tests to access the IntermNode
tree produced by compilation by calling compileTree(). Removing
ParseContext usage from OutputHLSL has the additional benefit of better
separation between parsing and output.
BUG=angle:916
Change-Id: Ib40954832316328772a5c1dcbbe6b46b238e4e65
Reviewed-on: https://chromium-review.googlesource.com/249723
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
9e0478f6
|
2015-01-13T11:13:54
|
|
Move the block layout code to translator.
This code is easily accessible from the translator, with the proper
export calls. This facilitates adding a common static library, since
this code calls some methods in translator.
BUG=angle:773
Change-Id: I0c50098ec3f67c2df7749b3c2518be0a9fd939e2
Reviewed-on: https://chromium-review.googlesource.com/240093
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
f2575989
|
2014-06-25T16:04:54
|
|
Use the sh namespace for shader variables.
Since these types originate from the translator, use an appropriate
namespace. Also rename some of the gl helper functions to be more
specific to their functionality.
BUG=angle:466
Change-Id: Idc29987b2053b3c40748dd46b581f3dbd8a6fd61
Reviewed-on: https://chromium-review.googlesource.com/204680
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
f91ce811
|
2014-06-13T10:04:34
|
|
Split OutputHLSL uniform code into new module.
Refactoring patch only, should have no externally visible changes.
BUG=angle:466
Change-Id: I01088a3b2979b96702d0a3c424d26928eb72b5b2
Reviewed-on: https://chromium-review.googlesource.com/203731
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|