Commit de62b251 by Qin Jiajia Committed by Commit Bot

Make sure the queried resources are active

In GLES 3.1 spec, sesion 7.3.1 program interfaces, it says that 'Resources referenced in shader code are considered active unless the compiler and linker can conclusively determine that they have no observable effect on the results produced by the executable code of the program.'. Variables might be considered inactive if they are used only in computations of temporary variables having no effect on any shader output. So we should use atomicCounterIncrement instead of atomicCounter in case the resources are marked as inactive on some platforms. Bug: angleproject:5494 Change-Id: Ic04bd4a2936e97776fc680b5ef8273f0944d7480 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2605917Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
parent 47ee6a7b
...@@ -1067,9 +1067,9 @@ layout(binding = 0) uniform atomic_uint ac2; ...@@ -1067,9 +1067,9 @@ layout(binding = 0) uniform atomic_uint ac2;
void main() void main()
{ {
atomicCounter(acbase); atomicCounterIncrement(acbase);
atomicCounter(ac[0]); atomicCounterIncrement(ac[0]);
atomicCounter(ac2); atomicCounterIncrement(ac2);
})"; })";
ANGLE_GL_COMPUTE_PROGRAM(program, kCSSource); ANGLE_GL_COMPUTE_PROGRAM(program, kCSSource);
......
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