Commit 814a54dd by Olli Etuaho

Force index/loop validation on the D3D9 backend

D3D9 shader models have limited support for looping, so the Appendix A index/loop limitations are necessary. This is consistent with applying the limitations on D3D9_3 feature level and lower of the D3D11 backend too. Also, when the limitations are not in place, a workaround for dynamic indexing of vectors and matrices will be applied. This workaround does not work on the D3D9 backend, as demonstrated with some WebGL conformance failures caused by it in Chrome on D3D9. BUG=525188 TEST=angle_end2end_tests Change-Id: I6411594f067f2740f55d7560427026b23b15dac7 Reviewed-on: https://chromium-review.googlesource.com/296940Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
parent a0a9e12d
...@@ -567,6 +567,11 @@ void GenerateCaps(IDirect3D9 *d3d9, ...@@ -567,6 +567,11 @@ void GenerateCaps(IDirect3D9 *d3d9,
// D3D9 has no concept of separate masks and refs for front and back faces in the depth stencil // D3D9 has no concept of separate masks and refs for front and back faces in the depth stencil
// state. // state.
limitations->noSeparateStencilRefsAndMasks = true; limitations->noSeparateStencilRefsAndMasks = true;
// D3D9 shader models have limited support for looping, so the Appendix A
// index/loop limitations are necessary. Workarounds that are needed to
// support dynamic indexing of vectors on HLSL also don't work on D3D9.
limitations->shadersRequireIndexedLoopValidation = true;
} }
} }
......
...@@ -1095,7 +1095,7 @@ TEST_P(GLSLTest, LoopIndexingValidation) ...@@ -1095,7 +1095,7 @@ TEST_P(GLSLTest, LoopIndexingValidation)
// If the test is configured to run limited to Feature Level 9_3, then it is // If the test is configured to run limited to Feature Level 9_3, then it is
// assumed that shader compilation will fail with an expected error message containing // assumed that shader compilation will fail with an expected error message containing
// "Loop index cannot be compared with non-constant expression" // "Loop index cannot be compared with non-constant expression"
if ((GetParam() == ES2_D3D11_FL9_3())) if ((GetParam() == ES2_D3D11_FL9_3() || GetParam() == ES2_D3D9()))
{ {
if (compileResult != 0) if (compileResult != 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment