Commit Graph
88 Commits
Author SHA1 Message Date
Geoff Lang c56297597f Implement full program binary support for ES3.
Refactor validation to be used in both the OES and ES3 entry points.

BUG=angleproject:600
BUG=angleproject:1101

Change-Id: I2008c4ea04ce07910f03ae0b997f8a77b66203d8
Reviewed-on: https://chromium-review.googlesource.com/316620
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-12-08 17:58:14 +00:00
Jamie Madill 28afae5d41 Rename LinkedVarying to D3DVarying.
Also move this type to D3D-only world. It was only used in the D3D
renderer and has specific stuff like register/semantic indexes.

Refactoring patch to clean up further work with Varyings.

BUG=angleproject:1202

Change-Id: I4b1d6899e9eef356efc7d11e9cd6cf88b234aa76
Reviewed-on: https://chromium-review.googlesource.com/311240
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-10 19:01:58 +00:00
Jamie Madill c4c74422bd ES3: Don't validate precision qualifiers when linking UBOs.
According to the resolution of Khonos bug 10287, we shouldn't be
validating these precisions. Note that this is counter to the
current ESSL spec text, but there's an open action item to change
the spec language.

TEST=dEQP-GLES3.functional.shaders.linkage.uniform.block.differing_precision
BUG=angleproject:1088

Change-Id: Ib05dca792b89e57e90d3a5f9efdb3a202230f585
Reviewed-on: https://chromium-review.googlesource.com/310760
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-06 19:21:30 +00:00
Geoff Lang 1a6834602b Implement TransformFeedbackGL.
Reland with supression for TransformFeedbackTest.MultiContext on Linux
AMD.

BUG=angleproject:889

Change-Id: I6f2a2e856dacf16308de222dd0936bedbb3b175c
Reviewed-on: https://chromium-review.googlesource.com/307871
Tryjob-Request: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-22 14:50:02 +00:00
Geoff Lang a9ca8e2025 Revert "Implement TransformFeedbackGL."
Failing on AMD Linux bots.

This reverts commit a9c5288192.

Change-Id: I2a2db8c3d96c4b927d7d784486c6df772ae63084
Reviewed-on: https://chromium-review.googlesource.com/308130
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-22 14:34:31 +00:00
Geoff Lang a9c5288192 Implement TransformFeedbackGL.
BUG=angleproject:889

Change-Id: I347ac21cfd0a56654a75fb41ac24c6c67ede3a05
Reviewed-on: https://chromium-review.googlesource.com/302351
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tryjob-Request: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-22 13:56:47 +00:00
Austin Kinross 7a3e8e24e7 Don't include samplers in uniform vector count validation
Change-Id: Id2820643b70d3266c82eb10a5f05d3a5886e9323
Reviewed-on: https://chromium-review.googlesource.com/304871
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tryjob-Request: Jamie Madill <[email protected]>
Tested-by: Austin Kinross <[email protected]>
2015-10-15 14:20:43 +00:00
Brandon Jones 1048ea7546 Made program binaries cache information needed for getTransformFeedbackVarying
BUG=angleproject:1173
Change-Id: Ib8883b32f54f5d38fb94e85decae2dcee108facf
Reviewed-on: https://chromium-review.googlesource.com/304381
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Brandon Jones <[email protected]>
2015-10-09 18:54:14 +00:00
Jamie Madill 4a3c2341fd Program: Clean up UBO info gathering.
The data size & block member info was getting messy, so clean up
how we query this from the Impl layer.

Also remove the register information from gl::UniformBlock, moving
it into the D3D-only world.

BUG=angleproject:1172

Change-Id: I40af658ebbd6b7c1a4251906a387ebcbb621cf77
Reviewed-on: https://chromium-review.googlesource.com/304150
Reviewed-by: Corentin Wallez <[email protected]>
Tryjob-Request: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-09 16:43:56 +00:00
Geoff Lang e1a277510f Make more gl::Program methods const.
BUG=angleproject:1123

Change-Id: Ib48c523538322871a0deec7ba6497c8797967ef1
Reviewed-on: https://chromium-review.googlesource.com/303305
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-05 17:34:26 +00:00
Geoff Lang c46cc2f3c8 Remove ProgramImpl::getBinaryFormat.
Because we only expose GL_ANGLE_program_binary, we're only allowed to use
the GL_PROGRAM_BINARY_ANGLE binary type.  This should be enforced at the
GL level.  If implementations wish to use multiple types of formats
internally, they are able to by writing those enums to their binaries.

BUG=angleproject:882
BUG=angleproject:1123

Change-Id: I43685958814e4333b7cef3952d92c1017dc885f8
Reviewed-on: https://chromium-review.googlesource.com/303827
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-02 14:53:22 +00:00
Geoff Lang 5d124a69b6 Support UBOs in RendererGL and ProgramGL.
Reland: fix compile warnings on Windows.

BUG=angleproject:882
BUG=angleproject:883

Change-Id: If4844d50d43ff9b765f64606e8f08d65a1afd9a4
Reviewed-on: https://chromium-review.googlesource.com/303431
Tryjob-Request: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-01 18:29:32 +00:00
Geoff Lang cf2dbd9133 Revert "Support UBOs in RendererGL and ProgramGL."
Compile error.

This reverts commit 97d82b724b.

Change-Id: I71ae10cb01b8ded0297eaf4742fb1098ce02a9bb
Reviewed-on: https://chromium-review.googlesource.com/303303
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-01 15:48:33 +00:00
Geoff Lang 97d82b724b Support UBOs in RendererGL and ProgramGL.
BUG=angleproject:882
BUG=angleproject:883

Change-Id: I36f8ef42d87e289658a6ba4899380bc72b9bcebf
Reviewed-on: https://chromium-review.googlesource.com/299871
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-01 15:16:54 +00:00
Jamie Madill 3d3d2f20fe Re-re-land "Move sampler validation to the GL layer."
This previously was D3D-only, but is required for every draw call.
This completes the work of removing the D3D-specific Impl methods
from ProgramImpl.

Also add several regression tests to cover texture and sampler
validation.

Re-land with a fix for duplicate sampler active uniforms.

Re-re-land with a fix for a test comparison warning on Linux.

BUG=angleproject:1123

Change-Id: Iaf7b33861c07b9ceed4bd53ac2f010d35f05df45
Reviewed-on: https://chromium-review.googlesource.com/301712
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-24 18:31:15 +00:00
Jamie Madill 6d2465106f Revert "Re-land "Move sampler validation to the GL layer.""
Build failure on Linux:

In file included from ../../third_party/angle/src/tests/gl_tests/UniformTest.cpp:7:
In file included from ../../third_party/angle/src/tests/test_utils/ANGLETest.h:10:
../../testing/gtest/include/gtest/gtest.h:1392:16: error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare]
  if (expected == actual) {
      ~~~~~~~~ ^  ~~~~~~
../../testing/gtest/include/gtest/gtest.h:1422:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here
    return CmpHelperEQ(expected_expression, actual_expression, expected,
           ^
../../third_party/angle/src/tests/gl_tests/UniformTest.cpp:487:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here
    EXPECT_EQ(GL_SAMPLER_2D, type);
    ^

BUG=angleproject:1123

This reverts commit 6cbf438528.

Change-Id: I95279b37d253e3ea78faa53f3773f2dc3d17df95
Reviewed-on: https://chromium-review.googlesource.com/302030
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-23 18:04:34 +00:00
Jamie Madill 6cbf438528 Re-land "Move sampler validation to the GL layer."
This previously was D3D-only, but is required for every draw call.
This completes the work of removing the D3D-specific Impl methods
from ProgramImpl.

Also add several regression tests to cover texture and sampler
validation.

Re-land with a fix for duplicate sampler active uniforms.

BUG=angleproject:1123

Change-Id: Iefef06e7901873c98bf2ba7864efd16a4c6435d3
Reviewed-on: https://chromium-review.googlesource.com/301581
Tryjob-Request: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-09-23 14:39:06 +00:00
Jamie Madill 3aa23a7c5a Revert "Move sampler validation to the GL layer."
Probably causing failures in the dEQP-GLES2 GL back-end tests:

dEQP-GLES2.functional.uniform_api.info_query.basic.sampler2D_both

BUG=angleproject:1123

This reverts commit 6fa156b66d.

Change-Id: I3cc993c34aae4a108037ce81709b71d16ece814e
Reviewed-on: https://chromium-review.googlesource.com/301580
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-22 19:03:46 +00:00
Jamie Madill 6fa156b66d Move sampler validation to the GL layer.
This previously was D3D-only, but is required for every draw call.
This completes the work of removing the D3D-specific Impl methods
from ProgramImpl.

Also add several regression tests to cover texture and sampler
validation.

BUG=angleproject:1123

Change-Id: I167cbc8f47b4a397d2ae6cc507bdac35168bcacd
Reviewed-on: https://chromium-review.googlesource.com/299400
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-22 17:51:06 +00:00
Jamie Madill 62d31cb616 Re^6-land "Move Uniform and UBO info to the gl::Program layer."
This data was previously stored entirely in the Impl level. Move
as much as possible to the GL level, using a read-only view in the
Impl level. Some information in D3D-specific, and should be stored
separately in the Impl.

This patch has a lot of refactoring that splits the D3D and GL info,
and moves as much validation as possible to the GL layer, where it
is shared between the back-ends.

Re-land with fix for dEQP unused uniforms. The fix involves storing
a local copy of all uniform data in the GL layer. This will also
let us validate sampler indexes during draw calls at the GL layer.

Re-re-land with a fix for multiply defined symbols on Clang.

Re-re-re-land with a fix for boolean uniforms and Uniform{1234}f.

Re^4-land with a fix for boolean uniform arrays and UBO uniforms.

Re^5-land with a fix for a test warning on Linux.

Re^6-land with a fix for transposed matrix uniform arrays.

BUG=angleproject:1123
TEST=end2end_tests, bots, dEQP GLES3.ubo and GLES2.uniform_api

Change-Id: Ie6fcde1c16eb05d67191b629338b88302a2563f5
Reviewed-on: https://chromium-review.googlesource.com/298971
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-11 18:20:08 +00:00
Jamie Madill fb53603cab Revert "Re^5-land "Move Uniform and UBO info to the gl::Program layer.""
Failing dEQP-GLES3.functional.uniform_api.random.22 and 23:
There's a bug with arrays of tranpsosed matrix uniforms.

BUG=angleproject:1123

This reverts commit 78d356929b.

Change-Id: If39b5908af39671dfe98965e6a1ba77fd18ea8fc
Reviewed-on: https://chromium-review.googlesource.com/299320
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-11 17:22:21 +00:00
Jamie Madill 78d356929b Re^5-land "Move Uniform and UBO info to the gl::Program layer."
This data was previously stored entirely in the Impl level. Move
as much as possible to the GL level, using a read-only view in the
Impl level. Some information in D3D-specific, and should be stored
separately in the Impl.

This patch has a lot of refactoring that splits the D3D and GL info,
and moves as much validation as possible to the GL layer, where it
is shared between the back-ends.

Re-land with fix for dEQP unused uniforms. The fix involves storing
a local copy of all uniform data in the GL layer. This will also
let us validate sampler indexes during draw calls at the GL layer.

Re-re-land with a fix for multiply defined symbols on Clang.

Re-re-re-land with a fix for boolean uniforms and Uniform{1234}f.

Re^4-land with a fix for boolean uniform arrays and UBO uniforms.

Re^5-land with a fix for a test warning on Linux.

BUG=angleproject:1123
TEST=end2end_tests, bots, dEQP GLES3.ubo and GLES2.uniform_api

Change-Id: I03afcd446d9e74573c4d4c712ed7407b91d8001c
Reviewed-on: https://chromium-review.googlesource.com/299180
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-11 12:43:02 +00:00
Jamie Madill a2eb02c916 Revert "Re^4-land "Move Uniform and UBO info to the gl::Program layer.""
Test has a warning on Linux:

In file included from ../../third_party/angle/src/tests/test_utils/ANGLETest.h:13:
../../testing/gtest/include/gtest/gtest.h:1392:16: error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare]
  if (expected == actual) {
      ~~~~~~~~ ^  ~~~~~~
../../testing/gtest/include/gtest/gtest.h:1422:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here
    return CmpHelperEQ(expected_expression, actual_expression, expected,
           ^
../../third_party/angle/src/tests/gl_tests/UniformBufferTest.cpp:357:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here
    EXPECT_EQ(GL_FLOAT, type);
    ^

BUG=angleproject:1123

This reverts commit 2ae1ee6161.

Change-Id: Ic3dabea54068377d1f2c5f722ba52966cf1a0491
Reviewed-on: https://chromium-review.googlesource.com/299170
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-11 12:32:09 +00:00
Jamie Madill 2ae1ee6161 Re^4-land "Move Uniform and UBO info to the gl::Program layer."
This data was previously stored entirely in the Impl level. Move
as much as possible to the GL level, using a read-only view in the
Impl level. Some information in D3D-specific, and should be stored
separately in the Impl.

This patch has a lot of refactoring that splits the D3D and GL info,
and moves as much validation as possible to the GL layer, where it
is shared between the back-ends.

Re-land with fix for dEQP unused uniforms. The fix involves storing
a local copy of all uniform data in the GL layer. This will also
let us validate sampler indexes during draw calls at the GL layer.

Re-re-land with a fix for multiply defined symbols on Clang.

Re-re-re-land with a fix for boolean uniforms and Uniform{1234}f.

Re^4-land with a fix for boolean uniform arrays and UBO uniforms.

BUG=angleproject:1123
TEST=end2end_tests, bots, dEQP GLES3.ubo and GLES2.uniform_api

Change-Id: I4c9f5ed31b81380507bef7981f97086d642801ae
Reviewed-on: https://chromium-review.googlesource.com/298451
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-11 11:55:55 +00:00
Jamie Madill 61b8dd9734 Revert "Re-re-re-land "Move Uniform and UBO info to the gl::Program layer.""
Seems to be failing the dEQP-GLES2.functional.uniform_api tests relating to boolean arrays.

BUG=angleproject:1123

This reverts commit 892a6a4b17.

Change-Id: Ifc4ce3ca806ef88a02ac6f693334ac37ce098a88
Reviewed-on: https://chromium-review.googlesource.com/298520
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-09 19:04:21 +00:00
Jamie Madill 892a6a4b17 Re-re-re-land "Move Uniform and UBO info to the gl::Program layer."
This data was previously stored entirely in the Impl level. Move
as much as possible to the GL level, using a read-only view in the
Impl level. Some information in D3D-specific, and should be stored
separately in the Impl.

This patch has a lot of refactoring that splits the D3D and GL info,
and moves as much validation as possible to the GL layer, where it
is shared between the back-ends.

Re-land with fix for dEQP unused uniforms. The fix involves storing
a local copy of all uniform data in the GL layer. This will also
let us validate sampler indexes during draw calls at the GL layer.

Re-re-land with a fix for multiply defined symbols on Clang.

Re-re-re-land with a fix for boolean uniforms and Uniform{1234}f.

BUG=angleproject:1123
TEST=end2end_tests,Canary WebGL (D3D11/GL), dEQP-GLES2+3.functional.uniform_api

Change-Id: Ia40820a5ce2f34ec2d27648b1dc940a8955e9999
Reviewed-on: https://chromium-review.googlesource.com/298440
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-09 18:14:24 +00:00
Jamie Madill b654f659ce Revert "Re-re-land "Move Uniform and UBO info to the gl::Program layer.""
Failes the gles2_conform_test:

GLES2ConformTest.GL2Tests_glGetUniform_input_run

Possibly also WebGL failures, will investigate.

BUG=angleproject:1123

This reverts commit 10750cb936.

Change-Id: I1ae59325e1831589019bc5a27ffc2091d3994a65
Reviewed-on: https://chromium-review.googlesource.com/298200
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-08 20:40:47 +00:00
Jamie Madill 10750cb936 Re-re-land "Move Uniform and UBO info to the gl::Program layer."
This data was previously stored entirely in the Impl level. Move
as much as possible to the GL level, using a read-only view in the
Impl level. Some information in D3D-specific, and should be stored
separately in the Impl.

This patch has a lot of refactoring that splits the D3D and GL info,
and moves as much validation as possible to the GL layer, where it
is shared between the back-ends.

Re-land with fix for dEQP unused uniforms. The fix involves storing
a local copy of all uniform data in the GL layer. This will also
let us validate sampler indexes during draw calls at the GL layer.

Re-re-land with a fix for multiply defined symbols on Clang.

BUG=angleproject:1123
TEST=end2end_tests,Canary WebGL (D3D11/GL), dEQP-GLES2+3.functional.uniform_api

Change-Id: I7b55e4964fbe64e0106c37928c894146937a2476
Reviewed-on: https://chromium-review.googlesource.com/298110
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-08 19:59:46 +00:00
Jamie Madill 2119dd050f Revert "Re-land "Move Uniform and UBO info to the gl::Program layer.""
Problems with multiply defined symbols in the Linux builder.

BUG=angleproject:1123

This reverts commit ff1abe63c3.

Change-Id: Ifcb2ad885d0841c128ffd69afb6594e37eba17fc
Reviewed-on: https://chromium-review.googlesource.com/298100
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-08 19:30:58 +00:00
Jamie Madill ff1abe63c3 Re-land "Move Uniform and UBO info to the gl::Program layer."
This data was previously stored entirely in the Impl level. Move
as much as possible to the GL level, using a read-only view in the
Impl level. Some information in D3D-specific, and should be stored
separately in the Impl.

This patch has a lot of refactoring that splits the D3D and GL info,
and moves as much validation as possible to the GL layer, where it
is shared between the back-ends.

Re-land with fix for dEQP unused uniforms. The fix involves storing
a local copy of all uniform data in the GL layer. This will also
let us validate sampler indexes during draw calls at the GL layer.

BUG=angleproject:1123
TEST=end2end_tests,Canary WebGL (D3D11/GL), dEQP-GLES2+3.functional.uniform_api

Change-Id: I9074c057c2c67d4d3221ec11c5556a26e07c7ceb
Reviewed-on: https://chromium-review.googlesource.com/297070
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-08 18:59:52 +00:00
Jamie Madill a0a9e12ded translator: Add sh::OutputVariable type.
This replaces the dual-use of sh::Attribute, which can be a bit
confusing to people expecting a literal output variable.

Currently not used in Chromium, so should be safe to land.

BUG=angleproject:1146

Change-Id: I436f2bc9dc4ddc3709369cb2baa344c6b13a21a2
Reviewed-on: https://chromium-review.googlesource.com/296683
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-02 21:04:35 +00:00
Jamie Madill 48705cad3f Revert "Move Uniform and UBO info to the gl::Program layer."
Seems to be failing dEQP-GLES2.functional.uniform_api.value.unused_uniforms.* on Linux (possibly Win as well)

BUG=angleproject:1123

This reverts commit 54f882c916.

Change-Id: I7dbbf40aae8dd9ebd35895df0dd338a3b6b9cc96
Reviewed-on: https://chromium-review.googlesource.com/297051
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-02 20:41:08 +00:00
Jamie Madill 54f882c916 Move Uniform and UBO info to the gl::Program layer.
This data was previously stored entirely in the Impl level. Move
as much as possible to the GL level, using a read-only view in the
Impl level. Some information in D3D-specific, and should be stored
separately in the Impl.

This patch has a lot of refactoring that splits the D3D and GL info,
and moves as much validation as possible to the GL layer, where it
is shared between the back-ends.

BUG=angleproject:1123
TEST=end2end_tests,Canary WebGL (D3D11/GL), dEQP-GLES2+3.functional.uniform_api

Change-Id: I8b7e1380a61590a46ccee646a47ffe9bda287f6b
Reviewed-on: https://chromium-review.googlesource.com/295124
Reviewed-by: Geoff Lang <[email protected]>
Tryjob-Request: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-02 19:31:07 +00:00
Jamie Madill f5f4ad2412 Revert "Revert "Clean up interface to ProgramImpl::link.""
Should be fixed now with the fix the prior CL.

BUG=angleproject:1123

This reverts commit 63069dfc20.

Change-Id: Ie1826673820e3a24f9bb3e4ff5c723ac47570041
Reviewed-on: https://chromium-review.googlesource.com/297050
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-02 18:33:06 +00:00
Jamie Madill 63069dfc20 Revert "Clean up interface to ProgramImpl::link."
Probably causing bot failures in a prior dependent patch.

BUG=angleproject:1123

This reverts commit b83592750d.

Change-Id: I7642c4a66b190dda49cbb16611abc893f3eb6422
Reviewed-on: https://chromium-review.googlesource.com/296700
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-01 17:27:07 +00:00
Jamie Madill 89bb70e912 Mark TF Feedback array element capture as unsupported.
According to dEQP this is an undefined section of the spec. Mark it as
unsupported for now until we can investgate if it's possible on
certain platforms.

Noticed this when testing with the Program refactor.

BUG=angleproject:1123
TEST=dEQP-GLES3.functional.transform_feedback.array_element.*

Change-Id: I830dddf418e28fb4536f09500f4069def1d97b58
Reviewed-on: https://chromium-review.googlesource.com/295984
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-01 14:14:36 +00:00
Jamie Madill b83592750d Clean up interface to ProgramImpl::link.
We no longer need to pass mutable shaders with the changed to packed
varyings.

BUG=angleproject:1123

Change-Id: I0a4bbf5d770ff48e10e3de2146840d8987b1e826
Reviewed-on: https://chromium-review.googlesource.com/295194
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-09-01 12:39:53 +00:00
Jamie Madill 4cff247745 Make PackedVarying a D3D-only type.
The register assignment stuff only applies to the D3D back-end.
Cleans up the GL back-ends use of PackedVarying, and will lead
to future cleanups relating to packing varyings.

BUG=angleproject:1123

Change-Id: Iaaa5fc03577e5b61ea6ae76ee1e15ad608037f34
Reviewed-on: https://chromium-review.googlesource.com/295190
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-26 13:52:17 +00:00
Olli Etuaho 401d9fe642 Fix debug build on Linux
Compiling an assert in Program.cpp was failing at least on GCC 4.8
because it compared unsigned size_t to zero, a comparison that was always
true. The C standard defines size_t as unsigned, so the assert shouldn't
be necessary on other platforms either.

There was already a commit on top of the patch that added the bug, so it
is simpler to fix the problem by changing the assert rather than
reverting.

TEST=standalone debug build on Linux

Change-Id: Ifd910332a770f7360a15c31706beca740d0f289d
Reviewed-on: https://chromium-review.googlesource.com/294971
Reviewed-by: Olli Etuaho <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2015-08-26 07:49:16 +00:00
Jamie Madill 80a6fc0305 Make output variables part of Program's shared data.
Also initialize this structure within Program instead of DynamicHLSL.
This should have benefits for other back-ends. Also these variables
weren't being serialized and de-serialized with the program binary,
which could mess up WebGL apps that use MRT.

BUG=angleproject:1123

Change-Id: Ic0dd4840f26441a1bee8527dfa178b24daf82f8a
Reviewed-on: https://chromium-review.googlesource.com/294571
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-25 19:40:04 +00:00
Jamie Madill 63805b47c2 Make the Program's semantic index D3D-only.
This concept isn't strictly necessary for GL-side validation. Instead
we can use a bitset to track active attribs, and determine is a
particular location is active.

BUG=angleproject:1123

Change-Id: If7a920a3071672116bafffb3368671f721723b65
Reviewed-on: https://chromium-review.googlesource.com/294570
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-25 19:38:59 +00:00
Geoff Lang 1528e56b27 Bind native GL attributes to match the locations in gl::Program.
Simplifies a lot of logic when we don't have to maintain mappings between
the driver and gl-layer locations.

BUG=angleproject:882
BUG=angleproject:1123

Change-Id: Ia94257a322f768fdfa3167000a46a0715820ef4d
Reviewed-on: https://chromium-review.googlesource.com/295231
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-08-24 19:34:55 +00:00
Jamie Madill c349ec0304 Re-land "Move shader attributes into Program shared data."
Re-land with a fix for a warning in 32-bit Windows.

Making the Program own the attribs, and the Impl only see a read-only
copy cleans up the Impl object. It also allows us to more cleanly
isolate certain coded into D3D.

BUG=angleproject:1123

Change-Id: I73bda4b6d9e675d87d087d44757c598437d607f2
Reviewed-on: https://chromium-review.googlesource.com/295191
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-24 14:18:58 +00:00
Jamie Madill 4e10722d40 Revert "Move shader attributes into Program shared data."
Once again a signed/unsigned mismatch warning in 32-bit.

src\libangle\renderer\gl\programgl.cpp(190) : warning C4018: '<' : signed/unsigned mismatch

BUG=angleproject:1123
This reverts commit 2d77318387.

Change-Id: Icd26906ead1eaa06b4bd3ff7fc2b10bef4f46022
Reviewed-on: https://chromium-review.googlesource.com/295241
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-24 14:12:34 +00:00
Jamie Madill 2d77318387 Move shader attributes into Program shared data.
Making the Program own the attribs, and the Impl only see a read-only
copy cleans up the Impl object. It also allows us to more cleanly
isolate certain coded into D3D.

BUG=angleproject:1123

Change-Id: I469051eb066fc56e55282affa2d5398b394ab8d2
Reviewed-on: https://chromium-review.googlesource.com/293826
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2015-08-24 12:28:45 +00:00
Jamie Madill 36cfd6a305 Clean up Program::validate.
This method should really be an Impl method, since it corresponds to
a specific OpenGL call. Making it an Impl method also allows us to
remove applyUniforms, which doesn't correspond to a GL call.

BUG=angleproject:1123

Change-Id: I2abee3cfaa7393cad44566782d51ed701e84846b
Reviewed-on: https://chromium-review.googlesource.com/293825
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-21 20:50:57 +00:00
Jamie Madill d1fe1646bd Move UBO bindings into Program shared state.
Sharing the bindings with the Impl (read-only) allows us to clean out
the applyUniformBuffers method from the Impl class, and make it D3D-
only.

BUG=angleproject:1123

Change-Id: Icb51a90cb227bbbdd83319ea308b68aa1c4c325e
Reviewed-on: https://chromium-review.googlesource.com/293824
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-21 20:27:03 +00:00
Jamie Madill 72f39c1598 Make more Program sampler methods D3D-only.
Several of these methods that deal with the sampler mapping can be
made D3D-only quite simply by casting to ProgramD3D in the Renderer.

BUG=angleproject:1123

Change-Id: Ia6648d26744f9aa69a4a0facb356209df471fa7b
Reviewed-on: https://chromium-review.googlesource.com/293823
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-21 20:24:37 +00:00
Jamie Madill 5c42266e3a Make Program::usesPointSize D3D-only.
This test is only used in the D3D code, so we can remove this Impl
method. If we need it in the future we can always support it more
generally from the translator, or handle it differently on each
Renderer.

BUG=angleproject:1123

Change-Id: Ic4a22ad6cec93726195e68200fc25cc2956be44c
Reviewed-on: https://chromium-review.googlesource.com/293822
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-19 18:28:55 +00:00
Jamie Madill 31c8c56a0f Make ProgramImpl::compileProgramExecutables D3D-only.
Finally we can isolate this method into the D3D-only code, and
remove the interface from ProgramImpl.

BUG=angleproject:1123

Change-Id: I253b15d44d4cf8bbb5dbeaa78bbcc431a5267bf7
Reviewed-on: https://chromium-review.googlesource.com/293765
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-08-19 18:28:07 +00:00