Add unsafe ES3 APIs: uniforms and attributes.
BUG=429053
TEST=gpu_unittests
[email protected]
[email protected]
Review URL: https://codereview.chromium.org/754193002
Cr-Commit-Position: refs/heads/master@{#305743}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index b26b252..363ecf8 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -7444,6 +7444,24 @@
}
}
+error::Error GLES2DecoderImpl::HandleVertexAttribIPointer(
+ uint32 immediate_data_size,
+ const void* cmd_data) {
+ // TODO(zmo): Unsafe ES3 API, missing states update.
+ if (!unsafe_es3_apis_enabled())
+ return error::kUnknownCommand;
+ const gles2::cmds::VertexAttribIPointer& c =
+ *static_cast<const gles2::cmds::VertexAttribIPointer*>(cmd_data);
+ GLuint indx = c.indx;
+ GLint size = c.size;
+ GLenum type = c.type;
+ GLsizei stride = c.stride;
+ GLsizei offset = c.offset;
+ const void* ptr = reinterpret_cast<const void*>(offset);
+ glVertexAttribIPointer(indx, size, type, stride, ptr);
+ return error::kNoError;
+}
+
error::Error GLES2DecoderImpl::HandleVertexAttribPointer(
uint32 immediate_data_size,
const void* cmd_data) {