-
Fixed sampler within struct uniform used as function argument · d87b3a85Alexis Hetu authored
The sampler was simply not declared in that case, as if the uniform was unused in the shader, so making sure structures containing samplers call samplerRegister solves this issue. It was working properly if the sampler was used anywhere else in the shader, but failed when the only use in the shader was being passed as an argument to a function through a containing structure. Added a unit test since this isn't covered by dEQP. Fixes 2 WebGL tests: conformance/glsl/bugs/sampler-array-struct-function-arg.html conformance/glsl/bugs/sampler-struct-function-arg.html Change-Id: I81767d7c6415de7aefefecffcc66265d944a94ab Reviewed-on: https://swiftshader-review.googlesource.com/18628Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
d87b3a85
×