If the maximum workgroup size in each dimension is large enough, this
can overflow, causing the comparison to fail. For example, on Intel
Haswell, we get:
assert(2048 * 2048 * 2048 > 2048) -> assert(0 > 2048) -> fail
Casting one value to deInt64 causes the multiplications to occur as
64-bit values, so we don't overflow.
Affects:
dEQP-GLES31.functional.debug.negative_coverage.*.compute.invalid_maximum_work_group_sizes
Components: AOSP
Change-Id: Ie03627a378f4fdc46ce241bbdd3693ae829c217d
ctx.glGetIntegerv(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, &maxWorkGroupInvocations);
ctx.expectError(GL_NO_ERROR);
- DE_ASSERT((maxWorkGroupSizeX * maxWorkGroupSizeY * maxWorkGroupSizeZ) > maxWorkGroupInvocations );
+ DE_ASSERT(((deInt64) maxWorkGroupSizeX * maxWorkGroupSizeY * maxWorkGroupSizeZ) > maxWorkGroupInvocations );
const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
const char* const shaderVersion = isES32