SF( x, x, x, x, x, x, Y, x, x, x, x, x, x, R32G32_USCALED)
SF( x, x, x, x, x, x, 75, x, x, x, x, x, x, R32G32_SFIXED)
SF( x, x, x, x, x, x, 80, x, x, x, x, x, 90, R64_PASSTHRU)
- SF( Y, Y, x, Y, Y, Y, Y, x, 60, 70, x, 90, x, B8G8R8A8_UNORM)
+ SF( Y, Y, x, Y, Y, Y, Y, x, 60, 70, 125, 90, x, B8G8R8A8_UNORM)
SF( Y, Y, x, x, Y, Y, x, x, x, x, x, 110, x, B8G8R8A8_UNORM_SRGB)
/* smpl filt shad CK RT AB VB SO color TW TR ccs_e TA */
- SF( Y, Y, x, x, Y, Y, Y, x, 60, 70, x, 110, x, R10G10B10A2_UNORM)
+ SF( Y, Y, x, x, Y, Y, Y, x, 60, 70, 125, 110, x, R10G10B10A2_UNORM)
SF( Y, Y, x, x, x, x, x, x, 60, x, x, 120, x, R10G10B10A2_UNORM_SRGB)
- SF( Y, x, x, x, Y, x, Y, x, x, 70, x, 110, x, R10G10B10A2_UINT)
+ SF( Y, x, x, x, Y, x, Y, x, x, 70, 125, 110, x, R10G10B10A2_UINT)
SF( Y, Y, x, x, x, x, Y, x, x, x, x, x, x, R10G10B10_SNORM_A2_UNORM)
SF( Y, Y, x, x, Y, Y, Y, x, 60, 70, 110, 90, x, R8G8B8A8_UNORM)
SF( Y, Y, x, x, Y, Y, x, x, 60, x, x, 110, x, R8G8B8A8_UNORM_SRGB)
SF( Y, x, x, x, Y, x, Y, x, x, 70, 90, 90, x, R16G16_SINT)
SF( Y, x, x, x, Y, x, Y, x, x, 70, 75, 90, x, R16G16_UINT)
SF( Y, Y, x, x, Y, Y, Y, x, x, 70, 90, 90, x, R16G16_FLOAT)
- SF( Y, Y, x, x, Y, Y, 75, x, 60, 70, x, 110, x, B10G10R10A2_UNORM)
+ SF( Y, Y, x, x, Y, Y, 75, x, 60, 70, 125, 110, x, B10G10R10A2_UNORM)
SF( Y, Y, x, x, Y, Y, x, x, 60, x, x, 110, x, B10G10R10A2_UNORM_SRGB)
- SF( Y, Y, x, x, Y, Y, Y, x, x, 70, x, 110, x, R11G11B10_FLOAT)
- SF(120, 120, x, x, 120, 120, x, x, x, x, x, 120, x, R10G10B10_FLOAT_A2_UNORM)
+ SF( Y, Y, x, x, Y, Y, Y, x, x, 70, 125, 110, x, R11G11B10_FLOAT)
+ SF(120, 120, x, x, 120, 120, x, x, x, 125, 125, 120, x, R10G10B10_FLOAT_A2_UNORM)
SF( Y, x, x, x, Y, x, Y, Y, x, 70, 70, 90, 70, R32_SINT)
SF( Y, x, x, x, Y, x, Y, Y, x, 70, 70, 90, 70, R32_UINT)
SF( Y, 50, Y, x, Y, Y, Y, Y, x, 70, 70, 90, 110, R32_FLOAT)
#include "compiler/brw_compiler.h"
bool
-isl_is_storage_image_format(enum isl_format format)
+isl_is_storage_image_format(const struct intel_device_info *devinfo,
+ enum isl_format format)
{
/* XXX: Maybe we should put this in the CSV? */
*
* "The surface format for the typed atomic integer operations must
* be R32_UINT or R32_SINT."
+ *
+ * But checking the BSpec 1706, you find a different restriction. There the
+ * wording is :
+ *
+ * "The surface format must be one of R32_UINT, R32_SINT or R32_FLOAT"
+ *
+ * The confusion is probably related to atomic integer messages. For
+ * example an IADD instruction would require a R32_UINT/R32_SINT surface.
+ * But a CMPXCHG instruction does not really care about the type, it just
+ * does bit to bit comparison and swap.
+ *
+ * The confusion seems to have propagated to the simulation environment.
+ * Gfx12 has the same restrictions as Gfx11 regarding doing a CMPXCHG on a
+ * R32_FLOAT surface, but the Gfx11 environment will report an error while
+ * Gfx12 passes fine. More importantly HW doesn't seem to mind.
*/
case ISL_FORMAT_R32_FLOAT:
- return ISL_FORMAT_R32_UINT;
+ return format;
/* From HSW to BDW the only 64bpp format supported for typed access is
* RGBA_UINT16. IVB falls back to untyped.
case ISL_FORMAT_R8_SINT:
return (devinfo->ver >= 9 ? format : ISL_FORMAT_R8_UINT);
- /* Neither the 2/10/10/10 nor the 11/11/10 packed formats are supported
+ /* Here the PRMs are a bit out of date. But according to BSpec 47635
+ * (Gfx12.5), the 2/10/10/10 and the 11/11/10 packed formats are supported
* by the hardware.
*/
case ISL_FORMAT_R10G10B10A2_UINT:
case ISL_FORMAT_R10G10B10A2_UNORM:
case ISL_FORMAT_R11G11B10_FLOAT:
- return ISL_FORMAT_R32_UINT;
+ return devinfo->verx10 >= 125 ? format : ISL_FORMAT_R32_UINT;
- /* No normalized fixed-point formats are supported by the hardware. */
+ /* No normalized fixed-point formats are supported by the hardware until Gfx11. */
case ISL_FORMAT_R16G16B16A16_UNORM:
case ISL_FORMAT_R16G16B16A16_SNORM:
- return (devinfo->ver >= 11 ? format :
- devinfo->verx10 >= 75 ?
- ISL_FORMAT_R16G16B16A16_UINT :
- ISL_FORMAT_R32G32_UINT);
+ if (devinfo->ver >= 11)
+ return format;
+ if (devinfo->ver >= 9)
+ return ISL_FORMAT_R32G32_UINT;
+ if (devinfo->verx10 >= 75)
+ return ISL_FORMAT_R16G16B16A16_UINT;
+ return ISL_FORMAT_R32G32_UINT;
case ISL_FORMAT_R8G8B8A8_UNORM:
case ISL_FORMAT_R8G8B8A8_SNORM:
- return (devinfo->ver >= 11 ? format :
- devinfo->verx10 >= 75 ?
- ISL_FORMAT_R8G8B8A8_UINT : ISL_FORMAT_R32_UINT);
+ if (devinfo->ver >= 11)
+ return format;
+ if (devinfo->ver >= 9)
+ return ISL_FORMAT_R32_UINT;
+ if (devinfo->verx10 >= 75)
+ return ISL_FORMAT_R8G8B8A8_UINT;
+ return ISL_FORMAT_R32_UINT;
case ISL_FORMAT_R16G16_UNORM:
case ISL_FORMAT_R16G16_SNORM:
- return (devinfo->ver >= 11 ? format :
- devinfo->verx10 >= 75 ?
- ISL_FORMAT_R16G16_UINT : ISL_FORMAT_R32_UINT);
+ if (devinfo->ver >= 11)
+ return format;
+ if (devinfo->ver >= 9)
+ return ISL_FORMAT_R32_UINT;
+ if (devinfo->verx10 >= 75)
+ return ISL_FORMAT_R16G16_UINT;
+ return ISL_FORMAT_R32_UINT;
case ISL_FORMAT_R8G8_UNORM:
case ISL_FORMAT_R8G8_SNORM:
- return (devinfo->ver >= 11 ? format :
- devinfo->verx10 >= 75 ?
- ISL_FORMAT_R8G8_UINT : ISL_FORMAT_R16_UINT);
+ if (devinfo->ver >= 11)
+ return format;
+ if (devinfo->ver >= 9)
+ return ISL_FORMAT_R16_UINT;
+ if (devinfo->verx10 >= 75)
+ return ISL_FORMAT_R8G8_UINT;
+ return ISL_FORMAT_R16_UINT;
case ISL_FORMAT_R16_UNORM:
case ISL_FORMAT_R16_SNORM: