Commit a4ef843f by Qin Jiajia Committed by Commit Bot

ES31: Fix incorrect error code in DispatchComputeIndirect

INVALID_VALUE error should be generated not INVALID_OPERATION if indirect is not a multiple of the size, in basic machine units, of uint. Meanwhile, we put the validation of indirect before indirect buffer so that the corresponding deqp cases can pass. BUG=angleproject:2324 Change-Id: I223ec1893a6dd613f84e51a98f02d5f79482952f Reviewed-on: https://chromium-review.googlesource.com/929900Reviewed-by: 's avatarJiawei Shao <jiawei.shao@intel.com> Reviewed-by: 's avatarYunchao He <yunchao.he@intel.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 76bf01d7
......@@ -1431,22 +1431,22 @@ bool ValidateDispatchComputeIndirect(Context *context, GLintptr indirect)
return false;
}
gl::Buffer *dispatchIndirectBuffer = state.getTargetBuffer(BufferBinding::DispatchIndirect);
if (!dispatchIndirectBuffer)
if (indirect < 0)
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), DispatchIndirectBufferNotBound);
ANGLE_VALIDATION_ERR(context, InvalidValue(), NegativeOffset);
return false;
}
if (indirect < 0)
if ((indirect & (sizeof(GLuint) - 1)) != 0)
{
ANGLE_VALIDATION_ERR(context, InvalidValue(), NegativeOffset);
ANGLE_VALIDATION_ERR(context, InvalidValue(), OffsetMustBeMultipleOfUint);
return false;
}
if ((indirect & (sizeof(GLuint) - 1)) != 0)
gl::Buffer *dispatchIndirectBuffer = state.getTargetBuffer(BufferBinding::DispatchIndirect);
if (!dispatchIndirectBuffer)
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), OffsetMustBeMultipleOfUint);
ANGLE_VALIDATION_ERR(context, InvalidOperation(), DispatchIndirectBufferNotBound);
return false;
}
......
......@@ -1679,7 +1679,6 @@
2324 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.log.compute.program_not_active = FAIL
2324 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.compute.program_not_active = FAIL
2324 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.compute.invalid_program_query = FAIL
2324 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.compute.invalid_dispatch_compute_indirect = FAIL
2324 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.get_error.shader_storage.block_number_limits = FAIL
2324 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.log.shader_storage.block_number_limits = FAIL
2324 DEBUG RELEASE : dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader_storage.block_number_limits = FAIL
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