summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/blorp/blorp_blit.c20
-rw-r--r--src/intel/isl/isl_format.c73
2 files changed, 64 insertions, 29 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index acabae16081..5bbbf972352 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -2485,10 +2485,30 @@ get_ccs_compatible_uint_format(const struct isl_format_layout *fmtl)
case ISL_FORMAT_B10G10R10A2_UNORM:
case ISL_FORMAT_B10G10R10A2_UNORM_SRGB:
case ISL_FORMAT_R10G10B10A2_UNORM:
+ case ISL_FORMAT_R10G10B10A2_UNORM_SRGB:
case ISL_FORMAT_R10G10B10_FLOAT_A2_UNORM:
case ISL_FORMAT_R10G10B10A2_UINT:
return ISL_FORMAT_R10G10B10A2_UINT;
+ case ISL_FORMAT_R16_UNORM:
+ case ISL_FORMAT_R16_SNORM:
+ case ISL_FORMAT_R16_SINT:
+ case ISL_FORMAT_R16_UINT:
+ case ISL_FORMAT_R16_FLOAT:
+ return ISL_FORMAT_R16_UINT;
+
+ case ISL_FORMAT_R8G8_UNORM:
+ case ISL_FORMAT_R8G8_SNORM:
+ case ISL_FORMAT_R8G8_SINT:
+ case ISL_FORMAT_R8G8_UINT:
+ return ISL_FORMAT_R8G8_UINT;
+
+ case ISL_FORMAT_R8_UNORM:
+ case ISL_FORMAT_R8_SNORM:
+ case ISL_FORMAT_R8_SINT:
+ case ISL_FORMAT_R8_UINT:
+ return ISL_FORMAT_R8_UINT;
+
default:
unreachable("Not a compressible format");
}
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c
index efd6936d4f6..d053a362138 100644
--- a/src/intel/isl/isl_format.c
+++ b/src/intel/isl/isl_format.c
@@ -147,7 +147,7 @@ static const struct surface_format_info format_info[] = {
SF( Y, Y, x, x, Y, Y, x, x, x, x, x, 100, B8G8R8A8_UNORM_SRGB)
/* smpl filt shad CK RT AB VB SO color TW TR ccs_e */
SF( Y, Y, x, x, Y, Y, Y, x, 60, 70, x, 100, R10G10B10A2_UNORM)
- SF( Y, Y, x, x, x, x, x, x, 60, x, x, x, R10G10B10A2_UNORM_SRGB)
+ SF( Y, Y, x, x, x, x, x, x, 60, x, x, 120, R10G10B10A2_UNORM_SRGB)
SF( Y, x, x, x, Y, x, Y, x, x, 70, x, 100, R10G10B10A2_UINT)
SF( Y, Y, x, x, x, x, Y, x, x, x, x, x, R10G10B10_SNORM_A2_UNORM)
SF( Y, Y, x, x, Y, Y, Y, x, 60, 70, 110, 90, R8G8B8A8_UNORM)
@@ -193,21 +193,21 @@ static const struct surface_format_info format_info[] = {
SF( x, x, x, x, x, x, Y, x, x, x, x, x, R16G16_USCALED)
SF( x, x, x, x, x, x, Y, x, x, x, x, x, R32_SSCALED)
SF( x, x, x, x, x, x, Y, x, x, x, x, x, R32_USCALED)
- SF( Y, Y, x, Y, Y, Y, x, x, x, 70, x, x, B5G6R5_UNORM)
- SF( Y, Y, x, x, Y, Y, x, x, x, x, x, x, B5G6R5_UNORM_SRGB)
- SF( Y, Y, x, Y, Y, Y, x, x, x, 70, x, x, B5G5R5A1_UNORM)
- SF( Y, Y, x, x, Y, Y, x, x, x, x, x, x, B5G5R5A1_UNORM_SRGB)
- SF( Y, Y, x, Y, Y, Y, x, x, x, 70, x, x, B4G4R4A4_UNORM)
- SF( Y, Y, x, x, Y, Y, x, x, x, x, x, x, B4G4R4A4_UNORM_SRGB)
- SF( Y, Y, x, x, Y, Y, Y, x, x, 70, 110, x, R8G8_UNORM)
- SF( Y, Y, x, Y, Y, 60, Y, x, x, 70, 110, x, R8G8_SNORM)
- SF( Y, x, x, x, Y, x, Y, x, x, 70, 90, x, R8G8_SINT)
- SF( Y, x, x, x, Y, x, Y, x, x, 70, 75, x, R8G8_UINT)
- SF( Y, Y, Y, x, Y, 45, Y, x, 70, 70, 110, x, R16_UNORM)
- SF( Y, Y, x, x, Y, 60, Y, x, x, 70, 110, x, R16_SNORM)
- SF( Y, x, x, x, Y, x, Y, x, x, 70, 90, x, R16_SINT)
- SF( Y, x, x, x, Y, x, Y, x, x, 70, 75, x, R16_UINT)
- SF( Y, Y, x, x, Y, Y, Y, x, x, 70, 90, x, R16_FLOAT)
+ SF( Y, Y, x, Y, Y, Y, x, x, x, 70, x, 120, B5G6R5_UNORM)
+ SF( Y, Y, x, x, Y, Y, x, x, x, x, x, 120, B5G6R5_UNORM_SRGB)
+ SF( Y, Y, x, Y, Y, Y, x, x, x, 70, x, 120, B5G5R5A1_UNORM)
+ SF( Y, Y, x, x, Y, Y, x, x, x, x, x, 120, B5G5R5A1_UNORM_SRGB)
+ SF( Y, Y, x, Y, Y, Y, x, x, x, 70, x, 120, B4G4R4A4_UNORM)
+ SF( Y, Y, x, x, Y, Y, x, x, x, x, x, 120, B4G4R4A4_UNORM_SRGB)
+ SF( Y, Y, x, x, Y, Y, Y, x, x, 70, 110, 120, R8G8_UNORM)
+ SF( Y, Y, x, Y, Y, 60, Y, x, x, 70, 110, 120, R8G8_SNORM)
+ SF( Y, x, x, x, Y, x, Y, x, x, 70, 90, 120, R8G8_SINT)
+ SF( Y, x, x, x, Y, x, Y, x, x, 70, 75, 120, R8G8_UINT)
+ SF( Y, Y, Y, x, Y, 45, Y, x, 70, 70, 110, 120, R16_UNORM)
+ SF( Y, Y, x, x, Y, 60, Y, x, x, 70, 110, 120, R16_SNORM)
+ SF( Y, x, x, x, Y, x, Y, x, x, 70, 90, 120, R16_SINT)
+ SF( Y, x, x, x, Y, x, Y, x, x, 70, 75, 120, R16_UINT)
+ SF( Y, Y, x, x, Y, Y, Y, x, x, 70, 90, 120, R16_FLOAT)
SF( 50, 50, x, x, x, x, x, x, x, x, x, x, A8P8_UNORM_PALETTE0)
SF( 50, 50, x, x, x, x, x, x, x, x, x, x, A8P8_UNORM_PALETTE1)
SF( Y, Y, Y, x, x, x, x, x, x, x, x, x, I16_UNORM)
@@ -219,8 +219,8 @@ static const struct surface_format_info format_info[] = {
SF( Y, Y, Y, x, x, x, x, x, x, x, x, x, A16_FLOAT)
SF( 45, 45, x, x, x, x, x, x, x, x, x, x, L8A8_UNORM_SRGB)
SF( Y, Y, x, Y, x, x, x, x, x, x, x, x, R5G5_SNORM_B6_UNORM)
- SF( x, x, x, x, Y, Y, x, x, x, 70, x, x, B5G5R5X1_UNORM)
- SF( x, x, x, x, Y, Y, x, x, x, x, x, x, B5G5R5X1_UNORM_SRGB)
+ SF( x, x, x, x, Y, Y, x, x, x, 70, x, 120, B5G5R5X1_UNORM)
+ SF( x, x, x, x, Y, Y, x, x, x, x, x, 120, B5G5R5X1_UNORM_SRGB)
SF( x, x, x, x, x, x, Y, x, x, x, x, x, R8G8_SSCALED)
SF( x, x, x, x, x, x, Y, x, x, x, x, x, R8G8_USCALED)
/* smpl filt shad CK RT AB VB SO color TW TR ccs_e */
@@ -228,19 +228,19 @@ static const struct surface_format_info format_info[] = {
SF( x, x, x, x, x, x, Y, x, x, x, x, x, R16_USCALED)
SF( 50, 50, x, x, x, x, x, x, x, x, x, x, P8A8_UNORM_PALETTE0)
SF( 50, 50, x, x, x, x, x, x, x, x, x, x, P8A8_UNORM_PALETTE1)
- SF( x, x, x, x, x, x, x, x, x, x, x, x, A1B5G5R5_UNORM)
+ SF(120, 120, x, x, 120, 120, x, x, x, x, x, 120, A1B5G5R5_UNORM)
/* According to the PRM, A4B4G4R4_UNORM isn't supported until Sky Lake
* but empirical testing indicates that at least sampling works just fine
* on Broadwell.
*/
- SF( 80, 80, x, x, 90, x, x, x, x, x, x, x, A4B4G4R4_UNORM)
+ SF( 80, 80, x, x, 90, 120, x, x, x, x, x, 120, A4B4G4R4_UNORM)
SF( 90, x, x, x, x, x, x, x, x, x, x, x, L8A8_UINT)
SF( 90, x, x, x, x, x, x, x, x, x, x, x, L8A8_SINT)
- SF( Y, Y, x, 45, Y, Y, Y, x, x, 70, 110, x, R8_UNORM)
- SF( Y, Y, x, x, Y, 60, Y, x, x, 70, 110, x, R8_SNORM)
- SF( Y, x, x, x, Y, x, Y, x, x, 70, 90, x, R8_SINT)
- SF( Y, x, x, x, Y, x, Y, x, x, 70, 75, x, R8_UINT)
- SF( Y, Y, x, Y, Y, Y, x, x, x, 70, 110, x, A8_UNORM)
+ SF( Y, Y, x, 45, Y, Y, Y, x, x, 70, 110, 120, R8_UNORM)
+ SF( Y, Y, x, x, Y, 60, Y, x, x, 70, 110, 120, R8_SNORM)
+ SF( Y, x, x, x, Y, x, Y, x, x, 70, 90, 120, R8_SINT)
+ SF( Y, x, x, x, Y, x, Y, x, x, 70, 75, 120, R8_UINT)
+ SF( Y, Y, x, Y, Y, Y, x, x, x, 70, 110, 120, A8_UNORM)
SF( Y, Y, x, x, x, x, x, x, x, x, x, x, I8_UNORM)
SF( Y, Y, x, Y, x, x, x, x, x, x, x, x, L8_UNORM)
SF( Y, Y, x, x, x, x, x, x, x, x, x, x, P4A4_UNORM_PALETTE0)
@@ -566,12 +566,27 @@ isl_format_supports_ccs_e(const struct gen_device_info *devinfo,
* performing such a copy. We may want to change this behavior in the
* future.
*
- * R11G11B10_FLOAT has no equivalent UINT format. Given how blorp_copy
- * currently works, bit-for-bit copy operations are not possible without an
- * intermediate resolve.
+ * The following formats have no equivalent UINT format. Given how
+ * blorp_copy currently works, bit-for-bit copy operations are not possible
+ * without an intermediate resolve.
*/
- if (format == ISL_FORMAT_R11G11B10_FLOAT)
+ switch (format) {
+ case ISL_FORMAT_R11G11B10_FLOAT:
+ case ISL_FORMAT_B5G5R5X1_UNORM:
+ case ISL_FORMAT_B5G5R5X1_UNORM_SRGB:
+ case ISL_FORMAT_B5G5R5A1_UNORM:
+ case ISL_FORMAT_B5G5R5A1_UNORM_SRGB:
+ case ISL_FORMAT_A4B4G4R4_UNORM:
+ case ISL_FORMAT_B4G4R4A4_UNORM:
+ case ISL_FORMAT_B4G4R4A4_UNORM_SRGB:
+ case ISL_FORMAT_B5G6R5_UNORM:
+ case ISL_FORMAT_B5G6R5_UNORM_SRGB:
+ case ISL_FORMAT_A1B5G5R5_UNORM:
+ case ISL_FORMAT_A8_UNORM:
return false;
+ default:
+ break;
+ }
return format_gen(devinfo) >= format_info[format].ccs_e;
}