diff options
author | Eric Anholt <[email protected]> | 2013-05-21 14:55:31 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-05-20 23:04:32 -0700 |
commit | 08f87ac333512a77a2701268dd98ef4274c34832 (patch) | |
tree | 8bbba3464e569b5ed5821c8a07aea32ba0803f25 /src | |
parent | c245efe7e8247ba0c845dee7b77e63fdbfc7e1b3 (diff) |
i965: Skip etc-to-rgb transcode on BayTrail.
The hardware does it, so no need for this workaround.
Reviewed-and-tested-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 2dfa7874359..d967b192e5e 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -382,37 +382,39 @@ intel_miptree_create(struct intel_context *intel, gl_format etc_format = MESA_FORMAT_NONE; GLuint total_width, total_height; - switch (format) { - case MESA_FORMAT_ETC1_RGB8: - format = MESA_FORMAT_RGBX8888_REV; - break; - case MESA_FORMAT_ETC2_RGB8: - format = MESA_FORMAT_RGBX8888_REV; - break; - case MESA_FORMAT_ETC2_SRGB8: - case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC: - case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1: - format = MESA_FORMAT_SARGB8; - break; - case MESA_FORMAT_ETC2_RGBA8_EAC: - case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1: - format = MESA_FORMAT_RGBA8888_REV; - break; - case MESA_FORMAT_ETC2_R11_EAC: - format = MESA_FORMAT_R16; - break; - case MESA_FORMAT_ETC2_SIGNED_R11_EAC: - format = MESA_FORMAT_SIGNED_R16; - break; - case MESA_FORMAT_ETC2_RG11_EAC: - format = MESA_FORMAT_GR1616; - break; - case MESA_FORMAT_ETC2_SIGNED_RG11_EAC: - format = MESA_FORMAT_SIGNED_GR1616; - break; - default: - /* Non ETC1 / ETC2 format */ - break; + if (!intel->is_baytrail) { + switch (format) { + case MESA_FORMAT_ETC1_RGB8: + format = MESA_FORMAT_RGBX8888_REV; + break; + case MESA_FORMAT_ETC2_RGB8: + format = MESA_FORMAT_RGBX8888_REV; + break; + case MESA_FORMAT_ETC2_SRGB8: + case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC: + case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1: + format = MESA_FORMAT_SARGB8; + break; + case MESA_FORMAT_ETC2_RGBA8_EAC: + case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1: + format = MESA_FORMAT_RGBA8888_REV; + break; + case MESA_FORMAT_ETC2_R11_EAC: + format = MESA_FORMAT_R16; + break; + case MESA_FORMAT_ETC2_SIGNED_R11_EAC: + format = MESA_FORMAT_SIGNED_R16; + break; + case MESA_FORMAT_ETC2_RG11_EAC: + format = MESA_FORMAT_GR1616; + break; + case MESA_FORMAT_ETC2_SIGNED_RG11_EAC: + format = MESA_FORMAT_SIGNED_GR1616; + break; + default: + /* Non ETC1 / ETC2 format */ + break; + } } etc_format = (format != tex_format) ? tex_format : MESA_FORMAT_NONE; |