Use a packed enum for buffer targets.
BUG=angleproject:2169
Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669
Reviewed-on: https://chromium-review.googlesource.com/723865
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp
index 7db0856..d44d17f 100644
--- a/src/libANGLE/validationES31.cpp
+++ b/src/libANGLE/validationES31.cpp
@@ -356,7 +356,7 @@
return false;
}
- gl::Buffer *drawIndirectBuffer = state.getDrawIndirectBuffer();
+ gl::Buffer *drawIndirectBuffer = state.getTargetBuffer(BufferBinding::DrawIndirect);
if (!drawIndirectBuffer)
{
context->handleError(InvalidOperation() << "zero is bound to DRAW_INDIRECT_BUFFER");
@@ -405,7 +405,7 @@
if (!ValidateDrawIndirectBase(context, mode, indirect))
return false;
- gl::Buffer *drawIndirectBuffer = state.getDrawIndirectBuffer();
+ gl::Buffer *drawIndirectBuffer = state.getTargetBuffer(BufferBinding::DrawIndirect);
CheckedNumeric<size_t> checkedOffset(reinterpret_cast<size_t>(indirect));
// In OpenGL ES3.1 spec, session 10.5, it defines the struct of DrawArraysIndirectCommand
// which's size is 4 * sizeof(uint).
@@ -439,7 +439,7 @@
if (!ValidateDrawIndirectBase(context, mode, indirect))
return false;
- gl::Buffer *drawIndirectBuffer = state.getDrawIndirectBuffer();
+ gl::Buffer *drawIndirectBuffer = state.getTargetBuffer(BufferBinding::DrawIndirect);
CheckedNumeric<size_t> checkedOffset(reinterpret_cast<size_t>(indirect));
// In OpenGL ES3.1 spec, session 10.5, it defines the struct of DrawElementsIndirectCommand
// which's size is 5 * sizeof(uint).