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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1344373004: TexSubImage2D no longer needs to match the type in ES3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 0cb463610bbbf8189bab53ef6e755efbaf559b51..e0b1531155a6fc27e5aa30c747d9f1b1a0bb8b31 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -10454,7 +10454,7 @@ void GLES2DecoderImpl::DoCompressedTexSubImage3D(
return;
}
if (!texture->ValidForTexture(target, level, xoffset, yoffset, zoffset,
- width, height, depth, type)) {
+ width, height, depth)) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedTexSubImage3D",
"bad dimensions");
return;
@@ -10661,7 +10661,7 @@ void GLES2DecoderImpl::DoCompressedTexSubImage2D(
return;
}
if (!texture->ValidForTexture(target, level, xoffset, yoffset, 0, width,
- height, 1, type)) {
+ height, 1)) {
LOCAL_SET_GL_ERROR(
GL_INVALID_VALUE, "glCompressedTexSubImage2D", "bad dimensions.");
return;
@@ -10871,7 +10871,7 @@ void GLES2DecoderImpl::DoCopyTexSubImage2D(
GLenum format = 0;
if (!texture->GetLevelType(target, level, &type, &format) ||
!texture->ValidForTexture(
- target, level, xoffset, yoffset, 0, width, height, 1, type)) {
+ target, level, xoffset, yoffset, 0, width, height, 1)) {
LOCAL_SET_GL_ERROR(
GL_INVALID_VALUE, "glCopyTexSubImage2D", "bad dimensions.");
return;
@@ -11026,14 +11026,14 @@ bool GLES2DecoderImpl::ValidateTexSubImage2D(
function_name, format, type, internal_format, level)) {
return false;
}
- if (type != current_type) {
+ if (type != current_type && !feature_info_->IsES3Enabled()) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION,
function_name, "type does not match type of texture.");
return false;
}
if (!texture->ValidForTexture(
- target, level, xoffset, yoffset, 0, width, height, 1, type)) {
+ target, level, xoffset, yoffset, 0, width, height, 1)) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "bad dimensions.");
return false;
}
@@ -13099,7 +13099,7 @@ void GLES2DecoderImpl::DoCopySubTextureCHROMIUM(
source_texture->GetLevelType(source_texture->target(), 0, &source_type,
&source_internal_format);
if (!source_texture->ValidForTexture(source_texture->target(), 0, x, y, 0,
- width, height, 1, source_type)) {
+ width, height, 1)) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopySubTextureCHROMIUM",
"source texture bad dimensions.");
return;
@@ -13115,7 +13115,7 @@ void GLES2DecoderImpl::DoCopySubTextureCHROMIUM(
return;
}
if (!dest_texture->ValidForTexture(dest_texture->target(), 0, xoffset,
- yoffset, 0, width, height, 1, dest_type)) {
+ yoffset, 0, width, height, 1)) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopySubTextureCHROMIUM",
"destination texture bad dimensions.");
return;
@@ -13431,7 +13431,7 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target,
source_texture->GetLevelType(source_texture->target(), 0, &source_type,
&source_internal_format);
if (!source_texture->ValidForTexture(source_texture->target(), 0, x, y, 0,
- width, height, 1, source_type)) {
+ width, height, 1)) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedCopySubTextureCHROMIUM",
"source texture bad dimensions.");
return;
@@ -13448,7 +13448,7 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target,
return;
}
if (!dest_texture->ValidForTexture(dest_texture->target(), 0, xoffset,
- yoffset, 0, width, height, 1, dest_type)) {
+ yoffset, 0, width, height, 1)) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedCopySubTextureCHROMIUM",
"destination texture bad dimensions.");
return;
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698