Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h

Issue 2000923002: Only allow TexStorage2DEXT if we expose the extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments, build fixes Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 4390 matching lines...) Expand 10 before | Expand all | Expand 10 after
4401 level, samples); 4401 level, samples);
4402 return error::kNoError; 4402 return error::kNoError;
4403 } 4403 }
4404 4404
4405 error::Error GLES2DecoderImpl::HandleTexStorage2DEXT( 4405 error::Error GLES2DecoderImpl::HandleTexStorage2DEXT(
4406 uint32_t immediate_data_size, 4406 uint32_t immediate_data_size,
4407 const void* cmd_data) { 4407 const void* cmd_data) {
4408 const gles2::cmds::TexStorage2DEXT& c = 4408 const gles2::cmds::TexStorage2DEXT& c =
4409 *static_cast<const gles2::cmds::TexStorage2DEXT*>(cmd_data); 4409 *static_cast<const gles2::cmds::TexStorage2DEXT*>(cmd_data);
4410 (void)c; 4410 (void)c;
4411 if (!features().ext_texture_storage) {
4412 return error::kUnknownCommand;
4413 }
4414
4411 GLenum target = static_cast<GLenum>(c.target); 4415 GLenum target = static_cast<GLenum>(c.target);
4412 GLsizei levels = static_cast<GLsizei>(c.levels); 4416 GLsizei levels = static_cast<GLsizei>(c.levels);
4413 GLenum internalFormat = static_cast<GLenum>(c.internalFormat); 4417 GLenum internalFormat = static_cast<GLenum>(c.internalFormat);
4414 GLsizei width = static_cast<GLsizei>(c.width); 4418 GLsizei width = static_cast<GLsizei>(c.width);
4415 GLsizei height = static_cast<GLsizei>(c.height); 4419 GLsizei height = static_cast<GLsizei>(c.height);
4416 if (!validators_->texture_bind_target.IsValid(target)) { 4420 if (!validators_->texture_bind_target.IsValid(target)) {
4417 LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexStorage2DEXT", target, "target"); 4421 LOCAL_SET_GL_ERROR_INVALID_ENUM("glTexStorage2DEXT", target, "target");
4418 return error::kNoError; 4422 return error::kNoError;
4419 } 4423 }
4420 if (levels < 0) { 4424 if (levels < 0) {
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
5307 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled; 5311 state_.enable_flags.cached_sample_alpha_to_one_ext = enabled;
5308 return true; 5312 return true;
5309 } 5313 }
5310 return false; 5314 return false;
5311 default: 5315 default:
5312 NOTREACHED(); 5316 NOTREACHED();
5313 return false; 5317 return false;
5314 } 5318 }
5315 } 5319 }
5316 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 5320 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698