summaryrefslogtreecommitdiffstats
path: root/src/intel/isl
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2018-05-07 14:47:06 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2018-05-10 14:13:24 -0700
commitb784561c1a0c518f2e7bfe8fcb7b9b900d427bcb (patch)
tree2a74c86927eca680d516fa5535dc51b8a49b42fc /src/intel/isl
parent399962e7c6282837f7999c98b076f1d5ca477a11 (diff)
intel/isl/storage: Don't lower most UNORM formats on gen11+
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
Diffstat (limited to 'src/intel/isl')
-rw-r--r--src/intel/isl/isl_storage_image.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/intel/isl/isl_storage_image.c b/src/intel/isl/isl_storage_image.c
index 20f6fd5faf6..ed1c6008aeb 100644
--- a/src/intel/isl/isl_storage_image.c
+++ b/src/intel/isl/isl_storage_image.c
@@ -161,32 +161,36 @@ isl_lower_storage_image_format(const struct gen_device_info *devinfo,
/* No normalized fixed-point formats are supported by the hardware. */
case ISL_FORMAT_R16G16B16A16_UNORM:
case ISL_FORMAT_R16G16B16A16_SNORM:
- return (devinfo->gen >= 8 || devinfo->is_haswell ?
+ return (devinfo->gen >= 11 ? format :
+ devinfo->gen >= 8 || devinfo->is_haswell ?
ISL_FORMAT_R16G16B16A16_UINT :
ISL_FORMAT_R32G32_UINT);
case ISL_FORMAT_R8G8B8A8_UNORM:
case ISL_FORMAT_R8G8B8A8_SNORM:
- return (devinfo->gen >= 8 || devinfo->is_haswell ?
+ return (devinfo->gen >= 11 ? format :
+ devinfo->gen >= 8 || devinfo->is_haswell ?
ISL_FORMAT_R8G8B8A8_UINT : ISL_FORMAT_R32_UINT);
case ISL_FORMAT_R16G16_UNORM:
case ISL_FORMAT_R16G16_SNORM:
- return (devinfo->gen >= 8 || devinfo->is_haswell ?
+ return (devinfo->gen >= 11 ? format :
+ devinfo->gen >= 8 || devinfo->is_haswell ?
ISL_FORMAT_R16G16_UINT : ISL_FORMAT_R32_UINT);
case ISL_FORMAT_R8G8_UNORM:
case ISL_FORMAT_R8G8_SNORM:
- return (devinfo->gen >= 8 || devinfo->is_haswell ?
+ return (devinfo->gen >= 11 ? format :
+ devinfo->gen >= 8 || devinfo->is_haswell ?
ISL_FORMAT_R8G8_UINT : ISL_FORMAT_R16_UINT);
case ISL_FORMAT_R16_UNORM:
case ISL_FORMAT_R16_SNORM:
- return ISL_FORMAT_R16_UINT;
+ return (devinfo->gen >= 11 ? format : ISL_FORMAT_R16_UINT);
case ISL_FORMAT_R8_UNORM:
case ISL_FORMAT_R8_SNORM:
- return ISL_FORMAT_R8_UINT;
+ return (devinfo->gen >= 11 ? format : ISL_FORMAT_R8_UINT);
default:
assert(!"Unknown image format");