| Index: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
|
| index 19908def2f404e492172dbaa00cac6790debffc4..2c47b1602f2bebab2c3e643137e9569794b00ae2 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
|
| @@ -12,21 +12,21 @@
|
| #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
|
| #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
|
|
|
| -error::Error GLES2DecoderImpl::HandleActiveTexture(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ActiveTexture& c =
|
| - *static_cast<const gles2::cmds::ActiveTexture*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleActiveTexture(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ActiveTexture& c =
|
| + *static_cast<const volatile gles2::cmds::ActiveTexture*>(cmd_data);
|
| GLenum texture = static_cast<GLenum>(c.texture);
|
| DoActiveTexture(texture);
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleAttachShader(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::AttachShader& c =
|
| - *static_cast<const gles2::cmds::AttachShader*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleAttachShader(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::AttachShader& c =
|
| + *static_cast<const volatile gles2::cmds::AttachShader*>(cmd_data);
|
| GLuint program = c.program;
|
| GLuint shader = c.shader;
|
| DoAttachShader(program, shader);
|
| @@ -34,10 +34,9 @@ error::Error GLES2DecoderImpl::HandleAttachShader(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleBindBuffer(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BindBuffer& c =
|
| - *static_cast<const gles2::cmds::BindBuffer*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BindBuffer& c =
|
| + *static_cast<const volatile gles2::cmds::BindBuffer*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLuint buffer = c.buffer;
|
| if (!validators_->buffer_target.IsValid(target)) {
|
| @@ -50,12 +49,11 @@ error::Error GLES2DecoderImpl::HandleBindBuffer(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleBindBufferBase(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::BindBufferBase& c =
|
| - *static_cast<const gles2::cmds::BindBufferBase*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::BindBufferBase& c =
|
| + *static_cast<const volatile gles2::cmds::BindBufferBase*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| GLuint buffer = c.buffer;
|
| @@ -69,12 +67,11 @@ error::Error GLES2DecoderImpl::HandleBindBufferBase(
|
|
|
| error::Error GLES2DecoderImpl::HandleBindBufferRange(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::BindBufferRange& c =
|
| - *static_cast<const gles2::cmds::BindBufferRange*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::BindBufferRange& c =
|
| + *static_cast<const volatile gles2::cmds::BindBufferRange*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| GLuint buffer = c.buffer;
|
| @@ -94,10 +91,9 @@ error::Error GLES2DecoderImpl::HandleBindBufferRange(
|
|
|
| error::Error GLES2DecoderImpl::HandleBindFramebuffer(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BindFramebuffer& c =
|
| - *static_cast<const gles2::cmds::BindFramebuffer*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BindFramebuffer& c =
|
| + *static_cast<const volatile gles2::cmds::BindFramebuffer*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLuint framebuffer = c.framebuffer;
|
| if (!validators_->framebuffer_target.IsValid(target)) {
|
| @@ -110,10 +106,9 @@ error::Error GLES2DecoderImpl::HandleBindFramebuffer(
|
|
|
| error::Error GLES2DecoderImpl::HandleBindRenderbuffer(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BindRenderbuffer& c =
|
| - *static_cast<const gles2::cmds::BindRenderbuffer*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BindRenderbuffer& c =
|
| + *static_cast<const volatile gles2::cmds::BindRenderbuffer*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLuint renderbuffer = c.renderbuffer;
|
| if (!validators_->render_buffer_target.IsValid(target)) {
|
| @@ -124,24 +119,24 @@ error::Error GLES2DecoderImpl::HandleBindRenderbuffer(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleBindSampler(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| +error::Error GLES2DecoderImpl::HandleBindSampler(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::BindSampler& c =
|
| - *static_cast<const gles2::cmds::BindSampler*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::BindSampler& c =
|
| + *static_cast<const volatile gles2::cmds::BindSampler*>(cmd_data);
|
| GLuint unit = static_cast<GLuint>(c.unit);
|
| GLuint sampler = c.sampler;
|
| DoBindSampler(unit, sampler);
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleBindTexture(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BindTexture& c =
|
| - *static_cast<const gles2::cmds::BindTexture*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleBindTexture(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BindTexture& c =
|
| + *static_cast<const volatile gles2::cmds::BindTexture*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLuint texture = c.texture;
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| @@ -154,12 +149,12 @@ error::Error GLES2DecoderImpl::HandleBindTexture(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleBindTransformFeedback(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::BindTransformFeedback& c =
|
| - *static_cast<const gles2::cmds::BindTransformFeedback*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::BindTransformFeedback& c =
|
| + *static_cast<const volatile gles2::cmds::BindTransformFeedback*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLuint transformfeedback = c.transformfeedback;
|
| if (!validators_->transform_feedback_bind_target.IsValid(target)) {
|
| @@ -172,10 +167,9 @@ error::Error GLES2DecoderImpl::HandleBindTransformFeedback(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleBlendColor(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BlendColor& c =
|
| - *static_cast<const gles2::cmds::BlendColor*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BlendColor& c =
|
| + *static_cast<const volatile gles2::cmds::BlendColor*>(cmd_data);
|
| GLclampf red = static_cast<GLclampf>(c.red);
|
| GLclampf green = static_cast<GLclampf>(c.green);
|
| GLclampf blue = static_cast<GLclampf>(c.blue);
|
| @@ -191,11 +185,11 @@ error::Error GLES2DecoderImpl::HandleBlendColor(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleBlendEquation(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BlendEquation& c =
|
| - *static_cast<const gles2::cmds::BlendEquation*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleBlendEquation(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BlendEquation& c =
|
| + *static_cast<const volatile gles2::cmds::BlendEquation*>(cmd_data);
|
| GLenum mode = static_cast<GLenum>(c.mode);
|
| if (!validators_->equation.IsValid(mode)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glBlendEquation", mode, "mode");
|
| @@ -212,10 +206,10 @@ error::Error GLES2DecoderImpl::HandleBlendEquation(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleBlendEquationSeparate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BlendEquationSeparate& c =
|
| - *static_cast<const gles2::cmds::BlendEquationSeparate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BlendEquationSeparate& c =
|
| + *static_cast<const volatile gles2::cmds::BlendEquationSeparate*>(
|
| + cmd_data);
|
| GLenum modeRGB = static_cast<GLenum>(c.modeRGB);
|
| GLenum modeAlpha = static_cast<GLenum>(c.modeAlpha);
|
| if (!validators_->equation.IsValid(modeRGB)) {
|
| @@ -238,10 +232,9 @@ error::Error GLES2DecoderImpl::HandleBlendEquationSeparate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleBlendFunc(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BlendFunc& c =
|
| - *static_cast<const gles2::cmds::BlendFunc*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BlendFunc& c =
|
| + *static_cast<const volatile gles2::cmds::BlendFunc*>(cmd_data);
|
| GLenum sfactor = static_cast<GLenum>(c.sfactor);
|
| GLenum dfactor = static_cast<GLenum>(c.dfactor);
|
| if (!validators_->src_blend_factor.IsValid(sfactor)) {
|
| @@ -266,10 +259,9 @@ error::Error GLES2DecoderImpl::HandleBlendFunc(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleBlendFuncSeparate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BlendFuncSeparate& c =
|
| - *static_cast<const gles2::cmds::BlendFuncSeparate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BlendFuncSeparate& c =
|
| + *static_cast<const volatile gles2::cmds::BlendFuncSeparate*>(cmd_data);
|
| GLenum srcRGB = static_cast<GLenum>(c.srcRGB);
|
| GLenum dstRGB = static_cast<GLenum>(c.dstRGB);
|
| GLenum srcAlpha = static_cast<GLenum>(c.srcAlpha);
|
| @@ -304,11 +296,11 @@ error::Error GLES2DecoderImpl::HandleBlendFuncSeparate(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleBufferSubData(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BufferSubData& c =
|
| - *static_cast<const gles2::cmds::BufferSubData*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleBufferSubData(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BufferSubData& c =
|
| + *static_cast<const volatile gles2::cmds::BufferSubData*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLintptr offset = static_cast<GLintptr>(c.offset);
|
| GLsizeiptr size = static_cast<GLsizeiptr>(c.size);
|
| @@ -332,10 +324,10 @@ error::Error GLES2DecoderImpl::HandleBufferSubData(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleCheckFramebufferStatus(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CheckFramebufferStatus& c =
|
| - *static_cast<const gles2::cmds::CheckFramebufferStatus*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CheckFramebufferStatus& c =
|
| + *static_cast<const volatile gles2::cmds::CheckFramebufferStatus*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| typedef cmds::CheckFramebufferStatus::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -353,10 +345,9 @@ error::Error GLES2DecoderImpl::HandleCheckFramebufferStatus(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleClear(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Clear& c =
|
| - *static_cast<const gles2::cmds::Clear*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Clear& c =
|
| + *static_cast<const volatile gles2::cmds::Clear*>(cmd_data);
|
| error::Error error;
|
| error = WillAccessBoundFramebufferForDraw();
|
| if (error != error::kNoError)
|
| @@ -366,13 +357,13 @@ error::Error GLES2DecoderImpl::HandleClear(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleClearBufferfi(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| +error::Error GLES2DecoderImpl::HandleClearBufferfi(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::ClearBufferfi& c =
|
| - *static_cast<const gles2::cmds::ClearBufferfi*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::ClearBufferfi& c =
|
| + *static_cast<const volatile gles2::cmds::ClearBufferfi*>(cmd_data);
|
| GLenum buffer = static_cast<GLenum>(c.buffer);
|
| GLint drawbuffers = static_cast<GLint>(c.drawbuffers);
|
| GLfloat depth = static_cast<GLfloat>(c.depth);
|
| @@ -387,12 +378,12 @@ error::Error GLES2DecoderImpl::HandleClearBufferfi(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleClearBufferfvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::ClearBufferfvImmediate& c =
|
| - *static_cast<const gles2::cmds::ClearBufferfvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::ClearBufferfvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::ClearBufferfvImmediate*>(
|
| + cmd_data);
|
| GLenum buffer = static_cast<GLenum>(c.buffer);
|
| GLint drawbuffers = static_cast<GLint>(c.drawbuffers);
|
| uint32_t data_size;
|
| @@ -402,8 +393,8 @@ error::Error GLES2DecoderImpl::HandleClearBufferfvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->bufferfv.IsValid(buffer)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferfv", buffer, "buffer");
|
| return error::kNoError;
|
| @@ -417,12 +408,12 @@ error::Error GLES2DecoderImpl::HandleClearBufferfvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleClearBufferivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::ClearBufferivImmediate& c =
|
| - *static_cast<const gles2::cmds::ClearBufferivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::ClearBufferivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::ClearBufferivImmediate*>(
|
| + cmd_data);
|
| GLenum buffer = static_cast<GLenum>(c.buffer);
|
| GLint drawbuffers = static_cast<GLint>(c.drawbuffers);
|
| uint32_t data_size;
|
| @@ -432,8 +423,8 @@ error::Error GLES2DecoderImpl::HandleClearBufferivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLint* value =
|
| - GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
|
| + volatile const GLint* value = GetImmediateDataAs<volatile const GLint*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->bufferiv.IsValid(buffer)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferiv", buffer, "buffer");
|
| return error::kNoError;
|
| @@ -447,12 +438,12 @@ error::Error GLES2DecoderImpl::HandleClearBufferivImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleClearBufferuivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::ClearBufferuivImmediate& c =
|
| - *static_cast<const gles2::cmds::ClearBufferuivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::ClearBufferuivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::ClearBufferuivImmediate*>(
|
| + cmd_data);
|
| GLenum buffer = static_cast<GLenum>(c.buffer);
|
| GLint drawbuffers = static_cast<GLint>(c.drawbuffers);
|
| uint32_t data_size;
|
| @@ -462,8 +453,8 @@ error::Error GLES2DecoderImpl::HandleClearBufferuivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* value =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* value = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->bufferuiv.IsValid(buffer)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glClearBufferuiv", buffer, "buffer");
|
| return error::kNoError;
|
| @@ -476,10 +467,9 @@ error::Error GLES2DecoderImpl::HandleClearBufferuivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleClearColor(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ClearColor& c =
|
| - *static_cast<const gles2::cmds::ClearColor*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ClearColor& c =
|
| + *static_cast<const volatile gles2::cmds::ClearColor*>(cmd_data);
|
| GLclampf red = static_cast<GLclampf>(c.red);
|
| GLclampf green = static_cast<GLclampf>(c.green);
|
| GLclampf blue = static_cast<GLclampf>(c.blue);
|
| @@ -495,11 +485,11 @@ error::Error GLES2DecoderImpl::HandleClearColor(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleClearDepthf(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ClearDepthf& c =
|
| - *static_cast<const gles2::cmds::ClearDepthf*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleClearDepthf(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ClearDepthf& c =
|
| + *static_cast<const volatile gles2::cmds::ClearDepthf*>(cmd_data);
|
| GLclampf depth = static_cast<GLclampf>(c.depth);
|
| if (state_.depth_clear != depth) {
|
| state_.depth_clear = depth;
|
| @@ -508,11 +498,11 @@ error::Error GLES2DecoderImpl::HandleClearDepthf(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleClearStencil(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ClearStencil& c =
|
| - *static_cast<const gles2::cmds::ClearStencil*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleClearStencil(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ClearStencil& c =
|
| + *static_cast<const volatile gles2::cmds::ClearStencil*>(cmd_data);
|
| GLint s = static_cast<GLint>(c.s);
|
| if (state_.stencil_clear != s) {
|
| state_.stencil_clear = s;
|
| @@ -522,10 +512,9 @@ error::Error GLES2DecoderImpl::HandleClearStencil(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleColorMask(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ColorMask& c =
|
| - *static_cast<const gles2::cmds::ColorMask*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ColorMask& c =
|
| + *static_cast<const volatile gles2::cmds::ColorMask*>(cmd_data);
|
| GLboolean red = static_cast<GLboolean>(c.red);
|
| GLboolean green = static_cast<GLboolean>(c.green);
|
| GLboolean blue = static_cast<GLboolean>(c.blue);
|
| @@ -541,11 +530,11 @@ error::Error GLES2DecoderImpl::HandleColorMask(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleCompileShader(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CompileShader& c =
|
| - *static_cast<const gles2::cmds::CompileShader*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleCompileShader(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CompileShader& c =
|
| + *static_cast<const volatile gles2::cmds::CompileShader*>(cmd_data);
|
| GLuint shader = c.shader;
|
| DoCompileShader(shader);
|
| return error::kNoError;
|
| @@ -553,10 +542,10 @@ error::Error GLES2DecoderImpl::HandleCompileShader(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedTexImage2DBucket(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CompressedTexImage2DBucket& c =
|
| - *static_cast<const gles2::cmds::CompressedTexImage2DBucket*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CompressedTexImage2DBucket& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedTexImage2DBucket*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint level = static_cast<GLint>(c.level);
|
| GLenum internalformat = static_cast<GLenum>(c.internalformat);
|
| @@ -601,10 +590,9 @@ error::Error GLES2DecoderImpl::HandleCompressedTexImage2DBucket(
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedTexImage2D(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CompressedTexImage2D& c =
|
| - *static_cast<const gles2::cmds::CompressedTexImage2D*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CompressedTexImage2D& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedTexImage2D*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint level = static_cast<GLint>(c.level);
|
| GLenum internalformat = static_cast<GLenum>(c.internalformat);
|
| @@ -645,10 +633,10 @@ error::Error GLES2DecoderImpl::HandleCompressedTexImage2D(
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2DBucket(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CompressedTexSubImage2DBucket& c =
|
| - *static_cast<const gles2::cmds::CompressedTexSubImage2DBucket*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CompressedTexSubImage2DBucket& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedTexSubImage2DBucket*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint level = static_cast<GLint>(c.level);
|
| GLint xoffset = static_cast<GLint>(c.xoffset);
|
| @@ -696,10 +684,10 @@ error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2DBucket(
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2D(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CompressedTexSubImage2D& c =
|
| - *static_cast<const gles2::cmds::CompressedTexSubImage2D*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CompressedTexSubImage2D& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedTexSubImage2D*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint level = static_cast<GLint>(c.level);
|
| GLint xoffset = static_cast<GLint>(c.xoffset);
|
| @@ -746,12 +734,12 @@ error::Error GLES2DecoderImpl::HandleCompressedTexSubImage2D(
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedTexImage3DBucket(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::CompressedTexImage3DBucket& c =
|
| - *static_cast<const gles2::cmds::CompressedTexImage3DBucket*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::CompressedTexImage3DBucket& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedTexImage3DBucket*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint level = static_cast<GLint>(c.level);
|
| GLenum internalformat = static_cast<GLenum>(c.internalformat);
|
| @@ -801,12 +789,11 @@ error::Error GLES2DecoderImpl::HandleCompressedTexImage3DBucket(
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedTexImage3D(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::CompressedTexImage3D& c =
|
| - *static_cast<const gles2::cmds::CompressedTexImage3D*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::CompressedTexImage3D& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedTexImage3D*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint level = static_cast<GLint>(c.level);
|
| GLenum internalformat = static_cast<GLenum>(c.internalformat);
|
| @@ -852,12 +839,12 @@ error::Error GLES2DecoderImpl::HandleCompressedTexImage3D(
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3DBucket(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::CompressedTexSubImage3DBucket& c =
|
| - *static_cast<const gles2::cmds::CompressedTexSubImage3DBucket*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::CompressedTexSubImage3DBucket& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedTexSubImage3DBucket*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint level = static_cast<GLint>(c.level);
|
| GLint xoffset = static_cast<GLint>(c.xoffset);
|
| @@ -912,12 +899,12 @@ error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3DBucket(
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3D(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::CompressedTexSubImage3D& c =
|
| - *static_cast<const gles2::cmds::CompressedTexSubImage3D*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::CompressedTexSubImage3D& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedTexSubImage3D*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint level = static_cast<GLint>(c.level);
|
| GLint xoffset = static_cast<GLint>(c.xoffset);
|
| @@ -971,12 +958,11 @@ error::Error GLES2DecoderImpl::HandleCompressedTexSubImage3D(
|
|
|
| error::Error GLES2DecoderImpl::HandleCopyBufferSubData(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::CopyBufferSubData& c =
|
| - *static_cast<const gles2::cmds::CopyBufferSubData*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::CopyBufferSubData& c =
|
| + *static_cast<const volatile gles2::cmds::CopyBufferSubData*>(cmd_data);
|
| GLenum readtarget = static_cast<GLenum>(c.readtarget);
|
| GLenum writetarget = static_cast<GLenum>(c.writetarget);
|
| GLintptr readoffset = static_cast<GLintptr>(c.readoffset);
|
| @@ -1002,10 +988,9 @@ error::Error GLES2DecoderImpl::HandleCopyBufferSubData(
|
|
|
| error::Error GLES2DecoderImpl::HandleCopyTexImage2D(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CopyTexImage2D& c =
|
| - *static_cast<const gles2::cmds::CopyTexImage2D*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CopyTexImage2D& c =
|
| + *static_cast<const volatile gles2::cmds::CopyTexImage2D*>(cmd_data);
|
| error::Error error;
|
| error = WillAccessBoundFramebufferForRead();
|
| if (error != error::kNoError)
|
| @@ -1041,10 +1026,9 @@ error::Error GLES2DecoderImpl::HandleCopyTexImage2D(
|
|
|
| error::Error GLES2DecoderImpl::HandleCopyTexSubImage2D(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CopyTexSubImage2D& c =
|
| - *static_cast<const gles2::cmds::CopyTexSubImage2D*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CopyTexSubImage2D& c =
|
| + *static_cast<const volatile gles2::cmds::CopyTexSubImage2D*>(cmd_data);
|
| error::Error error;
|
| error = WillAccessBoundFramebufferForRead();
|
| if (error != error::kNoError)
|
| @@ -1075,12 +1059,11 @@ error::Error GLES2DecoderImpl::HandleCopyTexSubImage2D(
|
|
|
| error::Error GLES2DecoderImpl::HandleCopyTexSubImage3D(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::CopyTexSubImage3D& c =
|
| - *static_cast<const gles2::cmds::CopyTexSubImage3D*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::CopyTexSubImage3D& c =
|
| + *static_cast<const volatile gles2::cmds::CopyTexSubImage3D*>(cmd_data);
|
| error::Error error;
|
| error = WillAccessBoundFramebufferForRead();
|
| if (error != error::kNoError)
|
| @@ -1111,11 +1094,11 @@ error::Error GLES2DecoderImpl::HandleCopyTexSubImage3D(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleCreateProgram(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CreateProgram& c =
|
| - *static_cast<const gles2::cmds::CreateProgram*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleCreateProgram(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CreateProgram& c =
|
| + *static_cast<const volatile gles2::cmds::CreateProgram*>(cmd_data);
|
| uint32_t client_id = c.client_id;
|
| if (GetProgram(client_id)) {
|
| return error::kInvalidArguments;
|
| @@ -1127,11 +1110,11 @@ error::Error GLES2DecoderImpl::HandleCreateProgram(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleCreateShader(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CreateShader& c =
|
| - *static_cast<const gles2::cmds::CreateShader*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleCreateShader(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CreateShader& c =
|
| + *static_cast<const volatile gles2::cmds::CreateShader*>(cmd_data);
|
| GLenum type = static_cast<GLenum>(c.type);
|
| if (!validators_->shader_type.IsValid(type)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glCreateShader", type, "type");
|
| @@ -1149,10 +1132,9 @@ error::Error GLES2DecoderImpl::HandleCreateShader(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleCullFace(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CullFace& c =
|
| - *static_cast<const gles2::cmds::CullFace*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CullFace& c =
|
| + *static_cast<const volatile gles2::cmds::CullFace*>(cmd_data);
|
| GLenum mode = static_cast<GLenum>(c.mode);
|
| if (!validators_->face_type.IsValid(mode)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glCullFace", mode, "mode");
|
| @@ -1167,17 +1149,17 @@ error::Error GLES2DecoderImpl::HandleCullFace(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteBuffersImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DeleteBuffersImmediate& c =
|
| - *static_cast<const gles2::cmds::DeleteBuffersImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DeleteBuffersImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DeleteBuffersImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* buffers =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* buffers = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (buffers == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1187,17 +1169,18 @@ error::Error GLES2DecoderImpl::HandleDeleteBuffersImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteFramebuffersImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DeleteFramebuffersImmediate& c =
|
| - *static_cast<const gles2::cmds::DeleteFramebuffersImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DeleteFramebuffersImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DeleteFramebuffersImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* framebuffers =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* framebuffers =
|
| + GetImmediateDataAs<volatile const GLuint*>(c, data_size,
|
| + immediate_data_size);
|
| if (framebuffers == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1207,17 +1190,18 @@ error::Error GLES2DecoderImpl::HandleDeleteFramebuffersImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteRenderbuffersImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DeleteRenderbuffersImmediate& c =
|
| - *static_cast<const gles2::cmds::DeleteRenderbuffersImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DeleteRenderbuffersImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DeleteRenderbuffersImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* renderbuffers =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* renderbuffers =
|
| + GetImmediateDataAs<volatile const GLuint*>(c, data_size,
|
| + immediate_data_size);
|
| if (renderbuffers == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1227,19 +1211,19 @@ error::Error GLES2DecoderImpl::HandleDeleteRenderbuffersImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteSamplersImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::DeleteSamplersImmediate& c =
|
| - *static_cast<const gles2::cmds::DeleteSamplersImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::DeleteSamplersImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DeleteSamplersImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* samplers =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* samplers = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (samplers == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1248,12 +1232,11 @@ error::Error GLES2DecoderImpl::HandleDeleteSamplersImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteSync(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::DeleteSync& c =
|
| - *static_cast<const gles2::cmds::DeleteSync*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::DeleteSync& c =
|
| + *static_cast<const volatile gles2::cmds::DeleteSync*>(cmd_data);
|
| GLuint sync = c.sync;
|
| DeleteSyncHelper(sync);
|
| return error::kNoError;
|
| @@ -1261,17 +1244,17 @@ error::Error GLES2DecoderImpl::HandleDeleteSync(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteTexturesImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DeleteTexturesImmediate& c =
|
| - *static_cast<const gles2::cmds::DeleteTexturesImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DeleteTexturesImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DeleteTexturesImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* textures =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* textures = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (textures == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1281,20 +1264,20 @@ error::Error GLES2DecoderImpl::HandleDeleteTexturesImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteTransformFeedbacksImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::DeleteTransformFeedbacksImmediate& c =
|
| - *static_cast<const gles2::cmds::DeleteTransformFeedbacksImmediate*>(
|
| + const volatile gles2::cmds::DeleteTransformFeedbacksImmediate& c =
|
| + *static_cast<
|
| + const volatile gles2::cmds::DeleteTransformFeedbacksImmediate*>(
|
| cmd_data);
|
| - (void)c;
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* ids =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* ids = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (ids == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1303,10 +1286,9 @@ error::Error GLES2DecoderImpl::HandleDeleteTransformFeedbacksImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleDepthFunc(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DepthFunc& c =
|
| - *static_cast<const gles2::cmds::DepthFunc*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DepthFunc& c =
|
| + *static_cast<const volatile gles2::cmds::DepthFunc*>(cmd_data);
|
| GLenum func = static_cast<GLenum>(c.func);
|
| if (!validators_->cmp_function.IsValid(func)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glDepthFunc", func, "func");
|
| @@ -1320,10 +1302,9 @@ error::Error GLES2DecoderImpl::HandleDepthFunc(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleDepthMask(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DepthMask& c =
|
| - *static_cast<const gles2::cmds::DepthMask*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DepthMask& c =
|
| + *static_cast<const volatile gles2::cmds::DepthMask*>(cmd_data);
|
| GLboolean flag = static_cast<GLboolean>(c.flag);
|
| if (state_.depth_mask != flag) {
|
| state_.depth_mask = flag;
|
| @@ -1332,22 +1313,22 @@ error::Error GLES2DecoderImpl::HandleDepthMask(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleDepthRangef(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DepthRangef& c =
|
| - *static_cast<const gles2::cmds::DepthRangef*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleDepthRangef(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DepthRangef& c =
|
| + *static_cast<const volatile gles2::cmds::DepthRangef*>(cmd_data);
|
| GLclampf zNear = static_cast<GLclampf>(c.zNear);
|
| GLclampf zFar = static_cast<GLclampf>(c.zFar);
|
| DoDepthRangef(zNear, zFar);
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleDetachShader(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DetachShader& c =
|
| - *static_cast<const gles2::cmds::DetachShader*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleDetachShader(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DetachShader& c =
|
| + *static_cast<const volatile gles2::cmds::DetachShader*>(cmd_data);
|
| GLuint program = c.program;
|
| GLuint shader = c.shader;
|
| DoDetachShader(program, shader);
|
| @@ -1355,10 +1336,9 @@ error::Error GLES2DecoderImpl::HandleDetachShader(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleDisable(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Disable& c =
|
| - *static_cast<const gles2::cmds::Disable*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Disable& c =
|
| + *static_cast<const volatile gles2::cmds::Disable*>(cmd_data);
|
| GLenum cap = static_cast<GLenum>(c.cap);
|
| if (!validators_->capability.IsValid(cap)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glDisable", cap, "cap");
|
| @@ -1370,20 +1350,19 @@ error::Error GLES2DecoderImpl::HandleDisable(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleDisableVertexAttribArray(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DisableVertexAttribArray& c =
|
| - *static_cast<const gles2::cmds::DisableVertexAttribArray*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DisableVertexAttribArray& c =
|
| + *static_cast<const volatile gles2::cmds::DisableVertexAttribArray*>(
|
| + cmd_data);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| DoDisableVertexAttribArray(index);
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleEnable(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Enable& c =
|
| - *static_cast<const gles2::cmds::Enable*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Enable& c =
|
| + *static_cast<const volatile gles2::cmds::Enable*>(cmd_data);
|
| GLenum cap = static_cast<GLenum>(c.cap);
|
| if (!validators_->capability.IsValid(cap)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glEnable", cap, "cap");
|
| @@ -1395,22 +1374,21 @@ error::Error GLES2DecoderImpl::HandleEnable(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleEnableVertexAttribArray(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::EnableVertexAttribArray& c =
|
| - *static_cast<const gles2::cmds::EnableVertexAttribArray*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::EnableVertexAttribArray& c =
|
| + *static_cast<const volatile gles2::cmds::EnableVertexAttribArray*>(
|
| + cmd_data);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| DoEnableVertexAttribArray(index);
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleFenceSync(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::FenceSync& c =
|
| - *static_cast<const gles2::cmds::FenceSync*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::FenceSync& c =
|
| + *static_cast<const volatile gles2::cmds::FenceSync*>(cmd_data);
|
| GLenum condition = static_cast<GLenum>(c.condition);
|
| GLbitfield flags = static_cast<GLbitfield>(c.flags);
|
| uint32_t client_id = c.client_id;
|
| @@ -1426,10 +1404,7 @@ error::Error GLES2DecoderImpl::HandleFenceSync(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleFinish(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Finish& c =
|
| - *static_cast<const gles2::cmds::Finish*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| error::Error error;
|
| error = WillAccessBoundFramebufferForRead();
|
| if (error != error::kNoError)
|
| @@ -1439,20 +1414,17 @@ error::Error GLES2DecoderImpl::HandleFinish(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleFlush(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Flush& c =
|
| - *static_cast<const gles2::cmds::Flush*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| DoFlush();
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleFramebufferRenderbuffer(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::FramebufferRenderbuffer& c =
|
| - *static_cast<const gles2::cmds::FramebufferRenderbuffer*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::FramebufferRenderbuffer& c =
|
| + *static_cast<const volatile gles2::cmds::FramebufferRenderbuffer*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum attachment = static_cast<GLenum>(c.attachment);
|
| GLenum renderbuffertarget = static_cast<GLenum>(c.renderbuffertarget);
|
| @@ -1479,10 +1451,9 @@ error::Error GLES2DecoderImpl::HandleFramebufferRenderbuffer(
|
|
|
| error::Error GLES2DecoderImpl::HandleFramebufferTexture2D(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::FramebufferTexture2D& c =
|
| - *static_cast<const gles2::cmds::FramebufferTexture2D*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::FramebufferTexture2D& c =
|
| + *static_cast<const volatile gles2::cmds::FramebufferTexture2D*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum attachment = static_cast<GLenum>(c.attachment);
|
| GLenum textarget = static_cast<GLenum>(c.textarget);
|
| @@ -1508,12 +1479,12 @@ error::Error GLES2DecoderImpl::HandleFramebufferTexture2D(
|
|
|
| error::Error GLES2DecoderImpl::HandleFramebufferTextureLayer(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::FramebufferTextureLayer& c =
|
| - *static_cast<const gles2::cmds::FramebufferTextureLayer*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::FramebufferTextureLayer& c =
|
| + *static_cast<const volatile gles2::cmds::FramebufferTextureLayer*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum attachment = static_cast<GLenum>(c.attachment);
|
| GLuint texture = c.texture;
|
| @@ -1534,10 +1505,9 @@ error::Error GLES2DecoderImpl::HandleFramebufferTextureLayer(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleFrontFace(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::FrontFace& c =
|
| - *static_cast<const gles2::cmds::FrontFace*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::FrontFace& c =
|
| + *static_cast<const volatile gles2::cmds::FrontFace*>(cmd_data);
|
| GLenum mode = static_cast<GLenum>(c.mode);
|
| if (!validators_->face_mode.IsValid(mode)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glFrontFace", mode, "mode");
|
| @@ -1552,17 +1522,16 @@ error::Error GLES2DecoderImpl::HandleFrontFace(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleGenBuffersImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GenBuffersImmediate& c =
|
| - *static_cast<const gles2::cmds::GenBuffersImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GenBuffersImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::GenBuffersImmediate*>(cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - GLuint* buffers =
|
| - GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size);
|
| + volatile GLuint* buffers =
|
| + GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size);
|
| if (buffers == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1578,10 +1547,9 @@ error::Error GLES2DecoderImpl::HandleGenBuffersImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleGenerateMipmap(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GenerateMipmap& c =
|
| - *static_cast<const gles2::cmds::GenerateMipmap*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GenerateMipmap& c =
|
| + *static_cast<const volatile gles2::cmds::GenerateMipmap*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glGenerateMipmap", target, "target");
|
| @@ -1593,17 +1561,17 @@ error::Error GLES2DecoderImpl::HandleGenerateMipmap(
|
|
|
| error::Error GLES2DecoderImpl::HandleGenFramebuffersImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GenFramebuffersImmediate& c =
|
| - *static_cast<const gles2::cmds::GenFramebuffersImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GenFramebuffersImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::GenFramebuffersImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - GLuint* framebuffers =
|
| - GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size);
|
| + volatile GLuint* framebuffers =
|
| + GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size);
|
| if (framebuffers == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1619,17 +1587,17 @@ error::Error GLES2DecoderImpl::HandleGenFramebuffersImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleGenRenderbuffersImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GenRenderbuffersImmediate& c =
|
| - *static_cast<const gles2::cmds::GenRenderbuffersImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GenRenderbuffersImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::GenRenderbuffersImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - GLuint* renderbuffers =
|
| - GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size);
|
| + volatile GLuint* renderbuffers =
|
| + GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size);
|
| if (renderbuffers == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1645,19 +1613,18 @@ error::Error GLES2DecoderImpl::HandleGenRenderbuffersImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleGenSamplersImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GenSamplersImmediate& c =
|
| - *static_cast<const gles2::cmds::GenSamplersImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GenSamplersImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::GenSamplersImmediate*>(cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - GLuint* samplers =
|
| - GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size);
|
| + volatile GLuint* samplers =
|
| + GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size);
|
| if (samplers == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1673,17 +1640,16 @@ error::Error GLES2DecoderImpl::HandleGenSamplersImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleGenTexturesImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GenTexturesImmediate& c =
|
| - *static_cast<const gles2::cmds::GenTexturesImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GenTexturesImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::GenTexturesImmediate*>(cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - GLuint* textures =
|
| - GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size);
|
| + volatile GLuint* textures =
|
| + GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size);
|
| if (textures == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1699,19 +1665,19 @@ error::Error GLES2DecoderImpl::HandleGenTexturesImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleGenTransformFeedbacksImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GenTransformFeedbacksImmediate& c =
|
| - *static_cast<const gles2::cmds::GenTransformFeedbacksImmediate*>(
|
| + const volatile gles2::cmds::GenTransformFeedbacksImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::GenTransformFeedbacksImmediate*>(
|
| cmd_data);
|
| - (void)c;
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - GLuint* ids = GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size);
|
| + volatile GLuint* ids =
|
| + GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size);
|
| if (ids == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -1725,11 +1691,11 @@ error::Error GLES2DecoderImpl::HandleGenTransformFeedbacksImmediate(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleGetBooleanv(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetBooleanv& c =
|
| - *static_cast<const gles2::cmds::GetBooleanv*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleGetBooleanv(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetBooleanv& c =
|
| + *static_cast<const volatile gles2::cmds::GetBooleanv*>(cmd_data);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetBooleanv::Result Result;
|
| GLsizei num_values = 0;
|
| @@ -1759,12 +1725,12 @@ error::Error GLES2DecoderImpl::HandleGetBooleanv(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleGetBufferParameteri64v(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetBufferParameteri64v& c =
|
| - *static_cast<const gles2::cmds::GetBufferParameteri64v*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetBufferParameteri64v& c =
|
| + *static_cast<const volatile gles2::cmds::GetBufferParameteri64v*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetBufferParameteri64v::Result Result;
|
| @@ -1795,10 +1761,9 @@ error::Error GLES2DecoderImpl::HandleGetBufferParameteri64v(
|
| }
|
| error::Error GLES2DecoderImpl::HandleGetBufferParameteriv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetBufferParameteriv& c =
|
| - *static_cast<const gles2::cmds::GetBufferParameteriv*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetBufferParameteriv& c =
|
| + *static_cast<const volatile gles2::cmds::GetBufferParameteriv*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetBufferParameteriv::Result Result;
|
| @@ -1827,10 +1792,9 @@ error::Error GLES2DecoderImpl::HandleGetBufferParameteriv(
|
| return error::kNoError;
|
| }
|
| error::Error GLES2DecoderImpl::HandleGetError(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetError& c =
|
| - *static_cast<const gles2::cmds::GetError*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetError& c =
|
| + *static_cast<const volatile gles2::cmds::GetError*>(cmd_data);
|
| typedef cmds::GetError::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| c.result_shm_id, c.result_shm_offset, sizeof(*result_dst));
|
| @@ -1842,10 +1806,9 @@ error::Error GLES2DecoderImpl::HandleGetError(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleGetFloatv(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetFloatv& c =
|
| - *static_cast<const gles2::cmds::GetFloatv*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetFloatv& c =
|
| + *static_cast<const volatile gles2::cmds::GetFloatv*>(cmd_data);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetFloatv::Result Result;
|
| GLsizei num_values = 0;
|
| @@ -1875,11 +1838,11 @@ error::Error GLES2DecoderImpl::HandleGetFloatv(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleGetFramebufferAttachmentParameteriv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetFramebufferAttachmentParameteriv& c =
|
| - *static_cast<const gles2::cmds::GetFramebufferAttachmentParameteriv*>(
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetFramebufferAttachmentParameteriv& c =
|
| + *static_cast<
|
| + const volatile gles2::cmds::GetFramebufferAttachmentParameteriv*>(
|
| cmd_data);
|
| - (void)c;
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum attachment = static_cast<GLenum>(c.attachment);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| @@ -1920,13 +1883,13 @@ error::Error GLES2DecoderImpl::HandleGetFramebufferAttachmentParameteriv(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleGetInteger64v(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| +error::Error GLES2DecoderImpl::HandleGetInteger64v(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetInteger64v& c =
|
| - *static_cast<const gles2::cmds::GetInteger64v*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetInteger64v& c =
|
| + *static_cast<const volatile gles2::cmds::GetInteger64v*>(cmd_data);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetInteger64v::Result Result;
|
| GLsizei num_values = 0;
|
| @@ -1954,13 +1917,13 @@ error::Error GLES2DecoderImpl::HandleGetInteger64v(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleGetIntegeri_v(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| +error::Error GLES2DecoderImpl::HandleGetIntegeri_v(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetIntegeri_v& c =
|
| - *static_cast<const gles2::cmds::GetIntegeri_v*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetIntegeri_v& c =
|
| + *static_cast<const volatile gles2::cmds::GetIntegeri_v*>(cmd_data);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| typedef cmds::GetIntegeri_v::Result Result;
|
| @@ -1986,12 +1949,11 @@ error::Error GLES2DecoderImpl::HandleGetIntegeri_v(uint32_t immediate_data_size,
|
| }
|
| error::Error GLES2DecoderImpl::HandleGetInteger64i_v(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetInteger64i_v& c =
|
| - *static_cast<const gles2::cmds::GetInteger64i_v*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetInteger64i_v& c =
|
| + *static_cast<const volatile gles2::cmds::GetInteger64i_v*>(cmd_data);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| typedef cmds::GetInteger64i_v::Result Result;
|
| @@ -2015,11 +1977,11 @@ error::Error GLES2DecoderImpl::HandleGetInteger64i_v(
|
| result->SetNumResults(num_values);
|
| return error::kNoError;
|
| }
|
| -error::Error GLES2DecoderImpl::HandleGetIntegerv(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetIntegerv& c =
|
| - *static_cast<const gles2::cmds::GetIntegerv*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleGetIntegerv(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetIntegerv& c =
|
| + *static_cast<const volatile gles2::cmds::GetIntegerv*>(cmd_data);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetIntegerv::Result Result;
|
| GLsizei num_values = 0;
|
| @@ -2047,11 +2009,11 @@ error::Error GLES2DecoderImpl::HandleGetIntegerv(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleGetProgramiv(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetProgramiv& c =
|
| - *static_cast<const gles2::cmds::GetProgramiv*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleGetProgramiv(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetProgramiv& c =
|
| + *static_cast<const volatile gles2::cmds::GetProgramiv*>(cmd_data);
|
| GLuint program = c.program;
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetProgramiv::Result Result;
|
| @@ -2082,10 +2044,10 @@ error::Error GLES2DecoderImpl::HandleGetProgramiv(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleGetRenderbufferParameteriv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetRenderbufferParameteriv& c =
|
| - *static_cast<const gles2::cmds::GetRenderbufferParameteriv*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetRenderbufferParameteriv& c =
|
| + *static_cast<const volatile gles2::cmds::GetRenderbufferParameteriv*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetRenderbufferParameteriv::Result Result;
|
| @@ -2122,12 +2084,12 @@ error::Error GLES2DecoderImpl::HandleGetRenderbufferParameteriv(
|
|
|
| error::Error GLES2DecoderImpl::HandleGetSamplerParameterfv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetSamplerParameterfv& c =
|
| - *static_cast<const gles2::cmds::GetSamplerParameterfv*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetSamplerParameterfv& c =
|
| + *static_cast<const volatile gles2::cmds::GetSamplerParameterfv*>(
|
| + cmd_data);
|
| GLuint sampler = c.sampler;
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetSamplerParameterfv::Result Result;
|
| @@ -2158,12 +2120,12 @@ error::Error GLES2DecoderImpl::HandleGetSamplerParameterfv(
|
|
|
| error::Error GLES2DecoderImpl::HandleGetSamplerParameteriv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetSamplerParameteriv& c =
|
| - *static_cast<const gles2::cmds::GetSamplerParameteriv*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetSamplerParameteriv& c =
|
| + *static_cast<const volatile gles2::cmds::GetSamplerParameteriv*>(
|
| + cmd_data);
|
| GLuint sampler = c.sampler;
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetSamplerParameteriv::Result Result;
|
| @@ -2192,11 +2154,11 @@ error::Error GLES2DecoderImpl::HandleGetSamplerParameteriv(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleGetShaderiv(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetShaderiv& c =
|
| - *static_cast<const gles2::cmds::GetShaderiv*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleGetShaderiv(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetShaderiv& c =
|
| + *static_cast<const volatile gles2::cmds::GetShaderiv*>(cmd_data);
|
| GLuint shader = c.shader;
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetShaderiv::Result Result;
|
| @@ -2226,12 +2188,11 @@ error::Error GLES2DecoderImpl::HandleGetShaderiv(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleGetSynciv(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetSynciv& c =
|
| - *static_cast<const gles2::cmds::GetSynciv*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetSynciv& c =
|
| + *static_cast<const volatile gles2::cmds::GetSynciv*>(cmd_data);
|
| GLuint sync = static_cast<GLuint>(c.sync);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetSynciv::Result Result;
|
| @@ -2267,10 +2228,9 @@ error::Error GLES2DecoderImpl::HandleGetSynciv(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleGetTexParameterfv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetTexParameterfv& c =
|
| - *static_cast<const gles2::cmds::GetTexParameterfv*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetTexParameterfv& c =
|
| + *static_cast<const volatile gles2::cmds::GetTexParameterfv*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetTexParameterfv::Result Result;
|
| @@ -2305,10 +2265,9 @@ error::Error GLES2DecoderImpl::HandleGetTexParameterfv(
|
|
|
| error::Error GLES2DecoderImpl::HandleGetTexParameteriv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetTexParameteriv& c =
|
| - *static_cast<const gles2::cmds::GetTexParameteriv*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetTexParameteriv& c =
|
| + *static_cast<const volatile gles2::cmds::GetTexParameteriv*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetTexParameteriv::Result Result;
|
| @@ -2343,10 +2302,9 @@ error::Error GLES2DecoderImpl::HandleGetTexParameteriv(
|
|
|
| error::Error GLES2DecoderImpl::HandleGetVertexAttribfv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetVertexAttribfv& c =
|
| - *static_cast<const gles2::cmds::GetVertexAttribfv*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetVertexAttribfv& c =
|
| + *static_cast<const volatile gles2::cmds::GetVertexAttribfv*>(cmd_data);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetVertexAttribfv::Result Result;
|
| @@ -2377,10 +2335,9 @@ error::Error GLES2DecoderImpl::HandleGetVertexAttribfv(
|
|
|
| error::Error GLES2DecoderImpl::HandleGetVertexAttribiv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetVertexAttribiv& c =
|
| - *static_cast<const gles2::cmds::GetVertexAttribiv*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetVertexAttribiv& c =
|
| + *static_cast<const volatile gles2::cmds::GetVertexAttribiv*>(cmd_data);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetVertexAttribiv::Result Result;
|
| @@ -2411,12 +2368,11 @@ error::Error GLES2DecoderImpl::HandleGetVertexAttribiv(
|
|
|
| error::Error GLES2DecoderImpl::HandleGetVertexAttribIiv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetVertexAttribIiv& c =
|
| - *static_cast<const gles2::cmds::GetVertexAttribIiv*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetVertexAttribIiv& c =
|
| + *static_cast<const volatile gles2::cmds::GetVertexAttribIiv*>(cmd_data);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetVertexAttribIiv::Result Result;
|
| @@ -2447,12 +2403,11 @@ error::Error GLES2DecoderImpl::HandleGetVertexAttribIiv(
|
|
|
| error::Error GLES2DecoderImpl::HandleGetVertexAttribIuiv(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::GetVertexAttribIuiv& c =
|
| - *static_cast<const gles2::cmds::GetVertexAttribIuiv*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::GetVertexAttribIuiv& c =
|
| + *static_cast<const volatile gles2::cmds::GetVertexAttribIuiv*>(cmd_data);
|
| GLuint index = static_cast<GLuint>(c.index);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| typedef cmds::GetVertexAttribIuiv::Result Result;
|
| @@ -2482,9 +2437,9 @@ error::Error GLES2DecoderImpl::HandleGetVertexAttribIuiv(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleHint(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Hint& c = *static_cast<const gles2::cmds::Hint*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Hint& c =
|
| + *static_cast<const volatile gles2::cmds::Hint*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum mode = static_cast<GLenum>(c.mode);
|
| if (!validators_->hint_target.IsValid(target)) {
|
| @@ -2520,13 +2475,12 @@ error::Error GLES2DecoderImpl::HandleHint(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleInvalidateFramebufferImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::InvalidateFramebufferImmediate& c =
|
| - *static_cast<const gles2::cmds::InvalidateFramebufferImmediate*>(
|
| + const volatile gles2::cmds::InvalidateFramebufferImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::InvalidateFramebufferImmediate*>(
|
| cmd_data);
|
| - (void)c;
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -2537,8 +2491,9 @@ error::Error GLES2DecoderImpl::HandleInvalidateFramebufferImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLenum* attachments =
|
| - GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size);
|
| + volatile const GLenum* attachments =
|
| + GetImmediateDataAs<volatile const GLenum*>(c, data_size,
|
| + immediate_data_size);
|
| if (!validators_->framebuffer_target.IsValid(target)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glInvalidateFramebuffer", target,
|
| "target");
|
| @@ -2558,13 +2513,13 @@ error::Error GLES2DecoderImpl::HandleInvalidateFramebufferImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleInvalidateSubFramebufferImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::InvalidateSubFramebufferImmediate& c =
|
| - *static_cast<const gles2::cmds::InvalidateSubFramebufferImmediate*>(
|
| + const volatile gles2::cmds::InvalidateSubFramebufferImmediate& c =
|
| + *static_cast<
|
| + const volatile gles2::cmds::InvalidateSubFramebufferImmediate*>(
|
| cmd_data);
|
| - (void)c;
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -2575,8 +2530,9 @@ error::Error GLES2DecoderImpl::HandleInvalidateSubFramebufferImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLenum* attachments =
|
| - GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size);
|
| + volatile const GLenum* attachments =
|
| + GetImmediateDataAs<volatile const GLenum*>(c, data_size,
|
| + immediate_data_size);
|
| GLint x = static_cast<GLint>(c.x);
|
| GLint y = static_cast<GLint>(c.y);
|
| GLsizei width = static_cast<GLsizei>(c.width);
|
| @@ -2609,10 +2565,9 @@ error::Error GLES2DecoderImpl::HandleInvalidateSubFramebufferImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleIsBuffer(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsBuffer& c =
|
| - *static_cast<const gles2::cmds::IsBuffer*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsBuffer& c =
|
| + *static_cast<const volatile gles2::cmds::IsBuffer*>(cmd_data);
|
| GLuint buffer = c.buffer;
|
| typedef cmds::IsBuffer::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2625,10 +2580,9 @@ error::Error GLES2DecoderImpl::HandleIsBuffer(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleIsEnabled(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsEnabled& c =
|
| - *static_cast<const gles2::cmds::IsEnabled*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsEnabled& c =
|
| + *static_cast<const volatile gles2::cmds::IsEnabled*>(cmd_data);
|
| GLenum cap = static_cast<GLenum>(c.cap);
|
| typedef cmds::IsEnabled::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2644,11 +2598,11 @@ error::Error GLES2DecoderImpl::HandleIsEnabled(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleIsFramebuffer(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsFramebuffer& c =
|
| - *static_cast<const gles2::cmds::IsFramebuffer*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleIsFramebuffer(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsFramebuffer& c =
|
| + *static_cast<const volatile gles2::cmds::IsFramebuffer*>(cmd_data);
|
| GLuint framebuffer = c.framebuffer;
|
| typedef cmds::IsFramebuffer::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2661,10 +2615,9 @@ error::Error GLES2DecoderImpl::HandleIsFramebuffer(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleIsProgram(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsProgram& c =
|
| - *static_cast<const gles2::cmds::IsProgram*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsProgram& c =
|
| + *static_cast<const volatile gles2::cmds::IsProgram*>(cmd_data);
|
| GLuint program = c.program;
|
| typedef cmds::IsProgram::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2678,10 +2631,9 @@ error::Error GLES2DecoderImpl::HandleIsProgram(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleIsRenderbuffer(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsRenderbuffer& c =
|
| - *static_cast<const gles2::cmds::IsRenderbuffer*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsRenderbuffer& c =
|
| + *static_cast<const volatile gles2::cmds::IsRenderbuffer*>(cmd_data);
|
| GLuint renderbuffer = c.renderbuffer;
|
| typedef cmds::IsRenderbuffer::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2694,12 +2646,11 @@ error::Error GLES2DecoderImpl::HandleIsRenderbuffer(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleIsSampler(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::IsSampler& c =
|
| - *static_cast<const gles2::cmds::IsSampler*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::IsSampler& c =
|
| + *static_cast<const volatile gles2::cmds::IsSampler*>(cmd_data);
|
| GLuint sampler = c.sampler;
|
| typedef cmds::IsSampler::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2712,10 +2663,9 @@ error::Error GLES2DecoderImpl::HandleIsSampler(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleIsShader(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsShader& c =
|
| - *static_cast<const gles2::cmds::IsShader*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsShader& c =
|
| + *static_cast<const volatile gles2::cmds::IsShader*>(cmd_data);
|
| GLuint shader = c.shader;
|
| typedef cmds::IsShader::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2728,12 +2678,11 @@ error::Error GLES2DecoderImpl::HandleIsShader(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleIsSync(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::IsSync& c =
|
| - *static_cast<const gles2::cmds::IsSync*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::IsSync& c =
|
| + *static_cast<const volatile gles2::cmds::IsSync*>(cmd_data);
|
| GLuint sync = c.sync;
|
| typedef cmds::IsSync::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2746,10 +2695,9 @@ error::Error GLES2DecoderImpl::HandleIsSync(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleIsTexture(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsTexture& c =
|
| - *static_cast<const gles2::cmds::IsTexture*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsTexture& c =
|
| + *static_cast<const volatile gles2::cmds::IsTexture*>(cmd_data);
|
| GLuint texture = c.texture;
|
| typedef cmds::IsTexture::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2763,12 +2711,11 @@ error::Error GLES2DecoderImpl::HandleIsTexture(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleIsTransformFeedback(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::IsTransformFeedback& c =
|
| - *static_cast<const gles2::cmds::IsTransformFeedback*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::IsTransformFeedback& c =
|
| + *static_cast<const volatile gles2::cmds::IsTransformFeedback*>(cmd_data);
|
| GLuint transformfeedback = c.transformfeedback;
|
| typedef cmds::IsTransformFeedback::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -2781,10 +2728,9 @@ error::Error GLES2DecoderImpl::HandleIsTransformFeedback(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleLineWidth(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::LineWidth& c =
|
| - *static_cast<const gles2::cmds::LineWidth*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::LineWidth& c =
|
| + *static_cast<const volatile gles2::cmds::LineWidth*>(cmd_data);
|
| GLfloat width = static_cast<GLfloat>(c.width);
|
| if (width <= 0.0f || std::isnan(width)) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "LineWidth", "width out of range");
|
| @@ -2797,11 +2743,11 @@ error::Error GLES2DecoderImpl::HandleLineWidth(uint32_t immediate_data_size,
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleLinkProgram(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::LinkProgram& c =
|
| - *static_cast<const gles2::cmds::LinkProgram*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleLinkProgram(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::LinkProgram& c =
|
| + *static_cast<const volatile gles2::cmds::LinkProgram*>(cmd_data);
|
| GLuint program = c.program;
|
| DoLinkProgram(program);
|
| return error::kNoError;
|
| @@ -2809,21 +2755,18 @@ error::Error GLES2DecoderImpl::HandleLinkProgram(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandlePauseTransformFeedback(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::PauseTransformFeedback& c =
|
| - *static_cast<const gles2::cmds::PauseTransformFeedback*>(cmd_data);
|
| - (void)c;
|
| DoPauseTransformFeedback();
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandlePolygonOffset(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::PolygonOffset& c =
|
| - *static_cast<const gles2::cmds::PolygonOffset*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandlePolygonOffset(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::PolygonOffset& c =
|
| + *static_cast<const volatile gles2::cmds::PolygonOffset*>(cmd_data);
|
| GLfloat factor = static_cast<GLfloat>(c.factor);
|
| GLfloat units = static_cast<GLfloat>(c.units);
|
| if (state_.polygon_offset_factor != factor ||
|
| @@ -2836,12 +2779,11 @@ error::Error GLES2DecoderImpl::HandlePolygonOffset(uint32_t immediate_data_size,
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleReadBuffer(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::ReadBuffer& c =
|
| - *static_cast<const gles2::cmds::ReadBuffer*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::ReadBuffer& c =
|
| + *static_cast<const volatile gles2::cmds::ReadBuffer*>(cmd_data);
|
| GLenum src = static_cast<GLenum>(c.src);
|
| if (!validators_->read_buffer.IsValid(src)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glReadBuffer", src, "src");
|
| @@ -2853,20 +2795,16 @@ error::Error GLES2DecoderImpl::HandleReadBuffer(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleReleaseShaderCompiler(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ReleaseShaderCompiler& c =
|
| - *static_cast<const gles2::cmds::ReleaseShaderCompiler*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| DoReleaseShaderCompiler();
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleRenderbufferStorage(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::RenderbufferStorage& c =
|
| - *static_cast<const gles2::cmds::RenderbufferStorage*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::RenderbufferStorage& c =
|
| + *static_cast<const volatile gles2::cmds::RenderbufferStorage*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum internalformat = static_cast<GLenum>(c.internalformat);
|
| GLsizei width = static_cast<GLsizei>(c.width);
|
| @@ -2894,22 +2832,18 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorage(
|
|
|
| error::Error GLES2DecoderImpl::HandleResumeTransformFeedback(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::ResumeTransformFeedback& c =
|
| - *static_cast<const gles2::cmds::ResumeTransformFeedback*>(cmd_data);
|
| - (void)c;
|
| DoResumeTransformFeedback();
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleSampleCoverage(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::SampleCoverage& c =
|
| - *static_cast<const gles2::cmds::SampleCoverage*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::SampleCoverage& c =
|
| + *static_cast<const volatile gles2::cmds::SampleCoverage*>(cmd_data);
|
| GLclampf value = static_cast<GLclampf>(c.value);
|
| GLboolean invert = static_cast<GLboolean>(c.invert);
|
| DoSampleCoverage(value, invert);
|
| @@ -2918,12 +2852,11 @@ error::Error GLES2DecoderImpl::HandleSampleCoverage(
|
|
|
| error::Error GLES2DecoderImpl::HandleSamplerParameterf(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::SamplerParameterf& c =
|
| - *static_cast<const gles2::cmds::SamplerParameterf*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::SamplerParameterf& c =
|
| + *static_cast<const volatile gles2::cmds::SamplerParameterf*>(cmd_data);
|
| GLuint sampler = c.sampler;
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| GLfloat param = static_cast<GLfloat>(c.param);
|
| @@ -2937,12 +2870,12 @@ error::Error GLES2DecoderImpl::HandleSamplerParameterf(
|
|
|
| error::Error GLES2DecoderImpl::HandleSamplerParameterfvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::SamplerParameterfvImmediate& c =
|
| - *static_cast<const gles2::cmds::SamplerParameterfvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::SamplerParameterfvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::SamplerParameterfvImmediate*>(
|
| + cmd_data);
|
| GLuint sampler = c.sampler;
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| uint32_t data_size;
|
| @@ -2952,8 +2885,8 @@ error::Error GLES2DecoderImpl::HandleSamplerParameterfvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* params =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* params = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->sampler_parameter.IsValid(pname)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameterfv", pname, "pname");
|
| return error::kNoError;
|
| @@ -2967,12 +2900,11 @@ error::Error GLES2DecoderImpl::HandleSamplerParameterfvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleSamplerParameteri(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::SamplerParameteri& c =
|
| - *static_cast<const gles2::cmds::SamplerParameteri*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::SamplerParameteri& c =
|
| + *static_cast<const volatile gles2::cmds::SamplerParameteri*>(cmd_data);
|
| GLuint sampler = c.sampler;
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| GLint param = static_cast<GLint>(c.param);
|
| @@ -2986,12 +2918,12 @@ error::Error GLES2DecoderImpl::HandleSamplerParameteri(
|
|
|
| error::Error GLES2DecoderImpl::HandleSamplerParameterivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::SamplerParameterivImmediate& c =
|
| - *static_cast<const gles2::cmds::SamplerParameterivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::SamplerParameterivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::SamplerParameterivImmediate*>(
|
| + cmd_data);
|
| GLuint sampler = c.sampler;
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| uint32_t data_size;
|
| @@ -3001,8 +2933,8 @@ error::Error GLES2DecoderImpl::HandleSamplerParameterivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLint* params =
|
| - GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
|
| + volatile const GLint* params = GetImmediateDataAs<volatile const GLint*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->sampler_parameter.IsValid(pname)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glSamplerParameteriv", pname, "pname");
|
| return error::kNoError;
|
| @@ -3015,10 +2947,9 @@ error::Error GLES2DecoderImpl::HandleSamplerParameterivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleScissor(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Scissor& c =
|
| - *static_cast<const gles2::cmds::Scissor*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Scissor& c =
|
| + *static_cast<const volatile gles2::cmds::Scissor*>(cmd_data);
|
| GLint x = static_cast<GLint>(c.x);
|
| GLint y = static_cast<GLint>(c.y);
|
| GLsizei width = static_cast<GLsizei>(c.width);
|
| @@ -3044,10 +2975,9 @@ error::Error GLES2DecoderImpl::HandleScissor(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleShaderSourceBucket(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ShaderSourceBucket& c =
|
| - *static_cast<const gles2::cmds::ShaderSourceBucket*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ShaderSourceBucket& c =
|
| + *static_cast<const volatile gles2::cmds::ShaderSourceBucket*>(cmd_data);
|
| GLuint shader = static_cast<GLuint>(c.shader);
|
|
|
| Bucket* bucket = GetBucket(c.str_bucket_id);
|
| @@ -3069,11 +2999,11 @@ error::Error GLES2DecoderImpl::HandleShaderSourceBucket(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleStencilFunc(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::StencilFunc& c =
|
| - *static_cast<const gles2::cmds::StencilFunc*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleStencilFunc(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::StencilFunc& c =
|
| + *static_cast<const volatile gles2::cmds::StencilFunc*>(cmd_data);
|
| GLenum func = static_cast<GLenum>(c.func);
|
| GLint ref = static_cast<GLint>(c.ref);
|
| GLuint mask = static_cast<GLuint>(c.mask);
|
| @@ -3097,10 +3027,9 @@ error::Error GLES2DecoderImpl::HandleStencilFunc(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleStencilFuncSeparate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::StencilFuncSeparate& c =
|
| - *static_cast<const gles2::cmds::StencilFuncSeparate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::StencilFuncSeparate& c =
|
| + *static_cast<const volatile gles2::cmds::StencilFuncSeparate*>(cmd_data);
|
| GLenum face = static_cast<GLenum>(c.face);
|
| GLenum func = static_cast<GLenum>(c.func);
|
| GLint ref = static_cast<GLint>(c.ref);
|
| @@ -3140,11 +3069,11 @@ error::Error GLES2DecoderImpl::HandleStencilFuncSeparate(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleStencilMask(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::StencilMask& c =
|
| - *static_cast<const gles2::cmds::StencilMask*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleStencilMask(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::StencilMask& c =
|
| + *static_cast<const volatile gles2::cmds::StencilMask*>(cmd_data);
|
| GLuint mask = static_cast<GLuint>(c.mask);
|
| if (state_.stencil_front_writemask != mask ||
|
| state_.stencil_back_writemask != mask) {
|
| @@ -3157,10 +3086,9 @@ error::Error GLES2DecoderImpl::HandleStencilMask(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleStencilMaskSeparate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::StencilMaskSeparate& c =
|
| - *static_cast<const gles2::cmds::StencilMaskSeparate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::StencilMaskSeparate& c =
|
| + *static_cast<const volatile gles2::cmds::StencilMaskSeparate*>(cmd_data);
|
| GLenum face = static_cast<GLenum>(c.face);
|
| GLuint mask = static_cast<GLuint>(c.mask);
|
| if (!validators_->face_type.IsValid(face)) {
|
| @@ -3187,10 +3115,9 @@ error::Error GLES2DecoderImpl::HandleStencilMaskSeparate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleStencilOp(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::StencilOp& c =
|
| - *static_cast<const gles2::cmds::StencilOp*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::StencilOp& c =
|
| + *static_cast<const volatile gles2::cmds::StencilOp*>(cmd_data);
|
| GLenum fail = static_cast<GLenum>(c.fail);
|
| GLenum zfail = static_cast<GLenum>(c.zfail);
|
| GLenum zpass = static_cast<GLenum>(c.zpass);
|
| @@ -3225,10 +3152,9 @@ error::Error GLES2DecoderImpl::HandleStencilOp(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleStencilOpSeparate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::StencilOpSeparate& c =
|
| - *static_cast<const gles2::cmds::StencilOpSeparate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::StencilOpSeparate& c =
|
| + *static_cast<const volatile gles2::cmds::StencilOpSeparate*>(cmd_data);
|
| GLenum face = static_cast<GLenum>(c.face);
|
| GLenum fail = static_cast<GLenum>(c.fail);
|
| GLenum zfail = static_cast<GLenum>(c.zfail);
|
| @@ -3276,11 +3202,11 @@ error::Error GLES2DecoderImpl::HandleStencilOpSeparate(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleTexParameterf(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::TexParameterf& c =
|
| - *static_cast<const gles2::cmds::TexParameterf*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleTexParameterf(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::TexParameterf& c =
|
| + *static_cast<const volatile gles2::cmds::TexParameterf*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| GLfloat param = static_cast<GLfloat>(c.param);
|
| @@ -3298,10 +3224,10 @@ error::Error GLES2DecoderImpl::HandleTexParameterf(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleTexParameterfvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::TexParameterfvImmediate& c =
|
| - *static_cast<const gles2::cmds::TexParameterfvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::TexParameterfvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::TexParameterfvImmediate*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| uint32_t data_size;
|
| @@ -3311,8 +3237,8 @@ error::Error GLES2DecoderImpl::HandleTexParameterfvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* params =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* params = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexParameterfv", target, "target");
|
| return error::kNoError;
|
| @@ -3328,11 +3254,11 @@ error::Error GLES2DecoderImpl::HandleTexParameterfvImmediate(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleTexParameteri(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::TexParameteri& c =
|
| - *static_cast<const gles2::cmds::TexParameteri*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleTexParameteri(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::TexParameteri& c =
|
| + *static_cast<const volatile gles2::cmds::TexParameteri*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| GLint param = static_cast<GLint>(c.param);
|
| @@ -3350,10 +3276,10 @@ error::Error GLES2DecoderImpl::HandleTexParameteri(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleTexParameterivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::TexParameterivImmediate& c =
|
| - *static_cast<const gles2::cmds::TexParameterivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::TexParameterivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::TexParameterivImmediate*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLenum pname = static_cast<GLenum>(c.pname);
|
| uint32_t data_size;
|
| @@ -3363,8 +3289,8 @@ error::Error GLES2DecoderImpl::HandleTexParameterivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLint* params =
|
| - GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
|
| + volatile const GLint* params = GetImmediateDataAs<volatile const GLint*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexParameteriv", target, "target");
|
| return error::kNoError;
|
| @@ -3380,13 +3306,13 @@ error::Error GLES2DecoderImpl::HandleTexParameterivImmediate(
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleTexStorage3D(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| +error::Error GLES2DecoderImpl::HandleTexStorage3D(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::TexStorage3D& c =
|
| - *static_cast<const gles2::cmds::TexStorage3D*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::TexStorage3D& c =
|
| + *static_cast<const volatile gles2::cmds::TexStorage3D*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLsizei levels = static_cast<GLsizei>(c.levels);
|
| GLenum internalFormat = static_cast<GLenum>(c.internalFormat);
|
| @@ -3424,13 +3350,11 @@ error::Error GLES2DecoderImpl::HandleTexStorage3D(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleTransformFeedbackVaryingsBucket(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::TransformFeedbackVaryingsBucket& c =
|
| - *static_cast<const gles2::cmds::TransformFeedbackVaryingsBucket*>(
|
| - cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::TransformFeedbackVaryingsBucket& c = *static_cast<
|
| + const volatile gles2::cmds::TransformFeedbackVaryingsBucket*>(cmd_data);
|
| GLuint program = static_cast<GLuint>(c.program);
|
|
|
| Bucket* bucket = GetBucket(c.varyings_bucket_id);
|
| @@ -3459,10 +3383,9 @@ error::Error GLES2DecoderImpl::HandleTransformFeedbackVaryingsBucket(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform1f(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform1f& c =
|
| - *static_cast<const gles2::cmds::Uniform1f*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform1f& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform1f*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLfloat x = static_cast<GLfloat>(c.x);
|
| GLfloat temp[1] = {
|
| @@ -3474,10 +3397,9 @@ error::Error GLES2DecoderImpl::HandleUniform1f(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform1fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform1fvImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform1fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform1fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform1fvImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3488,8 +3410,8 @@ error::Error GLES2DecoderImpl::HandleUniform1fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* v =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* v = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform1fv", "count < 0");
|
| return error::kNoError;
|
| @@ -3502,10 +3424,9 @@ error::Error GLES2DecoderImpl::HandleUniform1fvImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform1i(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform1i& c =
|
| - *static_cast<const gles2::cmds::Uniform1i*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform1i& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform1i*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLint x = static_cast<GLint>(c.x);
|
| DoUniform1i(location, x);
|
| @@ -3514,10 +3435,9 @@ error::Error GLES2DecoderImpl::HandleUniform1i(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform1ivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform1ivImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform1ivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform1ivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform1ivImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3528,8 +3448,8 @@ error::Error GLES2DecoderImpl::HandleUniform1ivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLint* v =
|
| - GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
|
| + volatile const GLint* v = GetImmediateDataAs<volatile const GLint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform1iv", "count < 0");
|
| return error::kNoError;
|
| @@ -3542,12 +3462,11 @@ error::Error GLES2DecoderImpl::HandleUniform1ivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform1ui(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::Uniform1ui& c =
|
| - *static_cast<const gles2::cmds::Uniform1ui*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::Uniform1ui& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform1ui*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLuint x = static_cast<GLuint>(c.x);
|
| GLuint temp[1] = {
|
| @@ -3559,12 +3478,11 @@ error::Error GLES2DecoderImpl::HandleUniform1ui(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform1uivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::Uniform1uivImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform1uivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::Uniform1uivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform1uivImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3575,8 +3493,8 @@ error::Error GLES2DecoderImpl::HandleUniform1uivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* v =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* v = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform1uiv", "count < 0");
|
| return error::kNoError;
|
| @@ -3589,10 +3507,9 @@ error::Error GLES2DecoderImpl::HandleUniform1uivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform2f(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform2f& c =
|
| - *static_cast<const gles2::cmds::Uniform2f*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform2f& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform2f*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLfloat x = static_cast<GLfloat>(c.x);
|
| GLfloat y = static_cast<GLfloat>(c.y);
|
| @@ -3605,10 +3522,9 @@ error::Error GLES2DecoderImpl::HandleUniform2f(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform2fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform2fvImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform2fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform2fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform2fvImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3619,8 +3535,8 @@ error::Error GLES2DecoderImpl::HandleUniform2fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* v =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* v = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform2fv", "count < 0");
|
| return error::kNoError;
|
| @@ -3633,10 +3549,9 @@ error::Error GLES2DecoderImpl::HandleUniform2fvImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform2i(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform2i& c =
|
| - *static_cast<const gles2::cmds::Uniform2i*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform2i& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform2i*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLint x = static_cast<GLint>(c.x);
|
| GLint y = static_cast<GLint>(c.y);
|
| @@ -3649,10 +3564,9 @@ error::Error GLES2DecoderImpl::HandleUniform2i(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform2ivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform2ivImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform2ivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform2ivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform2ivImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3663,8 +3577,8 @@ error::Error GLES2DecoderImpl::HandleUniform2ivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLint* v =
|
| - GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
|
| + volatile const GLint* v = GetImmediateDataAs<volatile const GLint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform2iv", "count < 0");
|
| return error::kNoError;
|
| @@ -3677,12 +3591,11 @@ error::Error GLES2DecoderImpl::HandleUniform2ivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform2ui(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::Uniform2ui& c =
|
| - *static_cast<const gles2::cmds::Uniform2ui*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::Uniform2ui& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform2ui*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLuint x = static_cast<GLuint>(c.x);
|
| GLuint y = static_cast<GLuint>(c.y);
|
| @@ -3695,12 +3608,11 @@ error::Error GLES2DecoderImpl::HandleUniform2ui(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform2uivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::Uniform2uivImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform2uivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::Uniform2uivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform2uivImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3711,8 +3623,8 @@ error::Error GLES2DecoderImpl::HandleUniform2uivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* v =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* v = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform2uiv", "count < 0");
|
| return error::kNoError;
|
| @@ -3725,10 +3637,9 @@ error::Error GLES2DecoderImpl::HandleUniform2uivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform3f(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform3f& c =
|
| - *static_cast<const gles2::cmds::Uniform3f*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform3f& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform3f*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLfloat x = static_cast<GLfloat>(c.x);
|
| GLfloat y = static_cast<GLfloat>(c.y);
|
| @@ -3742,10 +3653,9 @@ error::Error GLES2DecoderImpl::HandleUniform3f(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform3fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform3fvImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform3fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform3fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform3fvImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3756,8 +3666,8 @@ error::Error GLES2DecoderImpl::HandleUniform3fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* v =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* v = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform3fv", "count < 0");
|
| return error::kNoError;
|
| @@ -3770,10 +3680,9 @@ error::Error GLES2DecoderImpl::HandleUniform3fvImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform3i(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform3i& c =
|
| - *static_cast<const gles2::cmds::Uniform3i*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform3i& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform3i*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLint x = static_cast<GLint>(c.x);
|
| GLint y = static_cast<GLint>(c.y);
|
| @@ -3787,10 +3696,9 @@ error::Error GLES2DecoderImpl::HandleUniform3i(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform3ivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform3ivImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform3ivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform3ivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform3ivImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3801,8 +3709,8 @@ error::Error GLES2DecoderImpl::HandleUniform3ivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLint* v =
|
| - GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
|
| + volatile const GLint* v = GetImmediateDataAs<volatile const GLint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform3iv", "count < 0");
|
| return error::kNoError;
|
| @@ -3815,12 +3723,11 @@ error::Error GLES2DecoderImpl::HandleUniform3ivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform3ui(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::Uniform3ui& c =
|
| - *static_cast<const gles2::cmds::Uniform3ui*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::Uniform3ui& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform3ui*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLuint x = static_cast<GLuint>(c.x);
|
| GLuint y = static_cast<GLuint>(c.y);
|
| @@ -3834,12 +3741,11 @@ error::Error GLES2DecoderImpl::HandleUniform3ui(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform3uivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::Uniform3uivImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform3uivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::Uniform3uivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform3uivImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3850,8 +3756,8 @@ error::Error GLES2DecoderImpl::HandleUniform3uivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* v =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* v = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform3uiv", "count < 0");
|
| return error::kNoError;
|
| @@ -3864,10 +3770,9 @@ error::Error GLES2DecoderImpl::HandleUniform3uivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform4f(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform4f& c =
|
| - *static_cast<const gles2::cmds::Uniform4f*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform4f& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform4f*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLfloat x = static_cast<GLfloat>(c.x);
|
| GLfloat y = static_cast<GLfloat>(c.y);
|
| @@ -3882,10 +3787,9 @@ error::Error GLES2DecoderImpl::HandleUniform4f(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform4fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform4fvImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform4fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform4fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform4fvImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3896,8 +3800,8 @@ error::Error GLES2DecoderImpl::HandleUniform4fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* v =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* v = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform4fv", "count < 0");
|
| return error::kNoError;
|
| @@ -3910,10 +3814,9 @@ error::Error GLES2DecoderImpl::HandleUniform4fvImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform4i(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform4i& c =
|
| - *static_cast<const gles2::cmds::Uniform4i*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform4i& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform4i*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLint x = static_cast<GLint>(c.x);
|
| GLint y = static_cast<GLint>(c.y);
|
| @@ -3928,10 +3831,9 @@ error::Error GLES2DecoderImpl::HandleUniform4i(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform4ivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Uniform4ivImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform4ivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Uniform4ivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform4ivImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3942,8 +3844,8 @@ error::Error GLES2DecoderImpl::HandleUniform4ivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLint* v =
|
| - GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
|
| + volatile const GLint* v = GetImmediateDataAs<volatile const GLint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform4iv", "count < 0");
|
| return error::kNoError;
|
| @@ -3956,12 +3858,11 @@ error::Error GLES2DecoderImpl::HandleUniform4ivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform4ui(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::Uniform4ui& c =
|
| - *static_cast<const gles2::cmds::Uniform4ui*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::Uniform4ui& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform4ui*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLuint x = static_cast<GLuint>(c.x);
|
| GLuint y = static_cast<GLuint>(c.y);
|
| @@ -3976,12 +3877,11 @@ error::Error GLES2DecoderImpl::HandleUniform4ui(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleUniform4uivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::Uniform4uivImmediate& c =
|
| - *static_cast<const gles2::cmds::Uniform4uivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::Uniform4uivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::Uniform4uivImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| @@ -3992,8 +3892,8 @@ error::Error GLES2DecoderImpl::HandleUniform4uivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* v =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* v = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniform4uiv", "count < 0");
|
| return error::kNoError;
|
| @@ -4007,10 +3907,10 @@ error::Error GLES2DecoderImpl::HandleUniform4uivImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix2fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::UniformMatrix2fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix2fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::UniformMatrix2fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix2fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4022,8 +3922,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix2fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix2fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4037,12 +3937,12 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix2fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix2x3fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::UniformMatrix2x3fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix2x3fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::UniformMatrix2x3fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix2x3fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4054,8 +3954,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix2x3fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix2x3fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4069,12 +3969,12 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix2x3fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix2x4fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::UniformMatrix2x4fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix2x4fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::UniformMatrix2x4fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix2x4fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4086,8 +3986,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix2x4fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix2x4fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4101,10 +4001,10 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix2x4fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix3fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::UniformMatrix3fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix3fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::UniformMatrix3fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix3fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4116,8 +4016,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix3fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix3fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4131,12 +4031,12 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix3fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix3x2fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::UniformMatrix3x2fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix3x2fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::UniformMatrix3x2fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix3x2fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4148,8 +4048,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix3x2fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix3x2fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4163,12 +4063,12 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix3x2fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix3x4fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::UniformMatrix3x4fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix3x4fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::UniformMatrix3x4fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix3x4fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4180,8 +4080,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix3x4fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix3x4fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4195,10 +4095,10 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix3x4fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix4fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::UniformMatrix4fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix4fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::UniformMatrix4fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix4fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4210,8 +4110,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix4fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix4fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4225,12 +4125,12 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix4fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix4x2fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::UniformMatrix4x2fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix4x2fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::UniformMatrix4x2fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix4x2fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4242,8 +4142,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix4x2fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix4x2fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4257,12 +4157,12 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix4x2fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleUniformMatrix4x3fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::UniformMatrix4x3fvImmediate& c =
|
| - *static_cast<const gles2::cmds::UniformMatrix4x3fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::UniformMatrix4x3fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::UniformMatrix4x3fvImmediate*>(
|
| + cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| @@ -4274,8 +4174,8 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix4x3fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* value =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* value = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glUniformMatrix4x3fv", "count < 0");
|
| return error::kNoError;
|
| @@ -4288,10 +4188,9 @@ error::Error GLES2DecoderImpl::HandleUniformMatrix4x3fvImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleUseProgram(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::UseProgram& c =
|
| - *static_cast<const gles2::cmds::UseProgram*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::UseProgram& c =
|
| + *static_cast<const volatile gles2::cmds::UseProgram*>(cmd_data);
|
| GLuint program = c.program;
|
| DoUseProgram(program);
|
| return error::kNoError;
|
| @@ -4299,10 +4198,9 @@ error::Error GLES2DecoderImpl::HandleUseProgram(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleValidateProgram(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ValidateProgram& c =
|
| - *static_cast<const gles2::cmds::ValidateProgram*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ValidateProgram& c =
|
| + *static_cast<const volatile gles2::cmds::ValidateProgram*>(cmd_data);
|
| GLuint program = c.program;
|
| DoValidateProgram(program);
|
| return error::kNoError;
|
| @@ -4310,10 +4208,9 @@ error::Error GLES2DecoderImpl::HandleValidateProgram(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttrib1f(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::VertexAttrib1f& c =
|
| - *static_cast<const gles2::cmds::VertexAttrib1f*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::VertexAttrib1f& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttrib1f*>(cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| GLfloat x = static_cast<GLfloat>(c.x);
|
| DoVertexAttrib1f(indx, x);
|
| @@ -4322,10 +4219,10 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib1f(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttrib1fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::VertexAttrib1fvImmediate& c =
|
| - *static_cast<const gles2::cmds::VertexAttrib1fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::VertexAttrib1fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttrib1fvImmediate*>(
|
| + cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| uint32_t data_size;
|
| if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 1, &data_size)) {
|
| @@ -4334,8 +4231,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib1fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* values =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* values = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (values == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4345,10 +4242,9 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib1fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttrib2f(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::VertexAttrib2f& c =
|
| - *static_cast<const gles2::cmds::VertexAttrib2f*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::VertexAttrib2f& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttrib2f*>(cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| GLfloat x = static_cast<GLfloat>(c.x);
|
| GLfloat y = static_cast<GLfloat>(c.y);
|
| @@ -4358,10 +4254,10 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib2f(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttrib2fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::VertexAttrib2fvImmediate& c =
|
| - *static_cast<const gles2::cmds::VertexAttrib2fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::VertexAttrib2fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttrib2fvImmediate*>(
|
| + cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| uint32_t data_size;
|
| if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 2, &data_size)) {
|
| @@ -4370,8 +4266,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib2fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* values =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* values = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (values == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4381,10 +4277,9 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib2fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttrib3f(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::VertexAttrib3f& c =
|
| - *static_cast<const gles2::cmds::VertexAttrib3f*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::VertexAttrib3f& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttrib3f*>(cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| GLfloat x = static_cast<GLfloat>(c.x);
|
| GLfloat y = static_cast<GLfloat>(c.y);
|
| @@ -4395,10 +4290,10 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib3f(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttrib3fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::VertexAttrib3fvImmediate& c =
|
| - *static_cast<const gles2::cmds::VertexAttrib3fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::VertexAttrib3fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttrib3fvImmediate*>(
|
| + cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| uint32_t data_size;
|
| if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 3, &data_size)) {
|
| @@ -4407,8 +4302,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib3fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* values =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* values = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (values == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4418,10 +4313,9 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib3fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttrib4f(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::VertexAttrib4f& c =
|
| - *static_cast<const gles2::cmds::VertexAttrib4f*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::VertexAttrib4f& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttrib4f*>(cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| GLfloat x = static_cast<GLfloat>(c.x);
|
| GLfloat y = static_cast<GLfloat>(c.y);
|
| @@ -4433,10 +4327,10 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib4f(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttrib4fvImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::VertexAttrib4fvImmediate& c =
|
| - *static_cast<const gles2::cmds::VertexAttrib4fvImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::VertexAttrib4fvImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttrib4fvImmediate*>(
|
| + cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| uint32_t data_size;
|
| if (!GLES2Util::ComputeDataSize(1, sizeof(GLfloat), 4, &data_size)) {
|
| @@ -4445,8 +4339,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib4fvImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* values =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* values = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (values == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4456,12 +4350,11 @@ error::Error GLES2DecoderImpl::HandleVertexAttrib4fvImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttribI4i(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::VertexAttribI4i& c =
|
| - *static_cast<const gles2::cmds::VertexAttribI4i*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::VertexAttribI4i& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttribI4i*>(cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| GLint x = static_cast<GLint>(c.x);
|
| GLint y = static_cast<GLint>(c.y);
|
| @@ -4473,12 +4366,12 @@ error::Error GLES2DecoderImpl::HandleVertexAttribI4i(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::VertexAttribI4ivImmediate& c =
|
| - *static_cast<const gles2::cmds::VertexAttribI4ivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::VertexAttribI4ivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttribI4ivImmediate*>(
|
| + cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| uint32_t data_size;
|
| if (!GLES2Util::ComputeDataSize(1, sizeof(GLint), 4, &data_size)) {
|
| @@ -4487,8 +4380,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLint* values =
|
| - GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
|
| + volatile const GLint* values = GetImmediateDataAs<volatile const GLint*>(
|
| + c, data_size, immediate_data_size);
|
| if (values == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4498,12 +4391,11 @@ error::Error GLES2DecoderImpl::HandleVertexAttribI4ivImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttribI4ui(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::VertexAttribI4ui& c =
|
| - *static_cast<const gles2::cmds::VertexAttribI4ui*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::VertexAttribI4ui& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttribI4ui*>(cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| GLuint x = static_cast<GLuint>(c.x);
|
| GLuint y = static_cast<GLuint>(c.y);
|
| @@ -4515,12 +4407,12 @@ error::Error GLES2DecoderImpl::HandleVertexAttribI4ui(
|
|
|
| error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::VertexAttribI4uivImmediate& c =
|
| - *static_cast<const gles2::cmds::VertexAttribI4uivImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::VertexAttribI4uivImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::VertexAttribI4uivImmediate*>(
|
| + cmd_data);
|
| GLuint indx = static_cast<GLuint>(c.indx);
|
| uint32_t data_size;
|
| if (!GLES2Util::ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) {
|
| @@ -4529,8 +4421,8 @@ error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* values =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* values = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (values == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4539,10 +4431,9 @@ error::Error GLES2DecoderImpl::HandleVertexAttribI4uivImmediate(
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleViewport(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::Viewport& c =
|
| - *static_cast<const gles2::cmds::Viewport*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::Viewport& c =
|
| + *static_cast<const volatile gles2::cmds::Viewport*>(cmd_data);
|
| GLint x = static_cast<GLint>(c.x);
|
| GLint y = static_cast<GLint>(c.y);
|
| GLsizei width = static_cast<GLsizei>(c.width);
|
| @@ -4561,10 +4452,10 @@ error::Error GLES2DecoderImpl::HandleViewport(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleBlitFramebufferCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BlitFramebufferCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::BlitFramebufferCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BlitFramebufferCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::BlitFramebufferCHROMIUM*>(
|
| + cmd_data);
|
| if (!features().chromium_framebuffer_multisample) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -4598,11 +4489,11 @@ error::Error GLES2DecoderImpl::HandleBlitFramebufferCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::RenderbufferStorageMultisampleCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::RenderbufferStorageMultisampleCHROMIUM*>(
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::RenderbufferStorageMultisampleCHROMIUM& c =
|
| + *static_cast<
|
| + const volatile gles2::cmds::RenderbufferStorageMultisampleCHROMIUM*>(
|
| cmd_data);
|
| - (void)c;
|
| if (!features().chromium_framebuffer_multisample) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -4646,11 +4537,11 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleEXT(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::RenderbufferStorageMultisampleEXT& c =
|
| - *static_cast<const gles2::cmds::RenderbufferStorageMultisampleEXT*>(
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::RenderbufferStorageMultisampleEXT& c =
|
| + *static_cast<
|
| + const volatile gles2::cmds::RenderbufferStorageMultisampleEXT*>(
|
| cmd_data);
|
| - (void)c;
|
| if (!features().multisampled_render_to_texture) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -4692,11 +4583,11 @@ error::Error GLES2DecoderImpl::HandleRenderbufferStorageMultisampleEXT(
|
|
|
| error::Error GLES2DecoderImpl::HandleFramebufferTexture2DMultisampleEXT(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::FramebufferTexture2DMultisampleEXT& c =
|
| - *static_cast<const gles2::cmds::FramebufferTexture2DMultisampleEXT*>(
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::FramebufferTexture2DMultisampleEXT& c =
|
| + *static_cast<
|
| + const volatile gles2::cmds::FramebufferTexture2DMultisampleEXT*>(
|
| cmd_data);
|
| - (void)c;
|
| if (!features().multisampled_render_to_texture) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -4734,10 +4625,9 @@ error::Error GLES2DecoderImpl::HandleFramebufferTexture2DMultisampleEXT(
|
|
|
| error::Error GLES2DecoderImpl::HandleTexStorage2DEXT(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::TexStorage2DEXT& c =
|
| - *static_cast<const gles2::cmds::TexStorage2DEXT*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::TexStorage2DEXT& c =
|
| + *static_cast<const volatile gles2::cmds::TexStorage2DEXT*>(cmd_data);
|
| if (!features().ext_texture_storage) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -4774,17 +4664,17 @@ error::Error GLES2DecoderImpl::HandleTexStorage2DEXT(
|
|
|
| error::Error GLES2DecoderImpl::HandleGenQueriesEXTImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GenQueriesEXTImmediate& c =
|
| - *static_cast<const gles2::cmds::GenQueriesEXTImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GenQueriesEXTImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::GenQueriesEXTImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - GLuint* queries =
|
| - GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size);
|
| + volatile GLuint* queries =
|
| + GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size);
|
| if (queries == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4800,17 +4690,17 @@ error::Error GLES2DecoderImpl::HandleGenQueriesEXTImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteQueriesEXTImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DeleteQueriesEXTImmediate& c =
|
| - *static_cast<const gles2::cmds::DeleteQueriesEXTImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DeleteQueriesEXTImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DeleteQueriesEXTImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* queries =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* queries = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (queries == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4820,12 +4710,12 @@ error::Error GLES2DecoderImpl::HandleDeleteQueriesEXTImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleBeginTransformFeedback(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::BeginTransformFeedback& c =
|
| - *static_cast<const gles2::cmds::BeginTransformFeedback*>(cmd_data);
|
| - (void)c;
|
| + const volatile gles2::cmds::BeginTransformFeedback& c =
|
| + *static_cast<const volatile gles2::cmds::BeginTransformFeedback*>(
|
| + cmd_data);
|
| GLenum primitivemode = static_cast<GLenum>(c.primitivemode);
|
| if (!validators_->transform_feedback_primitive_mode.IsValid(primitivemode)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glBeginTransformFeedback", primitivemode,
|
| @@ -4838,22 +4728,18 @@ error::Error GLES2DecoderImpl::HandleBeginTransformFeedback(
|
|
|
| error::Error GLES2DecoderImpl::HandleEndTransformFeedback(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| + const volatile void* cmd_data) {
|
| if (!unsafe_es3_apis_enabled())
|
| return error::kUnknownCommand;
|
| - const gles2::cmds::EndTransformFeedback& c =
|
| - *static_cast<const gles2::cmds::EndTransformFeedback*>(cmd_data);
|
| - (void)c;
|
| DoEndTransformFeedback();
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleInsertEventMarkerEXT(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::InsertEventMarkerEXT& c =
|
| - *static_cast<const gles2::cmds::InsertEventMarkerEXT*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::InsertEventMarkerEXT& c =
|
| + *static_cast<const volatile gles2::cmds::InsertEventMarkerEXT*>(cmd_data);
|
|
|
| GLuint bucket_id = static_cast<GLuint>(c.bucket_id);
|
| Bucket* bucket = GetBucket(bucket_id);
|
| @@ -4870,10 +4756,9 @@ error::Error GLES2DecoderImpl::HandleInsertEventMarkerEXT(
|
|
|
| error::Error GLES2DecoderImpl::HandlePushGroupMarkerEXT(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::PushGroupMarkerEXT& c =
|
| - *static_cast<const gles2::cmds::PushGroupMarkerEXT*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::PushGroupMarkerEXT& c =
|
| + *static_cast<const volatile gles2::cmds::PushGroupMarkerEXT*>(cmd_data);
|
|
|
| GLuint bucket_id = static_cast<GLuint>(c.bucket_id);
|
| Bucket* bucket = GetBucket(bucket_id);
|
| @@ -4890,27 +4775,24 @@ error::Error GLES2DecoderImpl::HandlePushGroupMarkerEXT(
|
|
|
| error::Error GLES2DecoderImpl::HandlePopGroupMarkerEXT(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::PopGroupMarkerEXT& c =
|
| - *static_cast<const gles2::cmds::PopGroupMarkerEXT*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| DoPopGroupMarkerEXT();
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleGenVertexArraysOESImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GenVertexArraysOESImmediate& c =
|
| - *static_cast<const gles2::cmds::GenVertexArraysOESImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GenVertexArraysOESImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::GenVertexArraysOESImmediate*>(
|
| + cmd_data);
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - GLuint* arrays =
|
| - GetImmediateDataAs<GLuint*>(c, data_size, immediate_data_size);
|
| + volatile GLuint* arrays =
|
| + GetImmediateDataAs<volatile GLuint*>(c, data_size, immediate_data_size);
|
| if (arrays == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4926,18 +4808,17 @@ error::Error GLES2DecoderImpl::HandleGenVertexArraysOESImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleDeleteVertexArraysOESImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DeleteVertexArraysOESImmediate& c =
|
| - *static_cast<const gles2::cmds::DeleteVertexArraysOESImmediate*>(
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DeleteVertexArraysOESImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DeleteVertexArraysOESImmediate*>(
|
| cmd_data);
|
| - (void)c;
|
| GLsizei n = static_cast<GLsizei>(c.n);
|
| uint32_t data_size;
|
| if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* arrays =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* arrays = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (arrays == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
| @@ -4947,10 +4828,9 @@ error::Error GLES2DecoderImpl::HandleDeleteVertexArraysOESImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleIsVertexArrayOES(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsVertexArrayOES& c =
|
| - *static_cast<const gles2::cmds::IsVertexArrayOES*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsVertexArrayOES& c =
|
| + *static_cast<const volatile gles2::cmds::IsVertexArrayOES*>(cmd_data);
|
| GLuint array = c.array;
|
| typedef cmds::IsVertexArrayOES::Result Result;
|
| Result* result_dst = GetSharedMemoryAs<Result*>(
|
| @@ -4964,30 +4844,27 @@ error::Error GLES2DecoderImpl::HandleIsVertexArrayOES(
|
|
|
| error::Error GLES2DecoderImpl::HandleBindVertexArrayOES(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BindVertexArrayOES& c =
|
| - *static_cast<const gles2::cmds::BindVertexArrayOES*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BindVertexArrayOES& c =
|
| + *static_cast<const volatile gles2::cmds::BindVertexArrayOES*>(cmd_data);
|
| GLuint array = c.array;
|
| DoBindVertexArrayOES(array);
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleSwapBuffers(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::SwapBuffers& c =
|
| - *static_cast<const gles2::cmds::SwapBuffers*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleSwapBuffers(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| DoSwapBuffers();
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleGetMaxValueInBufferCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::GetMaxValueInBufferCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::GetMaxValueInBufferCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::GetMaxValueInBufferCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::GetMaxValueInBufferCHROMIUM*>(
|
| + cmd_data);
|
| GLuint buffer_id = c.buffer_id;
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| GLenum type = static_cast<GLenum>(c.type);
|
| @@ -5014,10 +4891,9 @@ error::Error GLES2DecoderImpl::HandleGetMaxValueInBufferCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleCopyTextureCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CopyTextureCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::CopyTextureCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CopyTextureCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::CopyTextureCHROMIUM*>(cmd_data);
|
| GLenum source_id = static_cast<GLenum>(c.source_id);
|
| GLenum dest_id = static_cast<GLenum>(c.dest_id);
|
| GLint internalformat = static_cast<GLint>(c.internalformat);
|
| @@ -5045,10 +4921,10 @@ error::Error GLES2DecoderImpl::HandleCopyTextureCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleCopySubTextureCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CopySubTextureCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::CopySubTextureCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CopySubTextureCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::CopySubTextureCHROMIUM*>(
|
| + cmd_data);
|
| GLenum source_id = static_cast<GLenum>(c.source_id);
|
| GLenum dest_id = static_cast<GLenum>(c.dest_id);
|
| GLint xoffset = static_cast<GLint>(c.xoffset);
|
| @@ -5080,10 +4956,10 @@ error::Error GLES2DecoderImpl::HandleCopySubTextureCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleCompressedCopyTextureCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CompressedCopyTextureCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::CompressedCopyTextureCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CompressedCopyTextureCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::CompressedCopyTextureCHROMIUM*>(
|
| + cmd_data);
|
| GLenum source_id = static_cast<GLenum>(c.source_id);
|
| GLenum dest_id = static_cast<GLenum>(c.dest_id);
|
| DoCompressedCopyTextureCHROMIUM(source_id, dest_id);
|
| @@ -5092,11 +4968,9 @@ error::Error GLES2DecoderImpl::HandleCompressedCopyTextureCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleProduceTextureCHROMIUMImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ProduceTextureCHROMIUMImmediate& c =
|
| - *static_cast<const gles2::cmds::ProduceTextureCHROMIUMImmediate*>(
|
| - cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ProduceTextureCHROMIUMImmediate& c = *static_cast<
|
| + const volatile gles2::cmds::ProduceTextureCHROMIUMImmediate*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| uint32_t data_size;
|
| if (!GLES2Util::ComputeDataSize(1, sizeof(GLbyte), 64, &data_size)) {
|
| @@ -5105,8 +4979,8 @@ error::Error GLES2DecoderImpl::HandleProduceTextureCHROMIUMImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLbyte* mailbox =
|
| - GetImmediateDataAs<const GLbyte*>(c, data_size, immediate_data_size);
|
| + volatile const GLbyte* mailbox = GetImmediateDataAs<volatile const GLbyte*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glProduceTextureCHROMIUM", target,
|
| "target");
|
| @@ -5121,11 +4995,11 @@ error::Error GLES2DecoderImpl::HandleProduceTextureCHROMIUMImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleProduceTextureDirectCHROMIUMImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ProduceTextureDirectCHROMIUMImmediate& c =
|
| - *static_cast<const gles2::cmds::ProduceTextureDirectCHROMIUMImmediate*>(
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ProduceTextureDirectCHROMIUMImmediate& c =
|
| + *static_cast<
|
| + const volatile gles2::cmds::ProduceTextureDirectCHROMIUMImmediate*>(
|
| cmd_data);
|
| - (void)c;
|
| GLuint texture = c.texture;
|
| GLenum target = static_cast<GLenum>(c.target);
|
| uint32_t data_size;
|
| @@ -5135,8 +5009,8 @@ error::Error GLES2DecoderImpl::HandleProduceTextureDirectCHROMIUMImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLbyte* mailbox =
|
| - GetImmediateDataAs<const GLbyte*>(c, data_size, immediate_data_size);
|
| + volatile const GLbyte* mailbox = GetImmediateDataAs<volatile const GLbyte*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glProduceTextureDirectCHROMIUM", target,
|
| "target");
|
| @@ -5151,11 +5025,9 @@ error::Error GLES2DecoderImpl::HandleProduceTextureDirectCHROMIUMImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleConsumeTextureCHROMIUMImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ConsumeTextureCHROMIUMImmediate& c =
|
| - *static_cast<const gles2::cmds::ConsumeTextureCHROMIUMImmediate*>(
|
| - cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ConsumeTextureCHROMIUMImmediate& c = *static_cast<
|
| + const volatile gles2::cmds::ConsumeTextureCHROMIUMImmediate*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| uint32_t data_size;
|
| if (!GLES2Util::ComputeDataSize(1, sizeof(GLbyte), 64, &data_size)) {
|
| @@ -5164,8 +5036,8 @@ error::Error GLES2DecoderImpl::HandleConsumeTextureCHROMIUMImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLbyte* mailbox =
|
| - GetImmediateDataAs<const GLbyte*>(c, data_size, immediate_data_size);
|
| + volatile const GLbyte* mailbox = GetImmediateDataAs<volatile const GLbyte*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glConsumeTextureCHROMIUM", target,
|
| "target");
|
| @@ -5180,10 +5052,10 @@ error::Error GLES2DecoderImpl::HandleConsumeTextureCHROMIUMImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleCreateAndConsumeTextureINTERNALImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CreateAndConsumeTextureINTERNALImmediate& c = *static_cast<
|
| - const gles2::cmds::CreateAndConsumeTextureINTERNALImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CreateAndConsumeTextureINTERNALImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::
|
| + CreateAndConsumeTextureINTERNALImmediate*>(cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLuint texture = static_cast<GLuint>(c.texture);
|
| uint32_t data_size;
|
| @@ -5193,8 +5065,8 @@ error::Error GLES2DecoderImpl::HandleCreateAndConsumeTextureINTERNALImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLbyte* mailbox =
|
| - GetImmediateDataAs<const GLbyte*>(c, data_size, immediate_data_size);
|
| + volatile const GLbyte* mailbox = GetImmediateDataAs<volatile const GLbyte*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glCreateAndConsumeTextureINTERNAL", target,
|
| "target");
|
| @@ -5209,10 +5081,10 @@ error::Error GLES2DecoderImpl::HandleCreateAndConsumeTextureINTERNALImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleBindTexImage2DCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BindTexImage2DCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::BindTexImage2DCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::BindTexImage2DCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::BindTexImage2DCHROMIUM*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint imageId = static_cast<GLint>(c.imageId);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| @@ -5226,10 +5098,10 @@ error::Error GLES2DecoderImpl::HandleBindTexImage2DCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleReleaseTexImage2DCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ReleaseTexImage2DCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::ReleaseTexImage2DCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ReleaseTexImage2DCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::ReleaseTexImage2DCHROMIUM*>(
|
| + cmd_data);
|
| GLenum target = static_cast<GLenum>(c.target);
|
| GLint imageId = static_cast<GLint>(c.imageId);
|
| if (!validators_->texture_bind_target.IsValid(target)) {
|
| @@ -5243,21 +5115,17 @@ error::Error GLES2DecoderImpl::HandleReleaseTexImage2DCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleTraceEndCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::TraceEndCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::TraceEndCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| DoTraceEndCHROMIUM();
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleDiscardFramebufferEXTImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DiscardFramebufferEXTImmediate& c =
|
| - *static_cast<const gles2::cmds::DiscardFramebufferEXTImmediate*>(
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DiscardFramebufferEXTImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DiscardFramebufferEXTImmediate*>(
|
| cmd_data);
|
| - (void)c;
|
| if (!features().ext_discard_framebuffer) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -5272,8 +5140,9 @@ error::Error GLES2DecoderImpl::HandleDiscardFramebufferEXTImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLenum* attachments =
|
| - GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size);
|
| + volatile const GLenum* attachments =
|
| + GetImmediateDataAs<volatile const GLenum*>(c, data_size,
|
| + immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDiscardFramebufferEXT",
|
| "count < 0");
|
| @@ -5288,10 +5157,9 @@ error::Error GLES2DecoderImpl::HandleDiscardFramebufferEXTImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleLoseContextCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::LoseContextCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::LoseContextCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::LoseContextCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::LoseContextCHROMIUM*>(cmd_data);
|
| GLenum current = static_cast<GLenum>(c.current);
|
| GLenum other = static_cast<GLenum>(c.other);
|
| if (!validators_->reset_status.IsValid(current)) {
|
| @@ -5309,10 +5177,10 @@ error::Error GLES2DecoderImpl::HandleLoseContextCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleDrawBuffersEXTImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::DrawBuffersEXTImmediate& c =
|
| - *static_cast<const gles2::cmds::DrawBuffersEXTImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::DrawBuffersEXTImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::DrawBuffersEXTImmediate*>(
|
| + cmd_data);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| if (count >= 0 &&
|
| @@ -5322,8 +5190,8 @@ error::Error GLES2DecoderImpl::HandleDrawBuffersEXTImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLenum* bufs =
|
| - GetImmediateDataAs<const GLenum*>(c, data_size, immediate_data_size);
|
| + volatile const GLenum* bufs = GetImmediateDataAs<volatile const GLenum*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glDrawBuffersEXT", "count < 0");
|
| return error::kNoError;
|
| @@ -5337,12 +5205,10 @@ error::Error GLES2DecoderImpl::HandleDrawBuffersEXTImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleScheduleCALayerInUseQueryCHROMIUMImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ScheduleCALayerInUseQueryCHROMIUMImmediate& c =
|
| - *static_cast<
|
| - const gles2::cmds::ScheduleCALayerInUseQueryCHROMIUMImmediate*>(
|
| - cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::ScheduleCALayerInUseQueryCHROMIUMImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::
|
| + ScheduleCALayerInUseQueryCHROMIUMImmediate*>(cmd_data);
|
| GLsizei count = static_cast<GLsizei>(c.count);
|
| uint32_t data_size = 0;
|
| if (count >= 0 &&
|
| @@ -5352,8 +5218,8 @@ error::Error GLES2DecoderImpl::HandleScheduleCALayerInUseQueryCHROMIUMImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLuint* textures =
|
| - GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
|
| + volatile const GLuint* textures = GetImmediateDataAs<volatile const GLuint*>(
|
| + c, data_size, immediate_data_size);
|
| if (count < 0) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glScheduleCALayerInUseQueryCHROMIUM",
|
| "count < 0");
|
| @@ -5368,19 +5234,16 @@ error::Error GLES2DecoderImpl::HandleScheduleCALayerInUseQueryCHROMIUMImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleCommitOverlayPlanesCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CommitOverlayPlanesCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::CommitOverlayPlanesCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| DoCommitOverlayPlanes();
|
| return error::kNoError;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleSwapInterval(uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::SwapInterval& c =
|
| - *static_cast<const gles2::cmds::SwapInterval*>(cmd_data);
|
| - (void)c;
|
| +error::Error GLES2DecoderImpl::HandleSwapInterval(
|
| + uint32_t immediate_data_size,
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::SwapInterval& c =
|
| + *static_cast<const volatile gles2::cmds::SwapInterval*>(cmd_data);
|
| GLint interval = static_cast<GLint>(c.interval);
|
| DoSwapInterval(interval);
|
| return error::kNoError;
|
| @@ -5388,20 +5251,17 @@ error::Error GLES2DecoderImpl::HandleSwapInterval(uint32_t immediate_data_size,
|
|
|
| error::Error GLES2DecoderImpl::HandleFlushDriverCachesCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::FlushDriverCachesCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::FlushDriverCachesCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| DoFlushDriverCachesCHROMIUM();
|
| return error::kNoError;
|
| }
|
|
|
| error::Error GLES2DecoderImpl::HandleMatrixLoadfCHROMIUMImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::MatrixLoadfCHROMIUMImmediate& c =
|
| - *static_cast<const gles2::cmds::MatrixLoadfCHROMIUMImmediate*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::MatrixLoadfCHROMIUMImmediate& c =
|
| + *static_cast<const volatile gles2::cmds::MatrixLoadfCHROMIUMImmediate*>(
|
| + cmd_data);
|
| if (!features().chromium_path_rendering) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -5414,8 +5274,8 @@ error::Error GLES2DecoderImpl::HandleMatrixLoadfCHROMIUMImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* m =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* m = GetImmediateDataAs<volatile const GLfloat*>(
|
| + c, data_size, immediate_data_size);
|
| if (!validators_->matrix_mode.IsValid(matrixMode)) {
|
| LOCAL_SET_GL_ERROR_INVALID_ENUM("glMatrixLoadfCHROMIUM", matrixMode,
|
| "matrixMode");
|
| @@ -5430,10 +5290,10 @@ error::Error GLES2DecoderImpl::HandleMatrixLoadfCHROMIUMImmediate(
|
|
|
| error::Error GLES2DecoderImpl::HandleMatrixLoadIdentityCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::MatrixLoadIdentityCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::MatrixLoadIdentityCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::MatrixLoadIdentityCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::MatrixLoadIdentityCHROMIUM*>(
|
| + cmd_data);
|
| if (!features().chromium_path_rendering) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -5450,10 +5310,9 @@ error::Error GLES2DecoderImpl::HandleMatrixLoadIdentityCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleIsPathCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::IsPathCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::IsPathCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::IsPathCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::IsPathCHROMIUM*>(cmd_data);
|
| if (!features().chromium_path_rendering) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -5471,10 +5330,10 @@ error::Error GLES2DecoderImpl::HandleIsPathCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandlePathStencilFuncCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::PathStencilFuncCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::PathStencilFuncCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::PathStencilFuncCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::PathStencilFuncCHROMIUM*>(
|
| + cmd_data);
|
| if (!features().chromium_path_rendering) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -5498,10 +5357,10 @@ error::Error GLES2DecoderImpl::HandlePathStencilFuncCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleCoverageModulationCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::CoverageModulationCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::CoverageModulationCHROMIUM*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::CoverageModulationCHROMIUM& c =
|
| + *static_cast<const volatile gles2::cmds::CoverageModulationCHROMIUM*>(
|
| + cmd_data);
|
| if (!features().chromium_framebuffer_mixed_samples) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -5521,10 +5380,7 @@ error::Error GLES2DecoderImpl::HandleCoverageModulationCHROMIUM(
|
|
|
| error::Error GLES2DecoderImpl::HandleBlendBarrierKHR(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::BlendBarrierKHR& c =
|
| - *static_cast<const gles2::cmds::BlendBarrierKHR*>(cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| if (!features().blend_equation_advanced) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -5535,11 +5391,7 @@ error::Error GLES2DecoderImpl::HandleBlendBarrierKHR(
|
|
|
| error::Error GLES2DecoderImpl::HandleApplyScreenSpaceAntialiasingCHROMIUM(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::ApplyScreenSpaceAntialiasingCHROMIUM& c =
|
| - *static_cast<const gles2::cmds::ApplyScreenSpaceAntialiasingCHROMIUM*>(
|
| - cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| if (!features().chromium_screen_space_antialiasing) {
|
| return error::kUnknownCommand;
|
| }
|
| @@ -5551,12 +5403,11 @@ error::Error GLES2DecoderImpl::HandleApplyScreenSpaceAntialiasingCHROMIUM(
|
| error::Error
|
| GLES2DecoderImpl::HandleUniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate(
|
| uint32_t immediate_data_size,
|
| - const void* cmd_data) {
|
| - const gles2::cmds::UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate& c =
|
| - *static_cast<const gles2::cmds::
|
| - UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate*>(
|
| - cmd_data);
|
| - (void)c;
|
| + const volatile void* cmd_data) {
|
| + const volatile gles2::cmds::
|
| + UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate& c = *static_cast<
|
| + const volatile gles2::cmds::
|
| + UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate*>(cmd_data);
|
| GLint location = static_cast<GLint>(c.location);
|
| GLboolean transpose = static_cast<GLboolean>(c.transpose);
|
| uint32_t data_size;
|
| @@ -5566,8 +5417,9 @@ GLES2DecoderImpl::HandleUniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate(
|
| if (data_size > immediate_data_size) {
|
| return error::kOutOfBounds;
|
| }
|
| - const GLfloat* transform =
|
| - GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
|
| + volatile const GLfloat* transform =
|
| + GetImmediateDataAs<volatile const GLfloat*>(c, data_size,
|
| + immediate_data_size);
|
| if (transform == NULL) {
|
| return error::kOutOfBounds;
|
| }
|
|
|