{"push_id":841549966,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"7535b761dd4740c8e76b888d7c58c7cbeefd2083","before":"a33475b36f7b069f3aa8cab4e72c2d8eb9693e08","commits":[{"sha":"7535b761dd4740c8e76b888d7c58c7cbeefd2083","author":{"email":"38ae6c0e2772a20e8e989f80cb8c99d274e44242@nvidia.com","name":"Olli Etuaho"},"message":"Remove dynamic indexing of matrices and vectors in HLSL\n\nRe-re-landing with fix to setting qualifiers on generated nodes. The\nprevious version failed when a uniform was indexed, because it would\nset the uniform qualifier on some of the generated nodes and that\ninterfered with the operation of UniformsHLSL.\n\nRe-landing after fixing D3D9 specific issues.\n\nHLSL doesn't support dynamic indexing of matrices and vectors, so replace\nthat with helper functions that unroll dynamic indexing into switch/case\nand static indexing.\n\nBoth the indexed vector/matrix expression and the index may have side\neffects, and these will be evaluated correctly. If necessary, index\nexpressions that have side effects will be written to a temporary\nvariable that will replace the index.\n\nBesides dEQP tests, this change is tested by a WebGL 2 conformance test.\n\nIn the case that a dynamic index is out-of-range, the base ESSL 3.00 spec\nallows undefined behavior. KHR_robust_buffer_access_behavior adds the\nrequirement that program termination should not occur and that\nout-of-range reads must return either a value from the active program's\nmemory or zero, and out-of-range writes should only affect the active\nprogram's memory or do nothing. This patch clamps out-of-range indices so\nthat either the first or last item of the matrix/vector is accessed.\n\nThe code is not transformed in case the it fits within the limited subset\nof ESSL 1.00 given in Appendix A of the spec. If the code isn't within\nthe restricted subset, even ESSL 1.00 shaders may require this\nworkaround.\n\nBUG=angleproject:1116\nTEST=dEQP-GLES3.functional.shaders.indexing.* (all pass after change)\n     WebGL 2 conformance tests (glsl3/vector-dynamic-indexing.html)\n\nChange-Id: I16119f9092360fb72798f9550a6f4d3cfffdc92f\nReviewed-on: https://chromium-review.googlesource.com/308790\nReviewed-by: Zhenyao Mo <zmo@chromium.org>\nTested-by: Zhenyao Mo <zmo@chromium.org>","distinct":true,"url":"https://api.github.com/repos/google/angle/commits/7535b761dd4740c8e76b888d7c58c7cbeefd2083"}]}