diff options
author | Miguel Casas-Sanchez <[email protected]> | 2019-11-19 02:21:12 +0000 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-11-19 02:21:12 +0000 |
commit | b1969585749fd9f0975427c47582995749137b2c (patch) | |
tree | 655a8e70b61c32a494973ee78a6b3ce45696b4f1 /src/mesa | |
parent | 1468a4f1f3a2e4c98c5d857a636233c356922807 (diff) |
i965: Ensure that all 2101010 image imports can pass framebuffer completeness.
Chrome OS would like to import and render to any supported format that has
a corresponding display plane format, and this prevents throwing
framebuffer incomplete for FBOs using these textures.
See: crbug.com/949260
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index 95c44a0313a..bcc0853018b 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -637,10 +637,14 @@ intel_image_target_texture_2d(struct gl_context *ctx, GLenum target, image->internal_format != 0 ? image->internal_format : _mesa_get_format_base_format(mt->format); - /* Setup a sized internal format for MESA_FORMAT_R10G10B10[X2|A2]_UNORM. */ + /* Fix the internal format when _mesa_get_format_base_format(mt->format) + * isn't a valid one for that particular format. + */ if (brw->mesa_format_supports_render[image->format]) { if (image->format == MESA_FORMAT_R10G10B10A2_UNORM || - image->format == MESA_FORMAT_R10G10B10X2_UNORM) + image->format == MESA_FORMAT_R10G10B10X2_UNORM || + image->format == MESA_FORMAT_B10G10R10A2_UNORM || + image->format == MESA_FORMAT_B10G10R10X2_UNORM) internal_format = GL_RGB10_A2; } |