src/compiler/translator/OutputHLSL.cpp


Log

Author Commit Date CI Message
Arun Patole 6341939f 2015-03-13T11:51:07 Fix code duplication in OutputHLSL While debugging, I came across the piece of code in OutputHLSL::OutputHLSL which is unnecessarily duplicated, this change just fixes it. Change-Id: I0549d58696417ccf651bacfa19f489b290d4ba6e Reviewed-on: https://chromium-review.googlesource.com/259960 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Arun Patole 44efa0b8 2015-03-04T17:11:05 Conditionally enable IEEE strictness for isnan() ANGLE's ESSL3 built-in function isnan() implementation just uses HLSL intrinsic function isnan(). For HLSL intrinsic function isnan() to work properly, IEEE strictness needs to be enabled for D3D compiler. This change detects use of isnan() in shaders and passes compiler flag D3DCOMPILE_IEEE_STRICTNESS whenever isnan is used in shaders. This change also moves existing workarounds in D3DWorkaroundType to D3DCompilerWorkarounds. BUG=angle:927 TEST= dEQP tests dEQP-GLES3.functional.shaders.builtin_functions.common.isnan.* Change-Id: I1ce5b1a7a825fdd720a37dc9aeb71320e55162d9 Reviewed-on: https://chromium-review.googlesource.com/255834 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho fc7fab72 2015-03-06T12:03:18 Fix matrix compound multiplication Matrix compound multiplication was lacking transposes. Add them so that results match normal multiplication. BUG=angleproject:938 TEST=dEQP-GLES3.functional.shaders.matrix.mul_assign.* Change-Id: I4c5159de0727afb4ee2831586f04fa817619de7a Reviewed-on: https://chromium-review.googlesource.com/256366 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho 8efc5ad5 2015-03-03T17:21:10 Initialize BuiltInFunctionEmulator outside Compiler This moves GLSL output specific code from the Compiler class to the GLSL/ESSL translators. BUG=angleproject:865 Change-Id: I2d552e9cdb41f7d8ddfee7b0249a99d629a6d7d7 Reviewed-on: https://chromium-review.googlesource.com/255471 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 95cd3c68 2015-03-03T16:45:32 Move some output out of BuiltInFunctionEmulator subclasses This paves the way for getting rid of the BuiltInFunctionEmulator subclasses in favor of initializing the BuiltInFunctionEmulator dynamically in Compiler subclasses. The eventual goal is getting rid of GLSL output specific functionality in Compiler, which should be language-agnostic. BUG=angle:865 Change-Id: Ibb114b905785c7343b2726c97699268c982536a0 Reviewed-on: https://chromium-review.googlesource.com/255470 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Qingqing Deng 5dbece59 2015-02-27T20:35:38 Implement trunc, round, roundEven (Emulated roundEven) BUG=angle:934 Change-Id: If33256bf3707f3f0202147276c71f08c65518205 Reviewed-on: https://chromium-review.googlesource.com/254842 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 2cd7a0ed 2015-02-27T13:57:32 Remove switch fall-through on HLSL Remove fall-through from non-empty labels in switch statements. Tested with dEQP-GLES3.functional.shaders.*switch*. All pass except for tests that require dFdx/dFdy, which fail for an unrelated reason. Additional test coverage could still be useful for cases where a label is terminated by a continue or return statement. BUG=angle:921 Change-Id: I4741867789a9308d66d0adeabdaf83907106e2d2 Reviewed-on: https://chromium-review.googlesource.com/254550 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho 05ae50dc 2015-02-20T10:16:47 Add basic support for HLSL output of switch and case This patch outputs switch and case statements in HLSL, but ignores fall-through. Switch statements that include fall-through cause the platform HLSL compiler to generate errors. BUG=angle:921 Change-Id: I10efbfb45076cf4fd79840698abafd8111e597d4 Reviewed-on: https://chromium-review.googlesource.com/251527 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Gregoire Payen de La Garanderie 5cc9ac85 2015-02-20T11:27:56 Fix shadow samplers with textureProj and vertex shaders. Fixes: dEQP-GLES3.functional.shaders.texture_functions.textureproj.sampler2dshadow_fragment dEQP-GLES3.functional.shaders.texture_functions.textureproj.sampler2dshadow_bias_fragment dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.sampler2dshadow_fragment dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.sampler2dshadow_bias_fragment and some of: dEQP-GLES3.functional.shaders.texture_functions.texture*.sampler2dshadow_vertex BUG=angle:925 Change-Id: I080e379ded95469f0486ae9c8bb1756842118a2d Reviewed-on: https://chromium-review.googlesource.com/251530 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 3c1dfb5a 2015-02-20T11:34:03 Add stubs for switch and case output BUG=angle:921 Change-Id: I58bd645a8d53ef5bad9b680e54c8948d50932fca Reviewed-on: https://chromium-review.googlesource.com/251525 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Daniel Bratell 29190088 2015-02-20T16:42:54 Make Angle code 40 KB smaller by using string literals directly. The implicit conversion of hundreds of string literals to TString generated a lot of machine code. By keeping them as string literals all the way the code will be smaller and faster. This is the change with clang for x64 (note VisitUnary in particular): Total change: -41392 bytes ========================== 2 added, totalling +469 bytes across 1 sources 2 removed, totalling -472 bytes across 1 sources 5 shrunk, for a net change of -41389 bytes (54126 bytes before, 12737 bytes after) across 1 sources 279692 unchanged, totalling 51433327 bytes ------------------------------------------------------------------------------------------------------------------------------------ -41392 - Source: /home/bratell/src/chromium/src/third_party/angle/src/compiler/translator/OutputHLSL.cpp - (gained 469, lost 41861) ------------------------------------------------------------------------------------------------------------------------------------ New symbols: +328: sh::OutputHLSL::outputConstructor(Visit, TType const&, char const*, TVector<TIntermNode*> const*) type=t, size=328 bytes +141: sh::OutputHLSL::outputTriplet(Visit, char const*, char const*, char const*) type=t, size=141 bytes Removed symbols: -133: sh::OutputHLSL::outputTriplet(Visit, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&) type=t, size=133 bytes -339: sh::OutputHLSL::outputConstructor(Visit, TType const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, TVector<TIntermNode*> const*) type=t, size=339 bytes Shrunk symbols: -388: sh::OutputHLSL::writeEmulatedFunctionTriplet(Visit, char const*) type=t, (was 628 bytes, now 240 bytes) -714: sh::OutputHLSL::visitBranch(Visit, TIntermBranch*) type=t, (was 1017 bytes, now 303 bytes) -9738: sh::OutputHLSL::visitAggregate(Visit, TIntermAggregate*) type=t, (was 17609 bytes, now 7871 bytes) -14132: sh::OutputHLSL::visitBinary(Visit, TIntermBinary*) type=t, (was 17627 bytes, now 3495 bytes) -16417: sh::OutputHLSL::visitUnary(Visit, TIntermUnary*) type=t, (was 17245 bytes, now 828 bytes) Change-Id: Id0f87d72f6d7f1ab7b543f0d28d5a8b7c7db9ec7 Reviewed-on: https://chromium-review.googlesource.com/251090 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: bratell at Opera <bratell@opera.com>
Olli Etuaho b6e07a6a 2015-02-16T12:22:10 Implement ESSL3 modf This is the first built-in function that has an out parameter, so l-value checks are added for built-ins. BUG=angle:918 Change-Id: Ifd5befe955224f706f864e25107879c9cdce9e9f Reviewed-on: https://chromium-review.googlesource.com/250780 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Arun Patole 0c1726e6 2015-02-18T14:35:02 Implement isnan/isinf This change adds ANGLE support for isnan/isinf. BUG=angle:922 TEST=dEQP tests: dEQP-GLES3.functional.shaders.builtin_functions.common.isnan.* (high precision tests still fail) Tests passing 100% because of this change: dEQP-GLES3.functional.shaders.builtin_functions.common.isinf.* Reduced number of errors in tests: EQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.isnan.* dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.common.isinf_* Change-Id: I52bf18b59365ea7031746ae840550162d7e6b96e Reviewed-on: https://chromium-review.googlesource.com/250761 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Nicolas Capens <capn@chromium.org>
Olli Etuaho 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>
Olli Etuaho ff805cc3 2015-02-13T10:59:34 Separate integer and float modulus Integer and float modulus are separated into Mod and IMod operator types to make the code clearer and to make GetOperatorString return the correct value for both. Change-Id: Ibfbca2c558bf919b0eab6404d7349f87fe47a18c Reviewed-on: https://chromium-review.googlesource.com/249692 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 55e79e09 2015-02-09T15:35:00 Implement equality ops for nested structs. This fixes the WebGL test glsl_misc_struct_equals as well as several dEQP tests in functional.shaders.struct. BUG=391957 BUG=angle:910 Change-Id: I09f3cd3f51bbc3541b64dbcfddfe01884ddba6f5 Reviewed-on: https://chromium-review.googlesource.com/247083 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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>
Jamie Madill 37997145 2015-01-28T10:06:34 Defer dependent HLSL global var inits. Some global initializers depend on other globals, for instance a varying or attribute value. Since we use a static proxy variable for these varyings, we need to initialize the global static after we initialize the proxy in the shader preamble. This fixes a long- standing compiler bug. We should also add a WebGL test for this. BUG=angle:878 Change-Id: I71db103a6b8c24fb862e0d8b32293da9bc2e8103 Reviewed-on: https://chromium-review.googlesource.com/243581 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 32aab01d 2015-01-27T14:12:26 Use a stack for OutputHLSL info log output. Previously we would always reference mBody in several intermediate output methods. This made using these traversals from within the header, or for utility methods, very difficult. Instead, use a stack where we write to the top InfoLog, and can push/pop from the stack. This gives us more flexibility. BUG=angle:878 Change-Id: I8a6c0382bad18b44d75158274c701db13d4d4e65 Reviewed-on: https://chromium-review.googlesource.com/243580 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cooper Partin e6664f06 2015-01-09T16:22:24 Added PointSprites Support for renderers that do not support Geometry Shaders Change-Id: Iae9ac5f8fbba68dba5e49ccda7bb7eebb05c8e9a Reviewed-on: https://chromium-review.googlesource.com/240450 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 31b5fc62 2015-01-16T12:13:36 Add support for bitwise operations in ESSL3 Add support for <<, >>, &, |, ^, and their compound assignment variants <<=, >>=, &=, |=, ^=. Also add support for bitwise not (~). BUG=angle:870 Change-Id: I5e6a835409589556d5d58d58078fdf505cfd8da5 Reviewed-on: https://chromium-review.googlesource.com/241850 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 7700ff65 2015-01-15T12:16:29 Add basic support for ESSL3 vec2 (un)pack functions The functions are emulated on HLSL, and use the native functions on OpenGL 4.2+ and GLES3.0. Emulation for OpenGL versions <= 4.1 is not yet implemented. BUG=angle:865 Change-Id: I6803a1767dacdb3dca12f13924651fd38fcacb75 Reviewed-on: https://chromium-review.googlesource.com/240961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho abf6dadd 2015-01-14T14:45:16 Implement matrix inverse built-in Inverse is emulated in HLSL by calculating the cofactor matrix and dividing that with the determinant. This results in the transpose of the inverse as is required. Better performing options might exist especially for 4x4 matrices, but this is enough for a working implementation. BUG=angle:859 Change-Id: I5185797cc1ed86865f5f4342707abdc2977a186b Reviewed-on: https://chromium-review.googlesource.com/240331 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 80a5a6c6 2015-01-12T15:35:27 Clean up BuiltInFunctionEmulator public interface This removes all language-specific bits from BuiltInFunctionEmulator parent class, and makes the public interface of BuiltInFunctionEmulator minimal. Writing comments around emulated function definitions is removed from OutputHLSL, they are not necessary as the emulated function definitions are just another part of the shader header. Change-Id: I9abf57d86f4e37b0674d7dfafe653298f205dd27 Reviewed-on: https://chromium-review.googlesource.com/240230 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho e39706d0 2014-12-30T16:40:36 Implement simple ESSL3 matrix functions Add support for built-in functions outerProduct, determinant, transpose and the variations of matrixCompMult that were previously unsupported. BUG=angle:859 Change-Id: Ie2b9cf83cd80c5a886c6d4eb190c7ce25a32d0a4 Reviewed-on: https://chromium-review.googlesource.com/239873 Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho e17e3197 2015-01-02T12:47:59 Use BuiltInFunctionEmulatorHLSL for all emulated functions Implementation of missing built-in functions is a separate concern from outputting the intermediate tree itself as HLSL, so it makes sense to have all of the built-in emulation in a class that is separate from OutputHLSL. Being able to reuse the same logic for different emulated functions also makes the code more compact. Change-Id: Id503dc3a5c5e743ec65722add56d6ba216a03a7f Reviewed-on: https://chromium-review.googlesource.com/239872 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 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>
Olli Etuaho 5c9cd3d1 2014-12-18T13:04:25 Implement hyperbolic function support for ESSL 3.00 Emulating arc hyperbolic functions is required on HLSL, where they do not exist natively. For this, BuiltInFunctionEmulator is split into GLSL and HLSL subclasses. The GLSL subclass handles the pre-existing built-in emulation implemented for working around OSX bugs, and the HLSL subclass handles emulating asinh, acosh and atanh on HLSL. BUG=angle:855 Change-Id: I0dfeffb862ac27ba7f9ecf5492ec31d9d952b273 Reviewed-on: https://chromium-review.googlesource.com/236861 Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho e8d2c072 2015-01-08T16:33:54 Implement float-integer conversions for ESSL 3.00 The implementation uses asint, asuint and asfloat in the HLSL output. BUG=angle:865 Change-Id: I6b48298e18c7b3b0bdeac522b375ebc4eab7cf4e Reviewed-on: https://chromium-review.googlesource.com/239520 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Austin Kinross 4fd18b1b 2014-12-22T12:32:05 Emulate large and negative viewports on D3D11 Feature Level 9_3 Like D3D9, D3D11 Feature Level 9_3 doesn't support large or negative viewports. We have to emulate these in the vertex shader. BUG=angle:858 Change-Id: I2bd53e3921dc3590cc7193164d73596deafca9ea Reviewed-on: https://chromium-review.googlesource.com/236040 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Gregoire Payen de La Garanderie be954a23 2014-12-23T00:05:28 Implement support for the binary operator '%' in the translator. BUG=angle:854 Change-Id: If116de132dc83d93255749b54c1919a75abcb65c Reviewed-on: https://chromium-review.googlesource.com/236330 Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 80bacde5 2014-11-10T12:07:37 Use the [[flatten]] attribute only when a loop is present. Flattening branch-heavy shaders that contained no loops caused regressions. As a temporary workaround we only flatten ifs when there exists a loop. BUG=395048 Change-Id: I95c40f0249643b98c62304a0f2a4563561d1fbbc Reviewed-on: https://chromium-review.googlesource.com/228722 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 76acee83 2014-11-04T13:44:03 Name mangle function prototypes and print them in interm output This patch changes function prototype handling so that they get assigned the same kind of a mangled name as function definitions and function calls. This name is now also printed in interm output so that function prototypes can be accurately identified in the interm output. BUG=angle:821 TEST=compiler_tests Change-Id: Ia150b8ac5b816b8096c964767cd8666bdee28539 Reviewed-on: https://chromium-review.googlesource.com/227390 Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Nicolas Capens 5e0c80ad 2014-10-10T10:11:54 Use attributes to avoid unrolling and flatten conditionals. [loop] and [flatten] help avoid unrolling make more shaders compile successfully. When unrolling has to happen, an error X3531 is generated so we have to try compiling again without these attributes. BUG=395048,395286 Change-Id: I91ea8ac3a822ab1f1ac24907d42326e3c6c9d9af Reviewed-on: https://chromium-review.googlesource.com/222810 Tested-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo de1e00e1 2014-10-09T16:55:32 Implement support of unary operator "+" in translator. BUG=angle:779 TEST=conformance/glsl/misc/struct-unary-operators.html Change-Id: Ia827e07dcfc8ad3bbbc078e54336815be9027945 Reviewed-on: https://chromium-review.googlesource.com/222720 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Nicolas Capens fa41aa08 2014-10-06T17:40:13 Perform short-circuit unfolding on separate declarations. BUG=415694 Change-Id: I812abb21d2ab4af0b63631a23026d5860df61672 Reviewed-on: https://chromium-review.googlesource.com/221945 Tested-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Nicolas Capens d974db43 2014-10-07T10:50:19 Split combined declarations into separate statements. BUG=415694 Change-Id: I7afb08a8a5ed10bbc6f7d23638daca6982f7c88b Reviewed-on: https://chromium-review.googlesource.com/221455 Tested-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
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 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>
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 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>
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 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 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 4cfb1e89 2014-07-07T12:49:23 Add a new TIntermRaw node type to translator. This raw node stores text strings that we directly copy to the output. This allows for more tricky substitutions that don't fit in to the HLSL/GLSL shared parsing model. BUG=346463 BUG=391697 Change-Id: Ibbde6db4fc98ef6d892f219631ca1a258a902a86 Reviewed-on: https://chromium-review.googlesource.com/206823 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
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>
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>
Jamie Madill 8daaba15 2014-06-13T10:04:33 Split OutputHLSL structure code into new module. Refactoring patch only. BUG=angle:466 Change-Id: I2c57096e1e24574e7de3d35d608645fde3b0c681 Reviewed-on: https://chromium-review.googlesource.com/203730 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Jamie Madill 033dae67 2014-06-18T12:56:28 Move OutputHLSL utility methods to other files. OutputHLSL was become a large, unweildy file. Some were also useful to other classes, even on the GL back-end, but were inacessible. Refactoring patch only. BUG=angle:466 Change-Id: Id216147122ca105c6ccdf0ba0c5f6c5038726965 Reviewed-on: https://chromium-review.googlesource.com/203459 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2bf8b372 2014-06-16T17:18:51 Fix link error when using varyings with "dx_". Varyings beginning with "dx_" would not get decorated properly, or at all, which could cause potential internal variables and certainly caused link errors. Fix this by no longer treating the "dx_" prefix differently. Also fix our naming of "dx_Position" to be consistent with our other internal types. BUG=angle:678 Change-Id: I03da0494a3d934d82ae7b3f8f12a576ff9bc3869 Reviewed-on: https://chromium-review.googlesource.com/203777 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens 2a59292d 2014-06-11T16:22:57 Implement support for constructing a 2x2 matrix from a vector. BUG=380353 Change-Id: Ica0b94104e39f87b4a3439df40221b1f682fd678 Reviewed-on: https://chromium-review.googlesource.com/203293 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Nicolas Capens 16004fca 2014-06-11T11:29:11 Eliminate conversion operations. They've been replaced by using constructor nodes, so any code handling conversion operators can be removed. BUG=380353 Change-Id: I70413179e7443efccbf997a5dd0f053c23689589 Reviewed-on: https://chromium-review.googlesource.com/203453 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3891fd27 2014-06-13T10:04:30 Add a std140 padding helper class. Using a helper class keeps our main parser stateless as we define std140 structs which need padding. The only functional change should be that we no longer use a global counter for struct padding hidden variables, but a local padding per-struct. BUG=angle:466 Change-Id: I8b92d65884b86571c8b2f052b0cba6150a4bbab0 Reviewed-on: https://chromium-review.googlesource.com/202911 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Nicolas Capens 1af18dc9 2014-06-11T11:07:32 Create constructors just once. BUG=380353 Change-Id: I9828a3f193ccfdda2013fa3de0e41e6e28953ea2 Reviewed-on: https://chromium-review.googlesource.com/203451 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens f7f7616b 2014-06-06T15:48:21 Fix constructing vectors from matrices. BUG=380353 Change-Id: I3b0fe55b829602554bb63bbd281ad58d47364502 Reviewed-on: https://chromium-review.googlesource.com/202966 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Jamie Madill 80ebce59 2014-06-06T11:54:12 Store the std140 layout offsets in a pre-pass. Instead of recording data and mutating a local table as we parse, store all of the offsets for the std140 structs when we first generate the struct. This should have no behavioural change, as structs should always be defined first in any case. BUG=angle:466 Change-Id: I1b732d67bd4f5b908211410e5e7796d72d836174 Reviewed-on: https://chromium-review.googlesource.com/202910 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill bfa91f47 2014-06-05T15:45:18 Redesign HLSL scoped structures to a unique ID. A unique ID gives a more flexible renaming scheme than our current method of using nested scope identifiers. The reduced complexity allows for fewer points of breakage and fixes an outstanding bug with scoped structures (with added test). BUG=angle:618 Change-Id: I6551248bb9fa2d185ab67248721f898dd50151f0 Reviewed-on: https://chromium-review.googlesource.com/202183 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 96509e47 2014-05-29T14:33:27 Fix edge case scoped structures name conflict. Structures with names ending in "_#" such as "_0" could conflict with the internally rewritten scoped structures. Fix this by using a prepending rule instead of appending. Also includes a test, and fixes a WebGL test in Firefox. (Chrome is not affected because of the variable hashing step.) BUG=angle:618 Change-Id: I3d441f1de268b6d7e74a0834b43e889b7bfe578c Reviewed-on: https://chromium-review.googlesource.com/201468 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Vladimir Vukicevic 24d8d675 2014-05-27T12:07:51 Fix register packing for structs in d3d9. Fixes WebGL test misc/shader-with-array-of-structs-uniform BUG=angle:656 Change-Id: If79a19db4d40bab9110422f7876de32e7f85e506 Reviewed-on: https://chromium-review.googlesource.com/200620 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Geoff Lang 5f5320a9 2014-05-26T13:56:11 Use 'inout' qualifiers in generated HLSL for 'out' parameters. With our added padding to some structures, using only 'out' in the generated HLSL can cause warnings because not all of the structure members are initialized. BUG=angle:286 Change-Id: I866960883de487f19883fb2bc086c02703ea6271 Reviewed-on: https://chromium-review.googlesource.com/201364 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 17a0e632 2014-04-25T11:29:54 Fix scoped structure references. We had neglected to reference scope bracket values when initially constructing the scoped struct name. Fixes the new WebGL test. BUG=angle:618 Change-Id: Ie78a8264c9e16c5a6574cecd662adbd5475d6495 Reviewed-on: https://chromium-review.googlesource.com/197252 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 10567260 2014-04-17T16:40:00 Fix build with Clang. Clang's validation is a bit more thorough than GCC's or MSVC's and picked up a few new errors and warnings. We missed a few default cases in switches and used an improper type for default arguments. BUG=angle:568 Change-Id: I34239c6c5c785ad1e62917fc37c3243f4c5b5f1b Reviewed-on: https://chromium-review.googlesource.com/195472 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 834e8b77 2014-04-11T13:33:58 Move ShaderVariables to common shared source. Also move the block layout encoding utilities to the common folder. The combined changes allow us to include the shader and block code into both libGLESv2 and the translator separately. This in turn fixes the Chromium component build, where we were calling internal translator functions directly from libGLESv2. BUG=angle:568 Change-Id: Ibcfa2c936a7c737ad515c10bd24061ff39ee5747 Reviewed-on: https://chromium-review.googlesource.com/192891 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens 46485086 2014-04-15T13:12:50 Implement EXT_shader_texture_lod BUG=angle:551 Change-Id: I81d7574a15861f1b24ddf6147cf71adbf20e10f3 Reviewed-on: https://chromium-review.googlesource.com/194960 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Nicolas Capens 04296f85 2014-04-14T14:24:38 Fix comparing TextureFunction structures. Test each field for smaller or larger than, and when they're equal test the next field. BUG=angle:605 Change-Id: I2c5a90d95c7ff73b83f3067381c14b74a213ef05 Reviewed-on: https://chromium-review.googlesource.com/194602 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Nicolas Capens 84cfa124 2014-04-14T13:48:45 Fix Lod0 texture functions that take a bias parameter. Texture functions that are in a divergent path can still take a bias parameter. Treat the bias parameter as an explicit lod. The logic behind this is that the implicit lod is considerd to be 0 like with other Lod0 functions, and then the bias is added to it. BUG=angle:604 Change-Id: I2dbc309c497d37e960209f08849f9d2bc9e1fbcc Reviewed-on: https://chromium-review.googlesource.com/194544 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang cebb5aa0 2014-04-07T14:13:40 Fix warnings about unreferenced local variables. BUG=angleproject:602 Change-Id: I2eb04fe6eed60b3877b14628e81c0b1fe3b68647 Reviewed-on: https://chromium-review.googlesource.com/193431 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Nicolas Capens 655fe36e 2014-04-11T13:12:34 Use shader optimization level 3 selectively. Default to HLSL compiler optimization level 1 and work around a compiler bug with break in nested loops by using optimization level 3. BUG=angle:603 Change-Id: I4f7985a5648f1b5f54d80554c21aced7fc1777c2 Reviewed-on: https://chromium-review.googlesource.com/194129 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Nicolas Capens 0027fa9f 2014-02-20T14:26:42 Emulate integer cube texture sampling as an array of six 2D textures. BUG=angle:525 Change-Id: I3c3ec2cecebf9e745f0c02a132433e3076a6fdea Reviewed-on: https://chromium-review.googlesource.com/187534 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens f7378e38 2014-02-19T17:29:32 Implement textureProjGrad and textureProjGradOffset. BUG=angle:564 Change-Id: Ice6a3715b0fda13324b3162940de875c932627c9 Reviewed-on: https://chromium-review.googlesource.com/186992 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens bf7db103 2014-02-19T17:20:28 Implement textureGradOffset. BUG=angle:564 Change-Id: Iad0e452f53469208d55755e14a350b5d2ca83e9d Reviewed-on: https://chromium-review.googlesource.com/186987 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens d11d549f 2014-02-19T17:06:10 Implement textureGrad. BUG=angle:564 Change-Id: I95dcd95a274f6d560250c197be0d6e64a5b23516 Reviewed-on: https://chromium-review.googlesource.com/187081 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens fc01454b 2014-02-18T14:47:13 Implement texelFetch and texelFetchOffset. BUG=angle:564 Change-Id: I7ad3484061f5d6912d7842bdadc6297de3e82ef8 Reviewed-on: https://chromium-review.googlesource.com/186990 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens 2adc256a 2014-02-14T23:50:59 Implement textureProjLod and textureProjLodOffset. BUG=angle:564 Change-Id: I547c69908d0aa1809f844a50230bc019e6dd5893 Reviewed-on: https://chromium-review.googlesource.com/186685 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Nicolas Capens df86c6b9 2014-02-14T20:09:17 Implement textureProjOffset and textureLodOffset. BUG=angle:564 Change-Id: I647abed0609afd178d2e9522f139d25dd3c7fda4 Reviewed-on: https://chromium-review.googlesource.com/186684 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill e53c98ba 2014-02-03T11:57:13 Add work-around for D3D9 shader compiler bug. With certain selection statements with a vertex input in the condition and side-effects in the else-block, we'd run in to a D3D9 compiler bug which would cause incorrect results. We can work around this bug in D3D9 by selectively rewriting these statements to use an 'else if' clause instead of 'else'. BUG=322794 Change-Id: I93c96fb201ff4959c00d9a36321faac7e0343278 Reviewed-on: https://chromium-review.googlesource.com/184681 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens b1f45b70 2013-12-19T17:37:19 Create HLSL texture offset functions. BUG=angle:541 Change-Id: I63dd47c40d693724aa6bed93e9967e3b1f8535bd Reviewed-on: https://chromium-review.googlesource.com/181521 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 79bb0d9e 2013-12-09T16:20:28 Fix initializer type bug when using list declarations. We were using the first type as the type for each declaration, which could cause erros for arrays, eg "float one[4], two;" BUG=angle:431 TEST=WebGL CTS 1.0.2 Change-Id: I104d6701cc019ae3b3831a2d568ffe2b656b45a2 Reviewed-on: https://chromium-review.googlesource.com/179351 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Jamie Madill 3c9eeb97 2013-11-04T11:09:26 Disable optimizations for shaders with conditional discard in D3D9, and only use expanded short-circuiting conditionals for expressions with potential side-effects. Conservatively assume aggreate and selection operators have side effects for now. BUG= ANGLEBUG=486 R=geofflang@chromium.org, kbr@chromium.org, nicolas@transgaming.com, shannonwoods@chromium.org Review URL: https://codereview.appspot.com/14441075 Conflicts: src/common/version.h src/compiler/translator.vcxproj src/compiler/translator.vcxproj.filters src/compiler/translator/OutputHLSL.cpp src/libGLESv2/ProgramBinary.cpp src/libGLESv2/Shader.cpp src/libGLESv2/Shader.h Change-Id: Iaf9f10b5de7b33c927ef032f3c4fe9d5095f64dd
Jamie Madill 03847b6d 2013-11-13T19:42:39 Fix the shader calculation for the level of detail for certain samplers. We were using an extra sqrt function for some cases. TRAC #23591 Change-Id: I7d5d2b4b78586085396a281daf7975be316a1386 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang
Jamie Madill 829f59e9 2013-11-13T19:40:54 Remove usages of the auto keyword from the translator. TRAC #22875 Change-Id: I3ecf30843a82962fbfa5c38f026425fa8acf4657 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
Geoff Lang 036aa49b 2013-10-09T16:23:30 Disable warnings about size_t conversion and fix ambiguous template parameters in 64 bit builds. TRAC #23409 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
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.