Commit c9a230f9 authored by Corentin Wallez's avatar Corentin Wallez Committed by Commit Bot

Revert "gpu: support RGB10_A2 in copyTextureCHROMIUM"

This reverts commit 90f6b880.

Reason for revert: see 926185

Original change's description:
> gpu: support RGB10_A2 in copyTextureCHROMIUM
> 
> This CL extends the copyTextureCHROMIUM implementation to support
> RGB10_A2 (see bug for the use case).
> 
> It also extends gl_copy_texture_CHROMIUM_unittest.cc appropriately,
> and cleans it a tiny bit (const, removal of dead code, style).
> 
> For some reason, glCopy(Sub)TextureCHROMIUM() fails on Adreno 4xx,
> this CL adds a workaround for it, see crbug.com/925986.
> 
> Bug: 922198, 925986
> Change-Id: I8e4e95d766e89282cec1fc11e86c2c2fadc807fc
> Reviewed-on: https://chromium-review.googlesource.com/c/1418330
> Commit-Queue: Miguel Casas <mcasas@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#626896}

TBR=mcasas@chromium.org,piman@chromium.org

Change-Id: Ib4702d6cf59885f7c4044977b2d28f9075b6e571
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 922198, 925986
Reviewed-on: https://chromium-review.googlesource.com/c/1443113Reviewed-by: default avatarCorentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627007}
parent 0ebfdcc3
......@@ -903,13 +903,6 @@ CopyTextureMethod GetCopyTextureCHROMIUMMethod(const FeatureInfo* feature_info,
break;
}
// Sometimes glCopyTexImage2D() fails if source is GL_RGB10_A2 and dest isn't.
if (feature_info->workarounds().disable_copy_tex_image_2d_rgb10_a2 &&
source_internal_format == GL_RGB10_A2 &&
dest_internal_format != GL_RGB10_A2) {
return CopyTextureMethod::DRAW_AND_COPY;
}
// CopyTexImage* should not allow internalformat of GL_BGRA_EXT and
// GL_BGRA8_EXT. https://crbug.com/663086.
bool copy_tex_image_format_valid =
......@@ -1025,8 +1018,7 @@ bool ValidateCopyTextureCHROMIUMInternalFormats(const FeatureInfo* feature_info,
source_internal_format == GL_BGRA8_EXT ||
source_internal_format == GL_RGB_YCBCR_420V_CHROMIUM ||
source_internal_format == GL_RGB_YCBCR_422_CHROMIUM ||
source_internal_format == GL_R16_EXT ||
source_internal_format == GL_RGB10_A2;
source_internal_format == GL_R16_EXT;
if (!valid_source_format) {
*output_error_msg = "invalid source internal format " +
GLES2Util::GetStringEnum(source_internal_format);
......
......@@ -43,7 +43,6 @@ enum {
S_FORMAT_RGB_YCBCR_420V_CHROMIUM,
S_FORMAT_RGB_YCBCR_422_CHROMIUM,
S_FORMAT_COMPRESSED,
S_FORMAT_RGB10_A2,
NUM_S_FORMAT
};
......@@ -186,12 +185,8 @@ ShaderId GetFragmentShaderId(bool premultiply_alpha,
case GL_ETC1_RGB8_OES:
sourceFormatIndex = S_FORMAT_COMPRESSED;
break;
case GL_RGB10_A2:
sourceFormatIndex = S_FORMAT_RGB10_A2;
break;
default:
NOTREACHED() << "Invalid source format "
<< gl::GLEnums::GetStringEnum(source_format);
NOTREACHED();
break;
}
......
......@@ -3067,23 +3067,6 @@
"features": [
"disable_direct_composition"
]
},
{
"id": 287,
"description": "glCopyTexImage2D on Adreno 4xx fails if source is GL_RGB10_A2 and destination is not.",
"cr_bugs": [925986],
"os": {
"type": "android",
"version": {
"op": ">=",
"value": "5.0.0"
}
},
"gl_vendor": "Qualcomm.*",
"gl_renderer": ".*4\\d\\d",
"features": [
"disable_copy_tex_image_2d_rgb10_a2"
]
}
]
}
......@@ -106,4 +106,3 @@ use_virtualized_gl_contexts
validate_multisample_buffer_allocation
wake_up_gpu_before_drawing
use_copyteximage2d_instead_of_readpixels_on_multisampled_textures
disable_copy_tex_image_2d_rgb10_a2
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment