From 58793e514b6c57924b08d3a9c766ed05e8d9662a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 1 Mar 2017 23:31:15 -0800 Subject: [PATCH] i965: Replace BRW_SURFACEFORMAT_* with ISL_FORMAT_*. One less set of enums. Dropped the #defines from brw_defines.h and ran: $ for file in *.cpp *.c *.h; do sed -i \ -e 's/BRW_SURFACEFORMAT_/ISL_FORMAT_/g' \ -e 's/ISL_FORMAT_ASTC_[A-Zxs0-9_]*/\U&/g' $file; \ done Signed-off-by: Kenneth Graunke Acked-by: Jason Ekstrand --- .../drivers/dri/i965/brw_binding_tables.c | 2 +- src/mesa/drivers/dri/i965/brw_defines.h | 247 ------------ src/mesa/drivers/dri/i965/brw_draw_upload.c | 262 ++++++------- .../drivers/dri/i965/brw_surface_formats.c | 364 +++++++++--------- .../drivers/dri/i965/brw_wm_surface_state.c | 54 +-- src/mesa/drivers/dri/i965/gen7_cs_state.c | 2 +- .../drivers/dri/i965/gen7_wm_surface_state.c | 10 +- src/mesa/drivers/dri/i965/gen8_draw_upload.c | 14 +- .../drivers/dri/i965/gen8_surface_state.c | 2 +- 9 files changed, 355 insertions(+), 602 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_binding_tables.c b/src/mesa/drivers/dri/i965/brw_binding_tables.c index 9ca841a9de0..7a33002a27f 100644 --- a/src/mesa/drivers/dri/i965/brw_binding_tables.c +++ b/src/mesa/drivers/dri/i965/brw_binding_tables.c @@ -103,7 +103,7 @@ brw_upload_binding_table(struct brw_context *brw, brw_emit_buffer_surface_state( brw, &stage_state->surf_offset[ prog_data->binding_table.shader_time_start], - brw->shader_time.bo, 0, BRW_SURFACEFORMAT_RAW, + brw->shader_time.bo, 0, ISL_FORMAT_RAW, brw->shader_time.bo->size, 1, true); } /* When RS is enabled use hw-binding table uploads, otherwise fallback to diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index b08c40c4f10..0546ba2c778 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -290,255 +290,8 @@ #define BRW_SURFACE_WRITEDISABLE_R_SHIFT 16 #define BRW_SURFACE_WRITEDISABLE_A_SHIFT 17 -#define BRW_SURFACEFORMAT_R32G32B32A32_FLOAT 0x000 -#define BRW_SURFACEFORMAT_R32G32B32A32_SINT 0x001 -#define BRW_SURFACEFORMAT_R32G32B32A32_UINT 0x002 -#define BRW_SURFACEFORMAT_R32G32B32A32_UNORM 0x003 -#define BRW_SURFACEFORMAT_R32G32B32A32_SNORM 0x004 -#define BRW_SURFACEFORMAT_R64G64_FLOAT 0x005 -#define BRW_SURFACEFORMAT_R32G32B32X32_FLOAT 0x006 -#define BRW_SURFACEFORMAT_R32G32B32A32_SSCALED 0x007 -#define BRW_SURFACEFORMAT_R32G32B32A32_USCALED 0x008 -#define BRW_SURFACEFORMAT_R32G32B32A32_SFIXED 0x020 -#define BRW_SURFACEFORMAT_R64G64_PASSTHRU 0x021 -#define BRW_SURFACEFORMAT_R32G32B32_FLOAT 0x040 -#define BRW_SURFACEFORMAT_R32G32B32_SINT 0x041 -#define BRW_SURFACEFORMAT_R32G32B32_UINT 0x042 -#define BRW_SURFACEFORMAT_R32G32B32_UNORM 0x043 -#define BRW_SURFACEFORMAT_R32G32B32_SNORM 0x044 -#define BRW_SURFACEFORMAT_R32G32B32_SSCALED 0x045 -#define BRW_SURFACEFORMAT_R32G32B32_USCALED 0x046 -#define BRW_SURFACEFORMAT_R32G32B32_SFIXED 0x050 -#define BRW_SURFACEFORMAT_R16G16B16A16_UNORM 0x080 -#define BRW_SURFACEFORMAT_R16G16B16A16_SNORM 0x081 -#define BRW_SURFACEFORMAT_R16G16B16A16_SINT 0x082 -#define BRW_SURFACEFORMAT_R16G16B16A16_UINT 0x083 -#define BRW_SURFACEFORMAT_R16G16B16A16_FLOAT 0x084 -#define BRW_SURFACEFORMAT_R32G32_FLOAT 0x085 -#define BRW_SURFACEFORMAT_R32G32_SINT 0x086 -#define BRW_SURFACEFORMAT_R32G32_UINT 0x087 -#define BRW_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS 0x088 -#define BRW_SURFACEFORMAT_X32_TYPELESS_G8X24_UINT 0x089 -#define BRW_SURFACEFORMAT_L32A32_FLOAT 0x08A -#define BRW_SURFACEFORMAT_R32G32_UNORM 0x08B -#define BRW_SURFACEFORMAT_R32G32_SNORM 0x08C -#define BRW_SURFACEFORMAT_R64_FLOAT 0x08D -#define BRW_SURFACEFORMAT_R16G16B16X16_UNORM 0x08E -#define BRW_SURFACEFORMAT_R16G16B16X16_FLOAT 0x08F -#define BRW_SURFACEFORMAT_A32X32_FLOAT 0x090 -#define BRW_SURFACEFORMAT_L32X32_FLOAT 0x091 -#define BRW_SURFACEFORMAT_I32X32_FLOAT 0x092 -#define BRW_SURFACEFORMAT_R16G16B16A16_SSCALED 0x093 -#define BRW_SURFACEFORMAT_R16G16B16A16_USCALED 0x094 -#define BRW_SURFACEFORMAT_R32G32_SSCALED 0x095 -#define BRW_SURFACEFORMAT_R32G32_USCALED 0x096 -#define BRW_SURFACEFORMAT_R32G32_FLOAT_LD 0x097 -#define BRW_SURFACEFORMAT_R32G32_SFIXED 0x0A0 -#define BRW_SURFACEFORMAT_R64_PASSTHRU 0x0A1 -#define BRW_SURFACEFORMAT_B8G8R8A8_UNORM 0x0C0 -#define BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB 0x0C1 -#define BRW_SURFACEFORMAT_R10G10B10A2_UNORM 0x0C2 -#define BRW_SURFACEFORMAT_R10G10B10A2_UNORM_SRGB 0x0C3 -#define BRW_SURFACEFORMAT_R10G10B10A2_UINT 0x0C4 -#define BRW_SURFACEFORMAT_R10G10B10_SNORM_A2_UNORM 0x0C5 -#define BRW_SURFACEFORMAT_R8G8B8A8_UNORM 0x0C7 -#define BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB 0x0C8 -#define BRW_SURFACEFORMAT_R8G8B8A8_SNORM 0x0C9 -#define BRW_SURFACEFORMAT_R8G8B8A8_SINT 0x0CA -#define BRW_SURFACEFORMAT_R8G8B8A8_UINT 0x0CB -#define BRW_SURFACEFORMAT_R16G16_UNORM 0x0CC -#define BRW_SURFACEFORMAT_R16G16_SNORM 0x0CD -#define BRW_SURFACEFORMAT_R16G16_SINT 0x0CE -#define BRW_SURFACEFORMAT_R16G16_UINT 0x0CF -#define BRW_SURFACEFORMAT_R16G16_FLOAT 0x0D0 -#define BRW_SURFACEFORMAT_B10G10R10A2_UNORM 0x0D1 -#define BRW_SURFACEFORMAT_B10G10R10A2_UNORM_SRGB 0x0D2 -#define BRW_SURFACEFORMAT_R11G11B10_FLOAT 0x0D3 -#define BRW_SURFACEFORMAT_R32_SINT 0x0D6 -#define BRW_SURFACEFORMAT_R32_UINT 0x0D7 -#define BRW_SURFACEFORMAT_R32_FLOAT 0x0D8 -#define BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS 0x0D9 -#define BRW_SURFACEFORMAT_X24_TYPELESS_G8_UINT 0x0DA -#define BRW_SURFACEFORMAT_L16A16_UNORM 0x0DF -#define BRW_SURFACEFORMAT_I24X8_UNORM 0x0E0 -#define BRW_SURFACEFORMAT_L24X8_UNORM 0x0E1 -#define BRW_SURFACEFORMAT_A24X8_UNORM 0x0E2 -#define BRW_SURFACEFORMAT_I32_FLOAT 0x0E3 -#define BRW_SURFACEFORMAT_L32_FLOAT 0x0E4 -#define BRW_SURFACEFORMAT_A32_FLOAT 0x0E5 -#define BRW_SURFACEFORMAT_B8G8R8X8_UNORM 0x0E9 -#define BRW_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB 0x0EA -#define BRW_SURFACEFORMAT_R8G8B8X8_UNORM 0x0EB -#define BRW_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB 0x0EC -#define BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP 0x0ED -#define BRW_SURFACEFORMAT_B10G10R10X2_UNORM 0x0EE -#define BRW_SURFACEFORMAT_L16A16_FLOAT 0x0F0 -#define BRW_SURFACEFORMAT_R32_UNORM 0x0F1 -#define BRW_SURFACEFORMAT_R32_SNORM 0x0F2 -#define BRW_SURFACEFORMAT_R10G10B10X2_USCALED 0x0F3 -#define BRW_SURFACEFORMAT_R8G8B8A8_SSCALED 0x0F4 -#define BRW_SURFACEFORMAT_R8G8B8A8_USCALED 0x0F5 -#define BRW_SURFACEFORMAT_R16G16_SSCALED 0x0F6 -#define BRW_SURFACEFORMAT_R16G16_USCALED 0x0F7 -#define BRW_SURFACEFORMAT_R32_SSCALED 0x0F8 -#define BRW_SURFACEFORMAT_R32_USCALED 0x0F9 -#define BRW_SURFACEFORMAT_B5G6R5_UNORM 0x100 -#define BRW_SURFACEFORMAT_B5G6R5_UNORM_SRGB 0x101 -#define BRW_SURFACEFORMAT_B5G5R5A1_UNORM 0x102 -#define BRW_SURFACEFORMAT_B5G5R5A1_UNORM_SRGB 0x103 -#define BRW_SURFACEFORMAT_B4G4R4A4_UNORM 0x104 -#define BRW_SURFACEFORMAT_B4G4R4A4_UNORM_SRGB 0x105 -#define BRW_SURFACEFORMAT_R8G8_UNORM 0x106 -#define BRW_SURFACEFORMAT_R8G8_SNORM 0x107 -#define BRW_SURFACEFORMAT_R8G8_SINT 0x108 -#define BRW_SURFACEFORMAT_R8G8_UINT 0x109 -#define BRW_SURFACEFORMAT_R16_UNORM 0x10A -#define BRW_SURFACEFORMAT_R16_SNORM 0x10B -#define BRW_SURFACEFORMAT_R16_SINT 0x10C -#define BRW_SURFACEFORMAT_R16_UINT 0x10D -#define BRW_SURFACEFORMAT_R16_FLOAT 0x10E -#define BRW_SURFACEFORMAT_A8P8_UNORM_PALETTE0 0x10F -#define BRW_SURFACEFORMAT_A8P8_UNORM_PALETTE1 0x110 -#define BRW_SURFACEFORMAT_I16_UNORM 0x111 -#define BRW_SURFACEFORMAT_L16_UNORM 0x112 -#define BRW_SURFACEFORMAT_A16_UNORM 0x113 -#define BRW_SURFACEFORMAT_L8A8_UNORM 0x114 -#define BRW_SURFACEFORMAT_I16_FLOAT 0x115 -#define BRW_SURFACEFORMAT_L16_FLOAT 0x116 -#define BRW_SURFACEFORMAT_A16_FLOAT 0x117 -#define BRW_SURFACEFORMAT_L8A8_UNORM_SRGB 0x118 -#define BRW_SURFACEFORMAT_R5G5_SNORM_B6_UNORM 0x119 -#define BRW_SURFACEFORMAT_B5G5R5X1_UNORM 0x11A -#define BRW_SURFACEFORMAT_B5G5R5X1_UNORM_SRGB 0x11B -#define BRW_SURFACEFORMAT_R8G8_SSCALED 0x11C -#define BRW_SURFACEFORMAT_R8G8_USCALED 0x11D -#define BRW_SURFACEFORMAT_R16_SSCALED 0x11E -#define BRW_SURFACEFORMAT_R16_USCALED 0x11F -#define BRW_SURFACEFORMAT_P8A8_UNORM_PALETTE0 0x122 -#define BRW_SURFACEFORMAT_P8A8_UNORM_PALETTE1 0x123 -#define BRW_SURFACEFORMAT_A1B5G5R5_UNORM 0x124 -#define BRW_SURFACEFORMAT_A4B4G4R4_UNORM 0x125 -#define BRW_SURFACEFORMAT_L8A8_UINT 0x126 -#define BRW_SURFACEFORMAT_L8A8_SINT 0x127 -#define BRW_SURFACEFORMAT_R8_UNORM 0x140 -#define BRW_SURFACEFORMAT_R8_SNORM 0x141 -#define BRW_SURFACEFORMAT_R8_SINT 0x142 -#define BRW_SURFACEFORMAT_R8_UINT 0x143 -#define BRW_SURFACEFORMAT_A8_UNORM 0x144 -#define BRW_SURFACEFORMAT_I8_UNORM 0x145 -#define BRW_SURFACEFORMAT_L8_UNORM 0x146 -#define BRW_SURFACEFORMAT_P4A4_UNORM 0x147 -#define BRW_SURFACEFORMAT_A4P4_UNORM 0x148 -#define BRW_SURFACEFORMAT_R8_SSCALED 0x149 -#define BRW_SURFACEFORMAT_R8_USCALED 0x14A -#define BRW_SURFACEFORMAT_P8_UNORM_PALETTE0 0x14B -#define BRW_SURFACEFORMAT_L8_UNORM_SRGB 0x14C -#define BRW_SURFACEFORMAT_P8_UNORM_PALETTE1 0x14D -#define BRW_SURFACEFORMAT_P4A4_UNORM_PALETTE1 0x14E -#define BRW_SURFACEFORMAT_A4P4_UNORM_PALETTE1 0x14F -#define BRW_SURFACEFORMAT_Y8_SNORM 0x150 -#define BRW_SURFACEFORMAT_L8_UINT 0x152 -#define BRW_SURFACEFORMAT_L8_SINT 0x153 -#define BRW_SURFACEFORMAT_I8_UINT 0x154 -#define BRW_SURFACEFORMAT_I8_SINT 0x155 -#define BRW_SURFACEFORMAT_DXT1_RGB_SRGB 0x180 -#define BRW_SURFACEFORMAT_R1_UINT 0x181 -#define BRW_SURFACEFORMAT_YCRCB_NORMAL 0x182 -#define BRW_SURFACEFORMAT_YCRCB_SWAPUVY 0x183 -#define BRW_SURFACEFORMAT_P2_UNORM_PALETTE0 0x184 -#define BRW_SURFACEFORMAT_P2_UNORM_PALETTE1 0x185 -#define BRW_SURFACEFORMAT_BC1_UNORM 0x186 -#define BRW_SURFACEFORMAT_BC2_UNORM 0x187 -#define BRW_SURFACEFORMAT_BC3_UNORM 0x188 -#define BRW_SURFACEFORMAT_BC4_UNORM 0x189 -#define BRW_SURFACEFORMAT_BC5_UNORM 0x18A -#define BRW_SURFACEFORMAT_BC1_UNORM_SRGB 0x18B -#define BRW_SURFACEFORMAT_BC2_UNORM_SRGB 0x18C -#define BRW_SURFACEFORMAT_BC3_UNORM_SRGB 0x18D -#define BRW_SURFACEFORMAT_MONO8 0x18E -#define BRW_SURFACEFORMAT_YCRCB_SWAPUV 0x18F -#define BRW_SURFACEFORMAT_YCRCB_SWAPY 0x190 -#define BRW_SURFACEFORMAT_DXT1_RGB 0x191 -#define BRW_SURFACEFORMAT_FXT1 0x192 -#define BRW_SURFACEFORMAT_R8G8B8_UNORM 0x193 -#define BRW_SURFACEFORMAT_R8G8B8_SNORM 0x194 -#define BRW_SURFACEFORMAT_R8G8B8_SSCALED 0x195 -#define BRW_SURFACEFORMAT_R8G8B8_USCALED 0x196 -#define BRW_SURFACEFORMAT_R64G64B64A64_FLOAT 0x197 -#define BRW_SURFACEFORMAT_R64G64B64_FLOAT 0x198 -#define BRW_SURFACEFORMAT_BC4_SNORM 0x199 -#define BRW_SURFACEFORMAT_BC5_SNORM 0x19A -#define BRW_SURFACEFORMAT_R16G16B16_FLOAT 0x19B -#define BRW_SURFACEFORMAT_R16G16B16_UNORM 0x19C -#define BRW_SURFACEFORMAT_R16G16B16_SNORM 0x19D -#define BRW_SURFACEFORMAT_R16G16B16_SSCALED 0x19E -#define BRW_SURFACEFORMAT_R16G16B16_USCALED 0x19F -#define BRW_SURFACEFORMAT_BC6H_SF16 0x1A1 -#define BRW_SURFACEFORMAT_BC7_UNORM 0x1A2 -#define BRW_SURFACEFORMAT_BC7_UNORM_SRGB 0x1A3 -#define BRW_SURFACEFORMAT_BC6H_UF16 0x1A4 -#define BRW_SURFACEFORMAT_PLANAR_420_8 0x1A5 -#define BRW_SURFACEFORMAT_R8G8B8_UNORM_SRGB 0x1A8 -#define BRW_SURFACEFORMAT_ETC1_RGB8 0x1A9 -#define BRW_SURFACEFORMAT_ETC2_RGB8 0x1AA -#define BRW_SURFACEFORMAT_EAC_R11 0x1AB -#define BRW_SURFACEFORMAT_EAC_RG11 0x1AC -#define BRW_SURFACEFORMAT_EAC_SIGNED_R11 0x1AD -#define BRW_SURFACEFORMAT_EAC_SIGNED_RG11 0x1AE -#define BRW_SURFACEFORMAT_ETC2_SRGB8 0x1AF -#define BRW_SURFACEFORMAT_R16G16B16_UINT 0x1B0 -#define BRW_SURFACEFORMAT_R16G16B16_SINT 0x1B1 -#define BRW_SURFACEFORMAT_R32_SFIXED 0x1B2 -#define BRW_SURFACEFORMAT_R10G10B10A2_SNORM 0x1B3 -#define BRW_SURFACEFORMAT_R10G10B10A2_USCALED 0x1B4 -#define BRW_SURFACEFORMAT_R10G10B10A2_SSCALED 0x1B5 -#define BRW_SURFACEFORMAT_R10G10B10A2_SINT 0x1B6 -#define BRW_SURFACEFORMAT_B10G10R10A2_SNORM 0x1B7 -#define BRW_SURFACEFORMAT_B10G10R10A2_USCALED 0x1B8 -#define BRW_SURFACEFORMAT_B10G10R10A2_SSCALED 0x1B9 -#define BRW_SURFACEFORMAT_B10G10R10A2_UINT 0x1BA -#define BRW_SURFACEFORMAT_B10G10R10A2_SINT 0x1BB -#define BRW_SURFACEFORMAT_R64G64B64A64_PASSTHRU 0x1BC -#define BRW_SURFACEFORMAT_R64G64B64_PASSTHRU 0x1BD -#define BRW_SURFACEFORMAT_ETC2_RGB8_PTA 0x1C0 -#define BRW_SURFACEFORMAT_ETC2_SRGB8_PTA 0x1C1 -#define BRW_SURFACEFORMAT_ETC2_EAC_RGBA8 0x1C2 -#define BRW_SURFACEFORMAT_ETC2_EAC_SRGB8_A8 0x1C3 -#define BRW_SURFACEFORMAT_R8G8B8_UINT 0x1C8 -#define BRW_SURFACEFORMAT_R8G8B8_SINT 0x1C9 -#define BRW_SURFACEFORMAT_RAW 0x1FF - #define GEN9_SURFACE_ASTC_HDR_FORMAT_BIT 0x100 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_4x4_U8sRGB 0x200 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_5x4_U8sRGB 0x208 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_5x5_U8sRGB 0x209 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_6x5_U8sRGB 0x211 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_6x6_U8sRGB 0x212 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_8x5_U8sRGB 0x221 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_8x6_U8sRGB 0x222 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_8x8_U8sRGB 0x224 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_10x5_U8sRGB 0x231 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_10x6_U8sRGB 0x232 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_10x8_U8sRGB 0x234 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_10x10_U8sRGB 0x236 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_12x10_U8sRGB 0x23E -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_12x12_U8sRGB 0x23F -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_4x4_FLT16 0x240 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_5x4_FLT16 0x248 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_5x5_FLT16 0x249 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_6x5_FLT16 0x251 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_6x6_FLT16 0x252 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_8x5_FLT16 0x261 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_8x6_FLT16 0x262 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_8x8_FLT16 0x264 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_10x5_FLT16 0x271 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_10x6_FLT16 0x272 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_10x8_FLT16 0x274 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_10x10_FLT16 0x276 -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_12x10_FLT16 0x27E -#define BRW_SURFACEFORMAT_ASTC_LDR_2D_12x12_FLT16 0x27F - #define BRW_SURFACE_FORMAT_SHIFT 18 #define BRW_SURFACE_FORMAT_MASK INTEL_MASK(26, 18) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 04d7aa9e9bf..025da5e10db 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -39,186 +39,186 @@ static const GLuint double_types_float[5] = { 0, - BRW_SURFACEFORMAT_R64_FLOAT, - BRW_SURFACEFORMAT_R64G64_FLOAT, - BRW_SURFACEFORMAT_R64G64B64_FLOAT, - BRW_SURFACEFORMAT_R64G64B64A64_FLOAT + ISL_FORMAT_R64_FLOAT, + ISL_FORMAT_R64G64_FLOAT, + ISL_FORMAT_R64G64B64_FLOAT, + ISL_FORMAT_R64G64B64A64_FLOAT }; static const GLuint double_types_passthru[5] = { 0, - BRW_SURFACEFORMAT_R64_PASSTHRU, - BRW_SURFACEFORMAT_R64G64_PASSTHRU, - BRW_SURFACEFORMAT_R64G64B64_PASSTHRU, - BRW_SURFACEFORMAT_R64G64B64A64_PASSTHRU + ISL_FORMAT_R64_PASSTHRU, + ISL_FORMAT_R64G64_PASSTHRU, + ISL_FORMAT_R64G64B64_PASSTHRU, + ISL_FORMAT_R64G64B64A64_PASSTHRU }; static const GLuint float_types[5] = { 0, - BRW_SURFACEFORMAT_R32_FLOAT, - BRW_SURFACEFORMAT_R32G32_FLOAT, - BRW_SURFACEFORMAT_R32G32B32_FLOAT, - BRW_SURFACEFORMAT_R32G32B32A32_FLOAT + ISL_FORMAT_R32_FLOAT, + ISL_FORMAT_R32G32_FLOAT, + ISL_FORMAT_R32G32B32_FLOAT, + ISL_FORMAT_R32G32B32A32_FLOAT }; static const GLuint half_float_types[5] = { 0, - BRW_SURFACEFORMAT_R16_FLOAT, - BRW_SURFACEFORMAT_R16G16_FLOAT, - BRW_SURFACEFORMAT_R16G16B16_FLOAT, - BRW_SURFACEFORMAT_R16G16B16A16_FLOAT + ISL_FORMAT_R16_FLOAT, + ISL_FORMAT_R16G16_FLOAT, + ISL_FORMAT_R16G16B16_FLOAT, + ISL_FORMAT_R16G16B16A16_FLOAT }; static const GLuint fixed_point_types[5] = { 0, - BRW_SURFACEFORMAT_R32_SFIXED, - BRW_SURFACEFORMAT_R32G32_SFIXED, - BRW_SURFACEFORMAT_R32G32B32_SFIXED, - BRW_SURFACEFORMAT_R32G32B32A32_SFIXED, + ISL_FORMAT_R32_SFIXED, + ISL_FORMAT_R32G32_SFIXED, + ISL_FORMAT_R32G32B32_SFIXED, + ISL_FORMAT_R32G32B32A32_SFIXED, }; static const GLuint uint_types_direct[5] = { 0, - BRW_SURFACEFORMAT_R32_UINT, - BRW_SURFACEFORMAT_R32G32_UINT, - BRW_SURFACEFORMAT_R32G32B32_UINT, - BRW_SURFACEFORMAT_R32G32B32A32_UINT + ISL_FORMAT_R32_UINT, + ISL_FORMAT_R32G32_UINT, + ISL_FORMAT_R32G32B32_UINT, + ISL_FORMAT_R32G32B32A32_UINT }; static const GLuint uint_types_norm[5] = { 0, - BRW_SURFACEFORMAT_R32_UNORM, - BRW_SURFACEFORMAT_R32G32_UNORM, - BRW_SURFACEFORMAT_R32G32B32_UNORM, - BRW_SURFACEFORMAT_R32G32B32A32_UNORM + ISL_FORMAT_R32_UNORM, + ISL_FORMAT_R32G32_UNORM, + ISL_FORMAT_R32G32B32_UNORM, + ISL_FORMAT_R32G32B32A32_UNORM }; static const GLuint uint_types_scale[5] = { 0, - BRW_SURFACEFORMAT_R32_USCALED, - BRW_SURFACEFORMAT_R32G32_USCALED, - BRW_SURFACEFORMAT_R32G32B32_USCALED, - BRW_SURFACEFORMAT_R32G32B32A32_USCALED + ISL_FORMAT_R32_USCALED, + ISL_FORMAT_R32G32_USCALED, + ISL_FORMAT_R32G32B32_USCALED, + ISL_FORMAT_R32G32B32A32_USCALED }; static const GLuint int_types_direct[5] = { 0, - BRW_SURFACEFORMAT_R32_SINT, - BRW_SURFACEFORMAT_R32G32_SINT, - BRW_SURFACEFORMAT_R32G32B32_SINT, - BRW_SURFACEFORMAT_R32G32B32A32_SINT + ISL_FORMAT_R32_SINT, + ISL_FORMAT_R32G32_SINT, + ISL_FORMAT_R32G32B32_SINT, + ISL_FORMAT_R32G32B32A32_SINT }; static const GLuint int_types_norm[5] = { 0, - BRW_SURFACEFORMAT_R32_SNORM, - BRW_SURFACEFORMAT_R32G32_SNORM, - BRW_SURFACEFORMAT_R32G32B32_SNORM, - BRW_SURFACEFORMAT_R32G32B32A32_SNORM + ISL_FORMAT_R32_SNORM, + ISL_FORMAT_R32G32_SNORM, + ISL_FORMAT_R32G32B32_SNORM, + ISL_FORMAT_R32G32B32A32_SNORM }; static const GLuint int_types_scale[5] = { 0, - BRW_SURFACEFORMAT_R32_SSCALED, - BRW_SURFACEFORMAT_R32G32_SSCALED, - BRW_SURFACEFORMAT_R32G32B32_SSCALED, - BRW_SURFACEFORMAT_R32G32B32A32_SSCALED + ISL_FORMAT_R32_SSCALED, + ISL_FORMAT_R32G32_SSCALED, + ISL_FORMAT_R32G32B32_SSCALED, + ISL_FORMAT_R32G32B32A32_SSCALED }; static const GLuint ushort_types_direct[5] = { 0, - BRW_SURFACEFORMAT_R16_UINT, - BRW_SURFACEFORMAT_R16G16_UINT, - BRW_SURFACEFORMAT_R16G16B16_UINT, - BRW_SURFACEFORMAT_R16G16B16A16_UINT + ISL_FORMAT_R16_UINT, + ISL_FORMAT_R16G16_UINT, + ISL_FORMAT_R16G16B16_UINT, + ISL_FORMAT_R16G16B16A16_UINT }; static const GLuint ushort_types_norm[5] = { 0, - BRW_SURFACEFORMAT_R16_UNORM, - BRW_SURFACEFORMAT_R16G16_UNORM, - BRW_SURFACEFORMAT_R16G16B16_UNORM, - BRW_SURFACEFORMAT_R16G16B16A16_UNORM + ISL_FORMAT_R16_UNORM, + ISL_FORMAT_R16G16_UNORM, + ISL_FORMAT_R16G16B16_UNORM, + ISL_FORMAT_R16G16B16A16_UNORM }; static const GLuint ushort_types_scale[5] = { 0, - BRW_SURFACEFORMAT_R16_USCALED, - BRW_SURFACEFORMAT_R16G16_USCALED, - BRW_SURFACEFORMAT_R16G16B16_USCALED, - BRW_SURFACEFORMAT_R16G16B16A16_USCALED + ISL_FORMAT_R16_USCALED, + ISL_FORMAT_R16G16_USCALED, + ISL_FORMAT_R16G16B16_USCALED, + ISL_FORMAT_R16G16B16A16_USCALED }; static const GLuint short_types_direct[5] = { 0, - BRW_SURFACEFORMAT_R16_SINT, - BRW_SURFACEFORMAT_R16G16_SINT, - BRW_SURFACEFORMAT_R16G16B16_SINT, - BRW_SURFACEFORMAT_R16G16B16A16_SINT + ISL_FORMAT_R16_SINT, + ISL_FORMAT_R16G16_SINT, + ISL_FORMAT_R16G16B16_SINT, + ISL_FORMAT_R16G16B16A16_SINT }; static const GLuint short_types_norm[5] = { 0, - BRW_SURFACEFORMAT_R16_SNORM, - BRW_SURFACEFORMAT_R16G16_SNORM, - BRW_SURFACEFORMAT_R16G16B16_SNORM, - BRW_SURFACEFORMAT_R16G16B16A16_SNORM + ISL_FORMAT_R16_SNORM, + ISL_FORMAT_R16G16_SNORM, + ISL_FORMAT_R16G16B16_SNORM, + ISL_FORMAT_R16G16B16A16_SNORM }; static const GLuint short_types_scale[5] = { 0, - BRW_SURFACEFORMAT_R16_SSCALED, - BRW_SURFACEFORMAT_R16G16_SSCALED, - BRW_SURFACEFORMAT_R16G16B16_SSCALED, - BRW_SURFACEFORMAT_R16G16B16A16_SSCALED + ISL_FORMAT_R16_SSCALED, + ISL_FORMAT_R16G16_SSCALED, + ISL_FORMAT_R16G16B16_SSCALED, + ISL_FORMAT_R16G16B16A16_SSCALED }; static const GLuint ubyte_types_direct[5] = { 0, - BRW_SURFACEFORMAT_R8_UINT, - BRW_SURFACEFORMAT_R8G8_UINT, - BRW_SURFACEFORMAT_R8G8B8_UINT, - BRW_SURFACEFORMAT_R8G8B8A8_UINT + ISL_FORMAT_R8_UINT, + ISL_FORMAT_R8G8_UINT, + ISL_FORMAT_R8G8B8_UINT, + ISL_FORMAT_R8G8B8A8_UINT }; static const GLuint ubyte_types_norm[5] = { 0, - BRW_SURFACEFORMAT_R8_UNORM, - BRW_SURFACEFORMAT_R8G8_UNORM, - BRW_SURFACEFORMAT_R8G8B8_UNORM, - BRW_SURFACEFORMAT_R8G8B8A8_UNORM + ISL_FORMAT_R8_UNORM, + ISL_FORMAT_R8G8_UNORM, + ISL_FORMAT_R8G8B8_UNORM, + ISL_FORMAT_R8G8B8A8_UNORM }; static const GLuint ubyte_types_scale[5] = { 0, - BRW_SURFACEFORMAT_R8_USCALED, - BRW_SURFACEFORMAT_R8G8_USCALED, - BRW_SURFACEFORMAT_R8G8B8_USCALED, - BRW_SURFACEFORMAT_R8G8B8A8_USCALED + ISL_FORMAT_R8_USCALED, + ISL_FORMAT_R8G8_USCALED, + ISL_FORMAT_R8G8B8_USCALED, + ISL_FORMAT_R8G8B8A8_USCALED }; static const GLuint byte_types_direct[5] = { 0, - BRW_SURFACEFORMAT_R8_SINT, - BRW_SURFACEFORMAT_R8G8_SINT, - BRW_SURFACEFORMAT_R8G8B8_SINT, - BRW_SURFACEFORMAT_R8G8B8A8_SINT + ISL_FORMAT_R8_SINT, + ISL_FORMAT_R8G8_SINT, + ISL_FORMAT_R8G8B8_SINT, + ISL_FORMAT_R8G8B8A8_SINT }; static const GLuint byte_types_norm[5] = { 0, - BRW_SURFACEFORMAT_R8_SNORM, - BRW_SURFACEFORMAT_R8G8_SNORM, - BRW_SURFACEFORMAT_R8G8B8_SNORM, - BRW_SURFACEFORMAT_R8G8B8A8_SNORM + ISL_FORMAT_R8_SNORM, + ISL_FORMAT_R8G8_SNORM, + ISL_FORMAT_R8G8B8_SNORM, + ISL_FORMAT_R8G8B8A8_SNORM }; static const GLuint byte_types_scale[5] = { 0, - BRW_SURFACEFORMAT_R8_SSCALED, - BRW_SURFACEFORMAT_R8G8_SSCALED, - BRW_SURFACEFORMAT_R8G8B8_SSCALED, - BRW_SURFACEFORMAT_R8G8B8A8_SSCALED + ISL_FORMAT_R8_SSCALED, + ISL_FORMAT_R8G8_SSCALED, + ISL_FORMAT_R8G8B8_SSCALED, + ISL_FORMAT_R8G8B8A8_SSCALED }; static GLuint @@ -246,10 +246,10 @@ static bool is_passthru_format(uint32_t format) { switch (format) { - case BRW_SURFACEFORMAT_R64_PASSTHRU: - case BRW_SURFACEFORMAT_R64G64_PASSTHRU: - case BRW_SURFACEFORMAT_R64G64B64_PASSTHRU: - case BRW_SURFACEFORMAT_R64G64B64A64_PASSTHRU: + case ISL_FORMAT_R64_PASSTHRU: + case ISL_FORMAT_R64G64_PASSTHRU: + case ISL_FORMAT_R64G64B64_PASSTHRU: + case ISL_FORMAT_R64G64B64A64_PASSTHRU: return true; default: return false; @@ -263,11 +263,11 @@ uploads_needed(uint32_t format) return 1; switch (format) { - case BRW_SURFACEFORMAT_R64_PASSTHRU: - case BRW_SURFACEFORMAT_R64G64_PASSTHRU: + case ISL_FORMAT_R64_PASSTHRU: + case ISL_FORMAT_R64G64_PASSTHRU: return 1; - case BRW_SURFACEFORMAT_R64G64B64_PASSTHRU: - case BRW_SURFACEFORMAT_R64G64B64A64_PASSTHRU: + case ISL_FORMAT_R64G64B64_PASSTHRU: + case ISL_FORMAT_R64G64B64A64_PASSTHRU: return 2; default: unreachable("not reached"); @@ -282,9 +282,9 @@ static int upload_format_size(uint32_t upload_format) { switch (upload_format) { - case BRW_SURFACEFORMAT_R32G32_FLOAT: + case ISL_FORMAT_R32G32_FLOAT: return 2; - case BRW_SURFACEFORMAT_R32G32B32A32_FLOAT: + case ISL_FORMAT_R32G32B32A32_FLOAT: return 4; default: unreachable("not reached"); @@ -308,15 +308,15 @@ downsize_format_if_needed(uint32_t format, return format; switch (format) { - case BRW_SURFACEFORMAT_R64_PASSTHRU: - return BRW_SURFACEFORMAT_R32G32_FLOAT; - case BRW_SURFACEFORMAT_R64G64_PASSTHRU: - return BRW_SURFACEFORMAT_R32G32B32A32_FLOAT; - case BRW_SURFACEFORMAT_R64G64B64_PASSTHRU: - return !upload ? BRW_SURFACEFORMAT_R32G32B32A32_FLOAT - : BRW_SURFACEFORMAT_R32G32_FLOAT; - case BRW_SURFACEFORMAT_R64G64B64A64_PASSTHRU: - return BRW_SURFACEFORMAT_R32G32B32A32_FLOAT; + case ISL_FORMAT_R64_PASSTHRU: + return ISL_FORMAT_R32G32_FLOAT; + case ISL_FORMAT_R64G64_PASSTHRU: + return ISL_FORMAT_R32G32B32A32_FLOAT; + case ISL_FORMAT_R64G64B64_PASSTHRU: + return !upload ? ISL_FORMAT_R32G32B32A32_FLOAT + : ISL_FORMAT_R32G32_FLOAT; + case ISL_FORMAT_R64G64B64A64_PASSTHRU: + return ISL_FORMAT_R32G32B32A32_FLOAT; default: unreachable("not reached"); } @@ -368,7 +368,7 @@ brw_get_vertex_surface_type(struct brw_context *brw, default: unreachable("not reached"); } } else if (glarray->Type == GL_UNSIGNED_INT_10F_11F_11F_REV) { - return BRW_SURFACEFORMAT_R11G11B10_FLOAT; + return ISL_FORMAT_R11G11B10_FLOAT; } else if (glarray->Normalized) { switch (glarray->Type) { case GL_DOUBLE: return double_types(brw, size, glarray->Doubles); @@ -388,7 +388,7 @@ brw_get_vertex_surface_type(struct brw_context *brw, if (glarray->Format == GL_BGRA) { /* See GL_EXT_vertex_array_bgra */ assert(size == 4); - return BRW_SURFACEFORMAT_B8G8R8A8_UNORM; + return ISL_FORMAT_B8G8R8A8_UNORM; } else { return ubyte_types_norm[size]; @@ -410,18 +410,18 @@ brw_get_vertex_surface_type(struct brw_context *brw, assert(size == 4); if (brw->gen >= 8 || brw->is_haswell) { return glarray->Format == GL_BGRA - ? BRW_SURFACEFORMAT_B10G10R10A2_SNORM - : BRW_SURFACEFORMAT_R10G10B10A2_SNORM; + ? ISL_FORMAT_B10G10R10A2_SNORM + : ISL_FORMAT_R10G10B10A2_SNORM; } - return BRW_SURFACEFORMAT_R10G10B10A2_UINT; + return ISL_FORMAT_R10G10B10A2_UINT; case GL_UNSIGNED_INT_2_10_10_10_REV: assert(size == 4); if (brw->gen >= 8 || brw->is_haswell) { return glarray->Format == GL_BGRA - ? BRW_SURFACEFORMAT_B10G10R10A2_UNORM - : BRW_SURFACEFORMAT_R10G10B10A2_UNORM; + ? ISL_FORMAT_B10G10R10A2_UNORM + : ISL_FORMAT_R10G10B10A2_UNORM; } - return BRW_SURFACEFORMAT_R10G10B10A2_UINT; + return ISL_FORMAT_R10G10B10A2_UINT; default: unreachable("not reached"); } } @@ -435,18 +435,18 @@ brw_get_vertex_surface_type(struct brw_context *brw, assert(size == 4); if (brw->gen >= 8 || brw->is_haswell) { return glarray->Format == GL_BGRA - ? BRW_SURFACEFORMAT_B10G10R10A2_SSCALED - : BRW_SURFACEFORMAT_R10G10B10A2_SSCALED; + ? ISL_FORMAT_B10G10R10A2_SSCALED + : ISL_FORMAT_R10G10B10A2_SSCALED; } - return BRW_SURFACEFORMAT_R10G10B10A2_UINT; + return ISL_FORMAT_R10G10B10A2_UINT; } else if (glarray->Type == GL_UNSIGNED_INT_2_10_10_10_REV) { assert(size == 4); if (brw->gen >= 8 || brw->is_haswell) { return glarray->Format == GL_BGRA - ? BRW_SURFACEFORMAT_B10G10R10A2_USCALED - : BRW_SURFACEFORMAT_R10G10B10A2_USCALED; + ? ISL_FORMAT_B10G10R10A2_USCALED + : ISL_FORMAT_R10G10B10A2_USCALED; } - return BRW_SURFACEFORMAT_R10G10B10A2_UINT; + return ISL_FORMAT_R10G10B10A2_UINT; } assert(glarray->Format == GL_RGBA); /* sanity check */ switch (glarray->Type) { @@ -910,12 +910,12 @@ brw_emit_vertices(struct brw_context *brw) if (brw->gen >= 6) { OUT_BATCH((0 << GEN6_VE0_INDEX_SHIFT) | GEN6_VE0_VALID | - (BRW_SURFACEFORMAT_R32G32B32A32_FLOAT << BRW_VE0_FORMAT_SHIFT) | + (ISL_FORMAT_R32G32B32A32_FLOAT << BRW_VE0_FORMAT_SHIFT) | (0 << BRW_VE0_SRC_OFFSET_SHIFT)); } else { OUT_BATCH((0 << BRW_VE0_INDEX_SHIFT) | BRW_VE0_VALID | - (BRW_SURFACEFORMAT_R32G32B32A32_FLOAT << BRW_VE0_FORMAT_SHIFT) | + (ISL_FORMAT_R32G32B32A32_FLOAT << BRW_VE0_FORMAT_SHIFT) | (0 << BRW_VE0_SRC_OFFSET_SHIFT)); } OUT_BATCH((BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_0_SHIFT) | @@ -1091,11 +1091,11 @@ brw_emit_vertices(struct brw_context *brw) if (brw->gen >= 6) { dw0 |= GEN6_VE0_VALID | brw->vb.nr_buffers << GEN6_VE0_INDEX_SHIFT | - BRW_SURFACEFORMAT_R32G32_UINT << BRW_VE0_FORMAT_SHIFT; + ISL_FORMAT_R32G32_UINT << BRW_VE0_FORMAT_SHIFT; } else { dw0 |= BRW_VE0_VALID | brw->vb.nr_buffers << BRW_VE0_INDEX_SHIFT | - BRW_SURFACEFORMAT_R32G32_UINT << BRW_VE0_FORMAT_SHIFT; + ISL_FORMAT_R32G32_UINT << BRW_VE0_FORMAT_SHIFT; dw1 |= (i * 4) << BRW_VE1_DST_OFFSET_SHIFT; } @@ -1118,11 +1118,11 @@ brw_emit_vertices(struct brw_context *brw) if (brw->gen >= 6) { dw0 |= GEN6_VE0_VALID | ((brw->vb.nr_buffers + 1) << GEN6_VE0_INDEX_SHIFT) | - (BRW_SURFACEFORMAT_R32_UINT << BRW_VE0_FORMAT_SHIFT); + (ISL_FORMAT_R32_UINT << BRW_VE0_FORMAT_SHIFT); } else { dw0 |= BRW_VE0_VALID | ((brw->vb.nr_buffers + 1) << BRW_VE0_INDEX_SHIFT) | - (BRW_SURFACEFORMAT_R32_UINT << BRW_VE0_FORMAT_SHIFT); + (ISL_FORMAT_R32_UINT << BRW_VE0_FORMAT_SHIFT); dw1 |= (i * 4) << BRW_VE1_DST_OFFSET_SHIFT; } diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c index 103d3a0529c..706818d70bb 100644 --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c @@ -34,94 +34,94 @@ brw_format_for_mesa_format(mesa_format mesa_format) /* This table is ordered according to the enum ordering in formats.h. We do * expect that enum to be extended without our explicit initialization * staying in sync, so we initialize to 0 even though - * BRW_SURFACEFORMAT_R32G32B32A32_FLOAT happens to also be 0. + * ISL_FORMAT_R32G32B32A32_FLOAT happens to also be 0. */ static const uint32_t table[MESA_FORMAT_COUNT] = { [MESA_FORMAT_A8B8G8R8_UNORM] = 0, - [MESA_FORMAT_R8G8B8A8_UNORM] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM, - [MESA_FORMAT_B8G8R8A8_UNORM] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM, + [MESA_FORMAT_R8G8B8A8_UNORM] = ISL_FORMAT_R8G8B8A8_UNORM, + [MESA_FORMAT_B8G8R8A8_UNORM] = ISL_FORMAT_B8G8R8A8_UNORM, [MESA_FORMAT_A8R8G8B8_UNORM] = 0, [MESA_FORMAT_X8B8G8R8_UNORM] = 0, - [MESA_FORMAT_R8G8B8X8_UNORM] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM, - [MESA_FORMAT_B8G8R8X8_UNORM] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM, + [MESA_FORMAT_R8G8B8X8_UNORM] = ISL_FORMAT_R8G8B8X8_UNORM, + [MESA_FORMAT_B8G8R8X8_UNORM] = ISL_FORMAT_B8G8R8X8_UNORM, [MESA_FORMAT_X8R8G8B8_UNORM] = 0, [MESA_FORMAT_BGR_UNORM8] = 0, - [MESA_FORMAT_RGB_UNORM8] = BRW_SURFACEFORMAT_R8G8B8_UNORM, - [MESA_FORMAT_B5G6R5_UNORM] = BRW_SURFACEFORMAT_B5G6R5_UNORM, + [MESA_FORMAT_RGB_UNORM8] = ISL_FORMAT_R8G8B8_UNORM, + [MESA_FORMAT_B5G6R5_UNORM] = ISL_FORMAT_B5G6R5_UNORM, [MESA_FORMAT_R5G6B5_UNORM] = 0, - [MESA_FORMAT_B4G4R4A4_UNORM] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM, + [MESA_FORMAT_B4G4R4A4_UNORM] = ISL_FORMAT_B4G4R4A4_UNORM, [MESA_FORMAT_A4R4G4B4_UNORM] = 0, [MESA_FORMAT_A1B5G5R5_UNORM] = 0, - [MESA_FORMAT_B5G5R5A1_UNORM] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM, + [MESA_FORMAT_B5G5R5A1_UNORM] = ISL_FORMAT_B5G5R5A1_UNORM, [MESA_FORMAT_A1R5G5B5_UNORM] = 0, [MESA_FORMAT_L4A4_UNORM] = 0, - [MESA_FORMAT_L8A8_UNORM] = BRW_SURFACEFORMAT_L8A8_UNORM, + [MESA_FORMAT_L8A8_UNORM] = ISL_FORMAT_L8A8_UNORM, [MESA_FORMAT_A8L8_UNORM] = 0, - [MESA_FORMAT_L16A16_UNORM] = BRW_SURFACEFORMAT_L16A16_UNORM, + [MESA_FORMAT_L16A16_UNORM] = ISL_FORMAT_L16A16_UNORM, [MESA_FORMAT_A16L16_UNORM] = 0, [MESA_FORMAT_B2G3R3_UNORM] = 0, - [MESA_FORMAT_A_UNORM8] = BRW_SURFACEFORMAT_A8_UNORM, - [MESA_FORMAT_A_UNORM16] = BRW_SURFACEFORMAT_A16_UNORM, - [MESA_FORMAT_L_UNORM8] = BRW_SURFACEFORMAT_L8_UNORM, - [MESA_FORMAT_L_UNORM16] = BRW_SURFACEFORMAT_L16_UNORM, - [MESA_FORMAT_I_UNORM8] = BRW_SURFACEFORMAT_I8_UNORM, - [MESA_FORMAT_I_UNORM16] = BRW_SURFACEFORMAT_I16_UNORM, - [MESA_FORMAT_YCBCR_REV] = BRW_SURFACEFORMAT_YCRCB_NORMAL, - [MESA_FORMAT_YCBCR] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY, - [MESA_FORMAT_R_UNORM8] = BRW_SURFACEFORMAT_R8_UNORM, - [MESA_FORMAT_R8G8_UNORM] = BRW_SURFACEFORMAT_R8G8_UNORM, + [MESA_FORMAT_A_UNORM8] = ISL_FORMAT_A8_UNORM, + [MESA_FORMAT_A_UNORM16] = ISL_FORMAT_A16_UNORM, + [MESA_FORMAT_L_UNORM8] = ISL_FORMAT_L8_UNORM, + [MESA_FORMAT_L_UNORM16] = ISL_FORMAT_L16_UNORM, + [MESA_FORMAT_I_UNORM8] = ISL_FORMAT_I8_UNORM, + [MESA_FORMAT_I_UNORM16] = ISL_FORMAT_I16_UNORM, + [MESA_FORMAT_YCBCR_REV] = ISL_FORMAT_YCRCB_NORMAL, + [MESA_FORMAT_YCBCR] = ISL_FORMAT_YCRCB_SWAPUVY, + [MESA_FORMAT_R_UNORM8] = ISL_FORMAT_R8_UNORM, + [MESA_FORMAT_R8G8_UNORM] = ISL_FORMAT_R8G8_UNORM, [MESA_FORMAT_G8R8_UNORM] = 0, - [MESA_FORMAT_R_UNORM16] = BRW_SURFACEFORMAT_R16_UNORM, - [MESA_FORMAT_R16G16_UNORM] = BRW_SURFACEFORMAT_R16G16_UNORM, + [MESA_FORMAT_R_UNORM16] = ISL_FORMAT_R16_UNORM, + [MESA_FORMAT_R16G16_UNORM] = ISL_FORMAT_R16G16_UNORM, [MESA_FORMAT_G16R16_UNORM] = 0, - [MESA_FORMAT_B10G10R10A2_UNORM] = BRW_SURFACEFORMAT_B10G10R10A2_UNORM, + [MESA_FORMAT_B10G10R10A2_UNORM] = ISL_FORMAT_B10G10R10A2_UNORM, [MESA_FORMAT_S8_UINT_Z24_UNORM] = 0, [MESA_FORMAT_Z24_UNORM_S8_UINT] = 0, [MESA_FORMAT_Z_UNORM16] = 0, [MESA_FORMAT_Z24_UNORM_X8_UINT] = 0, [MESA_FORMAT_X8_UINT_Z24_UNORM] = 0, [MESA_FORMAT_Z_UNORM32] = 0, - [MESA_FORMAT_S_UINT8] = BRW_SURFACEFORMAT_R8_UINT, + [MESA_FORMAT_S_UINT8] = ISL_FORMAT_R8_UINT, [MESA_FORMAT_BGR_SRGB8] = 0, [MESA_FORMAT_A8B8G8R8_SRGB] = 0, - [MESA_FORMAT_B8G8R8A8_SRGB] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB, + [MESA_FORMAT_B8G8R8A8_SRGB] = ISL_FORMAT_B8G8R8A8_UNORM_SRGB, [MESA_FORMAT_A8R8G8B8_SRGB] = 0, - [MESA_FORMAT_R8G8B8A8_SRGB] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB, + [MESA_FORMAT_R8G8B8A8_SRGB] = ISL_FORMAT_R8G8B8A8_UNORM_SRGB, [MESA_FORMAT_X8R8G8B8_SRGB] = 0, - [MESA_FORMAT_B8G8R8X8_SRGB] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB, - [MESA_FORMAT_L_SRGB8] = BRW_SURFACEFORMAT_L8_UNORM_SRGB, - [MESA_FORMAT_L8A8_SRGB] = BRW_SURFACEFORMAT_L8A8_UNORM_SRGB, + [MESA_FORMAT_B8G8R8X8_SRGB] = ISL_FORMAT_B8G8R8X8_UNORM_SRGB, + [MESA_FORMAT_L_SRGB8] = ISL_FORMAT_L8_UNORM_SRGB, + [MESA_FORMAT_L8A8_SRGB] = ISL_FORMAT_L8A8_UNORM_SRGB, [MESA_FORMAT_A8L8_SRGB] = 0, - [MESA_FORMAT_SRGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB_SRGB, - [MESA_FORMAT_SRGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM_SRGB, - [MESA_FORMAT_SRGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM_SRGB, - [MESA_FORMAT_SRGBA_DXT5] = BRW_SURFACEFORMAT_BC3_UNORM_SRGB, - - [MESA_FORMAT_RGB_FXT1] = BRW_SURFACEFORMAT_FXT1, - [MESA_FORMAT_RGBA_FXT1] = BRW_SURFACEFORMAT_FXT1, - [MESA_FORMAT_RGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB, - [MESA_FORMAT_RGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM, - [MESA_FORMAT_RGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM, - [MESA_FORMAT_RGBA_DXT5] = BRW_SURFACEFORMAT_BC3_UNORM, - - [MESA_FORMAT_RGBA_FLOAT32] = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT, - [MESA_FORMAT_RGBA_FLOAT16] = BRW_SURFACEFORMAT_R16G16B16A16_FLOAT, - [MESA_FORMAT_RGB_FLOAT32] = BRW_SURFACEFORMAT_R32G32B32_FLOAT, + [MESA_FORMAT_SRGB_DXT1] = ISL_FORMAT_DXT1_RGB_SRGB, + [MESA_FORMAT_SRGBA_DXT1] = ISL_FORMAT_BC1_UNORM_SRGB, + [MESA_FORMAT_SRGBA_DXT3] = ISL_FORMAT_BC2_UNORM_SRGB, + [MESA_FORMAT_SRGBA_DXT5] = ISL_FORMAT_BC3_UNORM_SRGB, + + [MESA_FORMAT_RGB_FXT1] = ISL_FORMAT_FXT1, + [MESA_FORMAT_RGBA_FXT1] = ISL_FORMAT_FXT1, + [MESA_FORMAT_RGB_DXT1] = ISL_FORMAT_DXT1_RGB, + [MESA_FORMAT_RGBA_DXT1] = ISL_FORMAT_BC1_UNORM, + [MESA_FORMAT_RGBA_DXT3] = ISL_FORMAT_BC2_UNORM, + [MESA_FORMAT_RGBA_DXT5] = ISL_FORMAT_BC3_UNORM, + + [MESA_FORMAT_RGBA_FLOAT32] = ISL_FORMAT_R32G32B32A32_FLOAT, + [MESA_FORMAT_RGBA_FLOAT16] = ISL_FORMAT_R16G16B16A16_FLOAT, + [MESA_FORMAT_RGB_FLOAT32] = ISL_FORMAT_R32G32B32_FLOAT, [MESA_FORMAT_RGB_FLOAT16] = 0, - [MESA_FORMAT_A_FLOAT32] = BRW_SURFACEFORMAT_A32_FLOAT, - [MESA_FORMAT_A_FLOAT16] = BRW_SURFACEFORMAT_A16_FLOAT, - [MESA_FORMAT_L_FLOAT32] = BRW_SURFACEFORMAT_L32_FLOAT, - [MESA_FORMAT_L_FLOAT16] = BRW_SURFACEFORMAT_L16_FLOAT, - [MESA_FORMAT_LA_FLOAT32] = BRW_SURFACEFORMAT_L32A32_FLOAT, - [MESA_FORMAT_LA_FLOAT16] = BRW_SURFACEFORMAT_L16A16_FLOAT, - [MESA_FORMAT_I_FLOAT32] = BRW_SURFACEFORMAT_I32_FLOAT, - [MESA_FORMAT_I_FLOAT16] = BRW_SURFACEFORMAT_I16_FLOAT, - [MESA_FORMAT_R_FLOAT32] = BRW_SURFACEFORMAT_R32_FLOAT, - [MESA_FORMAT_R_FLOAT16] = BRW_SURFACEFORMAT_R16_FLOAT, - [MESA_FORMAT_RG_FLOAT32] = BRW_SURFACEFORMAT_R32G32_FLOAT, - [MESA_FORMAT_RG_FLOAT16] = BRW_SURFACEFORMAT_R16G16_FLOAT, + [MESA_FORMAT_A_FLOAT32] = ISL_FORMAT_A32_FLOAT, + [MESA_FORMAT_A_FLOAT16] = ISL_FORMAT_A16_FLOAT, + [MESA_FORMAT_L_FLOAT32] = ISL_FORMAT_L32_FLOAT, + [MESA_FORMAT_L_FLOAT16] = ISL_FORMAT_L16_FLOAT, + [MESA_FORMAT_LA_FLOAT32] = ISL_FORMAT_L32A32_FLOAT, + [MESA_FORMAT_LA_FLOAT16] = ISL_FORMAT_L16A16_FLOAT, + [MESA_FORMAT_I_FLOAT32] = ISL_FORMAT_I32_FLOAT, + [MESA_FORMAT_I_FLOAT16] = ISL_FORMAT_I16_FLOAT, + [MESA_FORMAT_R_FLOAT32] = ISL_FORMAT_R32_FLOAT, + [MESA_FORMAT_R_FLOAT16] = ISL_FORMAT_R16_FLOAT, + [MESA_FORMAT_RG_FLOAT32] = ISL_FORMAT_R32G32_FLOAT, + [MESA_FORMAT_RG_FLOAT16] = ISL_FORMAT_R16G16_FLOAT, [MESA_FORMAT_A_UINT8] = 0, [MESA_FORMAT_A_UINT16] = 0, @@ -151,98 +151,98 @@ brw_format_for_mesa_format(mesa_format mesa_format) [MESA_FORMAT_LA_SINT16] = 0, [MESA_FORMAT_LA_SINT32] = 0, - [MESA_FORMAT_R_SINT8] = BRW_SURFACEFORMAT_R8_SINT, - [MESA_FORMAT_RG_SINT8] = BRW_SURFACEFORMAT_R8G8_SINT, - [MESA_FORMAT_RGB_SINT8] = BRW_SURFACEFORMAT_R8G8B8_SINT, - [MESA_FORMAT_RGBA_SINT8] = BRW_SURFACEFORMAT_R8G8B8A8_SINT, - [MESA_FORMAT_R_SINT16] = BRW_SURFACEFORMAT_R16_SINT, - [MESA_FORMAT_RG_SINT16] = BRW_SURFACEFORMAT_R16G16_SINT, - [MESA_FORMAT_RGB_SINT16] = BRW_SURFACEFORMAT_R16G16B16_SINT, - [MESA_FORMAT_RGBA_SINT16] = BRW_SURFACEFORMAT_R16G16B16A16_SINT, - [MESA_FORMAT_R_SINT32] = BRW_SURFACEFORMAT_R32_SINT, - [MESA_FORMAT_RG_SINT32] = BRW_SURFACEFORMAT_R32G32_SINT, - [MESA_FORMAT_RGB_SINT32] = BRW_SURFACEFORMAT_R32G32B32_SINT, - [MESA_FORMAT_RGBA_SINT32] = BRW_SURFACEFORMAT_R32G32B32A32_SINT, - - [MESA_FORMAT_R_UINT8] = BRW_SURFACEFORMAT_R8_UINT, - [MESA_FORMAT_RG_UINT8] = BRW_SURFACEFORMAT_R8G8_UINT, - [MESA_FORMAT_RGB_UINT8] = BRW_SURFACEFORMAT_R8G8B8_UINT, - [MESA_FORMAT_RGBA_UINT8] = BRW_SURFACEFORMAT_R8G8B8A8_UINT, - [MESA_FORMAT_R_UINT16] = BRW_SURFACEFORMAT_R16_UINT, - [MESA_FORMAT_RG_UINT16] = BRW_SURFACEFORMAT_R16G16_UINT, - [MESA_FORMAT_RGB_UINT16] = BRW_SURFACEFORMAT_R16G16B16_UINT, - [MESA_FORMAT_RGBA_UINT16] = BRW_SURFACEFORMAT_R16G16B16A16_UINT, - [MESA_FORMAT_R_UINT32] = BRW_SURFACEFORMAT_R32_UINT, - [MESA_FORMAT_RG_UINT32] = BRW_SURFACEFORMAT_R32G32_UINT, - [MESA_FORMAT_RGB_UINT32] = BRW_SURFACEFORMAT_R32G32B32_UINT, - [MESA_FORMAT_RGBA_UINT32] = BRW_SURFACEFORMAT_R32G32B32A32_UINT, - - [MESA_FORMAT_R_SNORM8] = BRW_SURFACEFORMAT_R8_SNORM, - [MESA_FORMAT_R8G8_SNORM] = BRW_SURFACEFORMAT_R8G8_SNORM, + [MESA_FORMAT_R_SINT8] = ISL_FORMAT_R8_SINT, + [MESA_FORMAT_RG_SINT8] = ISL_FORMAT_R8G8_SINT, + [MESA_FORMAT_RGB_SINT8] = ISL_FORMAT_R8G8B8_SINT, + [MESA_FORMAT_RGBA_SINT8] = ISL_FORMAT_R8G8B8A8_SINT, + [MESA_FORMAT_R_SINT16] = ISL_FORMAT_R16_SINT, + [MESA_FORMAT_RG_SINT16] = ISL_FORMAT_R16G16_SINT, + [MESA_FORMAT_RGB_SINT16] = ISL_FORMAT_R16G16B16_SINT, + [MESA_FORMAT_RGBA_SINT16] = ISL_FORMAT_R16G16B16A16_SINT, + [MESA_FORMAT_R_SINT32] = ISL_FORMAT_R32_SINT, + [MESA_FORMAT_RG_SINT32] = ISL_FORMAT_R32G32_SINT, + [MESA_FORMAT_RGB_SINT32] = ISL_FORMAT_R32G32B32_SINT, + [MESA_FORMAT_RGBA_SINT32] = ISL_FORMAT_R32G32B32A32_SINT, + + [MESA_FORMAT_R_UINT8] = ISL_FORMAT_R8_UINT, + [MESA_FORMAT_RG_UINT8] = ISL_FORMAT_R8G8_UINT, + [MESA_FORMAT_RGB_UINT8] = ISL_FORMAT_R8G8B8_UINT, + [MESA_FORMAT_RGBA_UINT8] = ISL_FORMAT_R8G8B8A8_UINT, + [MESA_FORMAT_R_UINT16] = ISL_FORMAT_R16_UINT, + [MESA_FORMAT_RG_UINT16] = ISL_FORMAT_R16G16_UINT, + [MESA_FORMAT_RGB_UINT16] = ISL_FORMAT_R16G16B16_UINT, + [MESA_FORMAT_RGBA_UINT16] = ISL_FORMAT_R16G16B16A16_UINT, + [MESA_FORMAT_R_UINT32] = ISL_FORMAT_R32_UINT, + [MESA_FORMAT_RG_UINT32] = ISL_FORMAT_R32G32_UINT, + [MESA_FORMAT_RGB_UINT32] = ISL_FORMAT_R32G32B32_UINT, + [MESA_FORMAT_RGBA_UINT32] = ISL_FORMAT_R32G32B32A32_UINT, + + [MESA_FORMAT_R_SNORM8] = ISL_FORMAT_R8_SNORM, + [MESA_FORMAT_R8G8_SNORM] = ISL_FORMAT_R8G8_SNORM, [MESA_FORMAT_X8B8G8R8_SNORM] = 0, [MESA_FORMAT_A8B8G8R8_SNORM] = 0, - [MESA_FORMAT_R8G8B8A8_SNORM] = BRW_SURFACEFORMAT_R8G8B8A8_SNORM, - [MESA_FORMAT_R_SNORM16] = BRW_SURFACEFORMAT_R16_SNORM, - [MESA_FORMAT_R16G16_SNORM] = BRW_SURFACEFORMAT_R16G16_SNORM, - [MESA_FORMAT_RGB_SNORM16] = BRW_SURFACEFORMAT_R16G16B16_SNORM, - [MESA_FORMAT_RGBA_SNORM16] = BRW_SURFACEFORMAT_R16G16B16A16_SNORM, - [MESA_FORMAT_RGBA_UNORM16] = BRW_SURFACEFORMAT_R16G16B16A16_UNORM, - - [MESA_FORMAT_R_RGTC1_UNORM] = BRW_SURFACEFORMAT_BC4_UNORM, - [MESA_FORMAT_R_RGTC1_SNORM] = BRW_SURFACEFORMAT_BC4_SNORM, - [MESA_FORMAT_RG_RGTC2_UNORM] = BRW_SURFACEFORMAT_BC5_UNORM, - [MESA_FORMAT_RG_RGTC2_SNORM] = BRW_SURFACEFORMAT_BC5_SNORM, + [MESA_FORMAT_R8G8B8A8_SNORM] = ISL_FORMAT_R8G8B8A8_SNORM, + [MESA_FORMAT_R_SNORM16] = ISL_FORMAT_R16_SNORM, + [MESA_FORMAT_R16G16_SNORM] = ISL_FORMAT_R16G16_SNORM, + [MESA_FORMAT_RGB_SNORM16] = ISL_FORMAT_R16G16B16_SNORM, + [MESA_FORMAT_RGBA_SNORM16] = ISL_FORMAT_R16G16B16A16_SNORM, + [MESA_FORMAT_RGBA_UNORM16] = ISL_FORMAT_R16G16B16A16_UNORM, + + [MESA_FORMAT_R_RGTC1_UNORM] = ISL_FORMAT_BC4_UNORM, + [MESA_FORMAT_R_RGTC1_SNORM] = ISL_FORMAT_BC4_SNORM, + [MESA_FORMAT_RG_RGTC2_UNORM] = ISL_FORMAT_BC5_UNORM, + [MESA_FORMAT_RG_RGTC2_SNORM] = ISL_FORMAT_BC5_SNORM, [MESA_FORMAT_L_LATC1_UNORM] = 0, [MESA_FORMAT_L_LATC1_SNORM] = 0, [MESA_FORMAT_LA_LATC2_UNORM] = 0, [MESA_FORMAT_LA_LATC2_SNORM] = 0, - [MESA_FORMAT_ETC1_RGB8] = BRW_SURFACEFORMAT_ETC1_RGB8, - [MESA_FORMAT_ETC2_RGB8] = BRW_SURFACEFORMAT_ETC2_RGB8, - [MESA_FORMAT_ETC2_SRGB8] = BRW_SURFACEFORMAT_ETC2_SRGB8, - [MESA_FORMAT_ETC2_RGBA8_EAC] = BRW_SURFACEFORMAT_ETC2_EAC_RGBA8, - [MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC] = BRW_SURFACEFORMAT_ETC2_EAC_SRGB8_A8, - [MESA_FORMAT_ETC2_R11_EAC] = BRW_SURFACEFORMAT_EAC_R11, - [MESA_FORMAT_ETC2_RG11_EAC] = BRW_SURFACEFORMAT_EAC_RG11, - [MESA_FORMAT_ETC2_SIGNED_R11_EAC] = BRW_SURFACEFORMAT_EAC_SIGNED_R11, - [MESA_FORMAT_ETC2_SIGNED_RG11_EAC] = BRW_SURFACEFORMAT_EAC_SIGNED_RG11, - [MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1] = BRW_SURFACEFORMAT_ETC2_RGB8_PTA, - [MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] = BRW_SURFACEFORMAT_ETC2_SRGB8_PTA, - - [MESA_FORMAT_BPTC_RGBA_UNORM] = BRW_SURFACEFORMAT_BC7_UNORM, - [MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM] = BRW_SURFACEFORMAT_BC7_UNORM_SRGB, - [MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT] = BRW_SURFACEFORMAT_BC6H_SF16, - [MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT] = BRW_SURFACEFORMAT_BC6H_UF16, - - [MESA_FORMAT_RGBA_ASTC_4x4] = BRW_SURFACEFORMAT_ASTC_LDR_2D_4x4_FLT16, - [MESA_FORMAT_RGBA_ASTC_5x4] = BRW_SURFACEFORMAT_ASTC_LDR_2D_5x4_FLT16, - [MESA_FORMAT_RGBA_ASTC_5x5] = BRW_SURFACEFORMAT_ASTC_LDR_2D_5x5_FLT16, - [MESA_FORMAT_RGBA_ASTC_6x5] = BRW_SURFACEFORMAT_ASTC_LDR_2D_6x5_FLT16, - [MESA_FORMAT_RGBA_ASTC_6x6] = BRW_SURFACEFORMAT_ASTC_LDR_2D_6x6_FLT16, - [MESA_FORMAT_RGBA_ASTC_8x5] = BRW_SURFACEFORMAT_ASTC_LDR_2D_8x5_FLT16, - [MESA_FORMAT_RGBA_ASTC_8x6] = BRW_SURFACEFORMAT_ASTC_LDR_2D_8x6_FLT16, - [MESA_FORMAT_RGBA_ASTC_8x8] = BRW_SURFACEFORMAT_ASTC_LDR_2D_8x8_FLT16, - [MESA_FORMAT_RGBA_ASTC_10x5] = BRW_SURFACEFORMAT_ASTC_LDR_2D_10x5_FLT16, - [MESA_FORMAT_RGBA_ASTC_10x6] = BRW_SURFACEFORMAT_ASTC_LDR_2D_10x6_FLT16, - [MESA_FORMAT_RGBA_ASTC_10x8] = BRW_SURFACEFORMAT_ASTC_LDR_2D_10x8_FLT16, - [MESA_FORMAT_RGBA_ASTC_10x10] = BRW_SURFACEFORMAT_ASTC_LDR_2D_10x10_FLT16, - [MESA_FORMAT_RGBA_ASTC_12x10] = BRW_SURFACEFORMAT_ASTC_LDR_2D_12x10_FLT16, - [MESA_FORMAT_RGBA_ASTC_12x12] = BRW_SURFACEFORMAT_ASTC_LDR_2D_12x12_FLT16, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4] = BRW_SURFACEFORMAT_ASTC_LDR_2D_4x4_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4] = BRW_SURFACEFORMAT_ASTC_LDR_2D_5x4_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5] = BRW_SURFACEFORMAT_ASTC_LDR_2D_5x5_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5] = BRW_SURFACEFORMAT_ASTC_LDR_2D_6x5_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6] = BRW_SURFACEFORMAT_ASTC_LDR_2D_6x6_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5] = BRW_SURFACEFORMAT_ASTC_LDR_2D_8x5_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6] = BRW_SURFACEFORMAT_ASTC_LDR_2D_8x6_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8] = BRW_SURFACEFORMAT_ASTC_LDR_2D_8x8_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5] = BRW_SURFACEFORMAT_ASTC_LDR_2D_10x5_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6] = BRW_SURFACEFORMAT_ASTC_LDR_2D_10x6_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8] = BRW_SURFACEFORMAT_ASTC_LDR_2D_10x8_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10] = BRW_SURFACEFORMAT_ASTC_LDR_2D_10x10_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10] = BRW_SURFACEFORMAT_ASTC_LDR_2D_12x10_U8sRGB, - [MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12] = BRW_SURFACEFORMAT_ASTC_LDR_2D_12x12_U8sRGB, + [MESA_FORMAT_ETC1_RGB8] = ISL_FORMAT_ETC1_RGB8, + [MESA_FORMAT_ETC2_RGB8] = ISL_FORMAT_ETC2_RGB8, + [MESA_FORMAT_ETC2_SRGB8] = ISL_FORMAT_ETC2_SRGB8, + [MESA_FORMAT_ETC2_RGBA8_EAC] = ISL_FORMAT_ETC2_EAC_RGBA8, + [MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC] = ISL_FORMAT_ETC2_EAC_SRGB8_A8, + [MESA_FORMAT_ETC2_R11_EAC] = ISL_FORMAT_EAC_R11, + [MESA_FORMAT_ETC2_RG11_EAC] = ISL_FORMAT_EAC_RG11, + [MESA_FORMAT_ETC2_SIGNED_R11_EAC] = ISL_FORMAT_EAC_SIGNED_R11, + [MESA_FORMAT_ETC2_SIGNED_RG11_EAC] = ISL_FORMAT_EAC_SIGNED_RG11, + [MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1] = ISL_FORMAT_ETC2_RGB8_PTA, + [MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] = ISL_FORMAT_ETC2_SRGB8_PTA, + + [MESA_FORMAT_BPTC_RGBA_UNORM] = ISL_FORMAT_BC7_UNORM, + [MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM] = ISL_FORMAT_BC7_UNORM_SRGB, + [MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT] = ISL_FORMAT_BC6H_SF16, + [MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT] = ISL_FORMAT_BC6H_UF16, + + [MESA_FORMAT_RGBA_ASTC_4x4] = ISL_FORMAT_ASTC_LDR_2D_4X4_FLT16, + [MESA_FORMAT_RGBA_ASTC_5x4] = ISL_FORMAT_ASTC_LDR_2D_5X4_FLT16, + [MESA_FORMAT_RGBA_ASTC_5x5] = ISL_FORMAT_ASTC_LDR_2D_5X5_FLT16, + [MESA_FORMAT_RGBA_ASTC_6x5] = ISL_FORMAT_ASTC_LDR_2D_6X5_FLT16, + [MESA_FORMAT_RGBA_ASTC_6x6] = ISL_FORMAT_ASTC_LDR_2D_6X6_FLT16, + [MESA_FORMAT_RGBA_ASTC_8x5] = ISL_FORMAT_ASTC_LDR_2D_8X5_FLT16, + [MESA_FORMAT_RGBA_ASTC_8x6] = ISL_FORMAT_ASTC_LDR_2D_8X6_FLT16, + [MESA_FORMAT_RGBA_ASTC_8x8] = ISL_FORMAT_ASTC_LDR_2D_8X8_FLT16, + [MESA_FORMAT_RGBA_ASTC_10x5] = ISL_FORMAT_ASTC_LDR_2D_10X5_FLT16, + [MESA_FORMAT_RGBA_ASTC_10x6] = ISL_FORMAT_ASTC_LDR_2D_10X6_FLT16, + [MESA_FORMAT_RGBA_ASTC_10x8] = ISL_FORMAT_ASTC_LDR_2D_10X8_FLT16, + [MESA_FORMAT_RGBA_ASTC_10x10] = ISL_FORMAT_ASTC_LDR_2D_10X10_FLT16, + [MESA_FORMAT_RGBA_ASTC_12x10] = ISL_FORMAT_ASTC_LDR_2D_12X10_FLT16, + [MESA_FORMAT_RGBA_ASTC_12x12] = ISL_FORMAT_ASTC_LDR_2D_12X12_FLT16, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4] = ISL_FORMAT_ASTC_LDR_2D_4X4_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4] = ISL_FORMAT_ASTC_LDR_2D_5X4_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5] = ISL_FORMAT_ASTC_LDR_2D_5X5_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5] = ISL_FORMAT_ASTC_LDR_2D_6X5_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6] = ISL_FORMAT_ASTC_LDR_2D_6X6_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5] = ISL_FORMAT_ASTC_LDR_2D_8X5_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6] = ISL_FORMAT_ASTC_LDR_2D_8X6_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8] = ISL_FORMAT_ASTC_LDR_2D_8X8_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5] = ISL_FORMAT_ASTC_LDR_2D_10X5_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6] = ISL_FORMAT_ASTC_LDR_2D_10X6_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8] = ISL_FORMAT_ASTC_LDR_2D_10X8_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10] = ISL_FORMAT_ASTC_LDR_2D_10X10_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10] = ISL_FORMAT_ASTC_LDR_2D_12X10_U8SRGB, + [MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12] = ISL_FORMAT_ASTC_LDR_2D_12X12_U8SRGB, [MESA_FORMAT_A_SNORM8] = 0, [MESA_FORMAT_L_SNORM8] = 0, @@ -254,30 +254,30 @@ brw_format_for_mesa_format(mesa_format mesa_format) [MESA_FORMAT_LA_SNORM16] = 0, [MESA_FORMAT_I_SNORM16] = 0, - [MESA_FORMAT_R9G9B9E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP, - [MESA_FORMAT_R11G11B10_FLOAT] = BRW_SURFACEFORMAT_R11G11B10_FLOAT, + [MESA_FORMAT_R9G9B9E5_FLOAT] = ISL_FORMAT_R9G9B9E5_SHAREDEXP, + [MESA_FORMAT_R11G11B10_FLOAT] = ISL_FORMAT_R11G11B10_FLOAT, [MESA_FORMAT_Z_FLOAT32] = 0, [MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = 0, - [MESA_FORMAT_R10G10B10A2_UNORM] = BRW_SURFACEFORMAT_R10G10B10A2_UNORM, - [MESA_FORMAT_B10G10R10A2_UINT] = BRW_SURFACEFORMAT_B10G10R10A2_UINT, - [MESA_FORMAT_R10G10B10A2_UINT] = BRW_SURFACEFORMAT_R10G10B10A2_UINT, + [MESA_FORMAT_R10G10B10A2_UNORM] = ISL_FORMAT_R10G10B10A2_UNORM, + [MESA_FORMAT_B10G10R10A2_UINT] = ISL_FORMAT_B10G10R10A2_UINT, + [MESA_FORMAT_R10G10B10A2_UINT] = ISL_FORMAT_R10G10B10A2_UINT, [MESA_FORMAT_B4G4R4X4_UNORM] = 0, - [MESA_FORMAT_B5G5R5X1_UNORM] = BRW_SURFACEFORMAT_B5G5R5X1_UNORM, + [MESA_FORMAT_B5G5R5X1_UNORM] = ISL_FORMAT_B5G5R5X1_UNORM, [MESA_FORMAT_R8G8B8X8_SNORM] = 0, - [MESA_FORMAT_R8G8B8X8_SRGB] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB, + [MESA_FORMAT_R8G8B8X8_SRGB] = ISL_FORMAT_R8G8B8X8_UNORM_SRGB, [MESA_FORMAT_X8B8G8R8_SRGB] = 0, [MESA_FORMAT_RGBX_UINT8] = 0, [MESA_FORMAT_RGBX_SINT8] = 0, - [MESA_FORMAT_B10G10R10X2_UNORM] = BRW_SURFACEFORMAT_B10G10R10X2_UNORM, - [MESA_FORMAT_RGBX_UNORM16] = BRW_SURFACEFORMAT_R16G16B16X16_UNORM, + [MESA_FORMAT_B10G10R10X2_UNORM] = ISL_FORMAT_B10G10R10X2_UNORM, + [MESA_FORMAT_RGBX_UNORM16] = ISL_FORMAT_R16G16B16X16_UNORM, [MESA_FORMAT_RGBX_SNORM16] = 0, - [MESA_FORMAT_RGBX_FLOAT16] = BRW_SURFACEFORMAT_R16G16B16X16_FLOAT, + [MESA_FORMAT_RGBX_FLOAT16] = ISL_FORMAT_R16G16B16X16_FLOAT, [MESA_FORMAT_RGBX_UINT16] = 0, [MESA_FORMAT_RGBX_SINT16] = 0, - [MESA_FORMAT_RGBX_FLOAT32] = BRW_SURFACEFORMAT_R32G32B32X32_FLOAT, + [MESA_FORMAT_RGBX_FLOAT32] = ISL_FORMAT_R32G32B32X32_FLOAT, [MESA_FORMAT_RGBX_UINT32] = 0, [MESA_FORMAT_RGBX_SINT32] = 0, }; @@ -305,7 +305,7 @@ brw_init_surface_formats(struct brw_context *brw) render = texture = brw_format_for_mesa_format(format); - /* The value of BRW_SURFACEFORMAT_R32G32B32A32_FLOAT is 0, so don't skip + /* The value of ISL_FORMAT_R32G32B32A32_FLOAT is 0, so don't skip * it. */ if (texture == 0 && format != MESA_FORMAT_RGBA_FLOAT32) @@ -333,29 +333,29 @@ brw_init_surface_formats(struct brw_context *brw) * channel into R, which is to say that we just treat them as * GL_RED. */ - case BRW_SURFACEFORMAT_I32_FLOAT: - case BRW_SURFACEFORMAT_L32_FLOAT: - render = BRW_SURFACEFORMAT_R32_FLOAT; + case ISL_FORMAT_I32_FLOAT: + case ISL_FORMAT_L32_FLOAT: + render = ISL_FORMAT_R32_FLOAT; break; - case BRW_SURFACEFORMAT_I16_FLOAT: - case BRW_SURFACEFORMAT_L16_FLOAT: - render = BRW_SURFACEFORMAT_R16_FLOAT; + case ISL_FORMAT_I16_FLOAT: + case ISL_FORMAT_L16_FLOAT: + render = ISL_FORMAT_R16_FLOAT; break; - case BRW_SURFACEFORMAT_I8_UNORM: - case BRW_SURFACEFORMAT_L8_UNORM: - render = BRW_SURFACEFORMAT_R8_UNORM; + case ISL_FORMAT_I8_UNORM: + case ISL_FORMAT_L8_UNORM: + render = ISL_FORMAT_R8_UNORM; break; - case BRW_SURFACEFORMAT_I16_UNORM: - case BRW_SURFACEFORMAT_L16_UNORM: - render = BRW_SURFACEFORMAT_R16_UNORM; + case ISL_FORMAT_I16_UNORM: + case ISL_FORMAT_L16_UNORM: + render = ISL_FORMAT_R16_UNORM; break; - case BRW_SURFACEFORMAT_R16G16B16X16_UNORM: - render = BRW_SURFACEFORMAT_R16G16B16A16_UNORM; + case ISL_FORMAT_R16G16B16X16_UNORM: + render = ISL_FORMAT_R16G16B16A16_UNORM; break; - case BRW_SURFACEFORMAT_R16G16B16X16_FLOAT: - render = BRW_SURFACEFORMAT_R16G16B16A16_FLOAT; + case ISL_FORMAT_R16G16B16X16_FLOAT: + render = ISL_FORMAT_R16G16B16A16_FLOAT; break; - case BRW_SURFACEFORMAT_B8G8R8X8_UNORM: + case ISL_FORMAT_B8G8R8X8_UNORM: /* XRGB is handled as ARGB because the chips in this family * cannot render to XRGB targets. This means that we have to * mask writes to alpha (ala glColorMask) and reconfigure the @@ -364,17 +364,17 @@ brw_init_surface_formats(struct brw_context *brw) * used. On Gen8+ BGRX is actually allowed (but not RGBX). */ if (!isl_format_supports_rendering(devinfo, texture)) - render = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; + render = ISL_FORMAT_B8G8R8A8_UNORM; break; - case BRW_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB: + case ISL_FORMAT_B8G8R8X8_UNORM_SRGB: if (!isl_format_supports_rendering(devinfo, texture)) - render = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB; + render = ISL_FORMAT_B8G8R8A8_UNORM_SRGB; break; - case BRW_SURFACEFORMAT_R8G8B8X8_UNORM: - render = BRW_SURFACEFORMAT_R8G8B8A8_UNORM; + case ISL_FORMAT_R8G8B8X8_UNORM: + render = ISL_FORMAT_R8G8B8A8_UNORM; break; - case BRW_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB: - render = BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB; + case ISL_FORMAT_R8G8B8X8_UNORM_SRGB: + render = ISL_FORMAT_R8G8B8A8_UNORM_SRGB; break; } @@ -523,23 +523,23 @@ translate_tex_format(struct brw_context *brw, switch( mesa_format ) { case MESA_FORMAT_Z_UNORM16: - return BRW_SURFACEFORMAT_R16_UNORM; + return ISL_FORMAT_R16_UNORM; case MESA_FORMAT_Z24_UNORM_S8_UINT: case MESA_FORMAT_Z24_UNORM_X8_UINT: - return BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS; + return ISL_FORMAT_R24_UNORM_X8_TYPELESS; case MESA_FORMAT_Z_FLOAT32: - return BRW_SURFACEFORMAT_R32_FLOAT; + return ISL_FORMAT_R32_FLOAT; case MESA_FORMAT_Z32_FLOAT_S8X24_UINT: - return BRW_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS; + return ISL_FORMAT_R32_FLOAT_X8X24_TYPELESS; case MESA_FORMAT_RGBA_FLOAT32: /* The value of this BRW_SURFACEFORMAT is 0, which tricks the * assertion below. */ - return BRW_SURFACEFORMAT_R32G32B32A32_FLOAT; + return ISL_FORMAT_R32G32B32A32_FLOAT; case MESA_FORMAT_SRGB_DXT1: if (brw->gen == 4 && !brw->is_g4x) { diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 177b530a469..8ffbc0a5fd5 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -563,10 +563,10 @@ brw_update_texture_surface(struct gl_context *ctx, /* Implement gen6 and gen7 gather work-around */ bool need_green_to_blue = false; if (for_gather) { - if (brw->gen == 7 && (format == BRW_SURFACEFORMAT_R32G32_FLOAT || - format == BRW_SURFACEFORMAT_R32G32_SINT || - format == BRW_SURFACEFORMAT_R32G32_UINT)) { - format = BRW_SURFACEFORMAT_R32G32_FLOAT_LD; + if (brw->gen == 7 && (format == ISL_FORMAT_R32G32_FLOAT || + format == ISL_FORMAT_R32G32_SINT || + format == ISL_FORMAT_R32G32_UINT)) { + format = ISL_FORMAT_R32G32_FLOAT_LD; need_green_to_blue = brw->is_haswell; } else if (brw->gen == 6) { /* Sandybridge's gather4 message is broken for integer formats. @@ -577,19 +577,19 @@ brw_update_texture_surface(struct gl_context *ctx, * bits. */ switch (format) { - case BRW_SURFACEFORMAT_R8_SINT: - case BRW_SURFACEFORMAT_R8_UINT: - format = BRW_SURFACEFORMAT_R8_UNORM; + case ISL_FORMAT_R8_SINT: + case ISL_FORMAT_R8_UINT: + format = ISL_FORMAT_R8_UNORM; break; - case BRW_SURFACEFORMAT_R16_SINT: - case BRW_SURFACEFORMAT_R16_UINT: - format = BRW_SURFACEFORMAT_R16_UNORM; + case ISL_FORMAT_R16_SINT: + case ISL_FORMAT_R16_UINT: + format = ISL_FORMAT_R16_UNORM; break; - case BRW_SURFACEFORMAT_R32_SINT: - case BRW_SURFACEFORMAT_R32_UINT: - format = BRW_SURFACEFORMAT_R32_FLOAT; + case ISL_FORMAT_R32_SINT: + case ISL_FORMAT_R32_UINT: + format = ISL_FORMAT_R32_FLOAT; break; default: @@ -605,11 +605,11 @@ brw_update_texture_surface(struct gl_context *ctx, } else { mt = mt->stencil_mt; } - format = BRW_SURFACEFORMAT_R8_UINT; + format = ISL_FORMAT_R8_UINT; } else if (brw->gen <= 7 && mt->format == MESA_FORMAT_S_UINT8) { assert(mt->r8stencil_mt && !mt->r8stencil_needs_update); mt = mt->r8stencil_mt; - format = BRW_SURFACEFORMAT_R8_UINT; + format = ISL_FORMAT_R8_UINT; } const int surf_index = surf_offset - &brw->wm.base.surf_offset[0]; @@ -720,7 +720,7 @@ brw_create_constant_surface(struct brw_context *brw, uint32_t *out_offset) { brw_emit_buffer_surface_state(brw, out_offset, bo, offset, - BRW_SURFACEFORMAT_R32G32B32A32_FLOAT, + ISL_FORMAT_R32G32B32A32_FLOAT, size, 1, false); } @@ -742,7 +742,7 @@ brw_create_buffer_surface(struct brw_context *brw, * with helper invocations, which cannot write to the buffer. */ brw_emit_buffer_surface_state(brw, out_offset, bo, offset, - BRW_SURFACEFORMAT_RAW, + ISL_FORMAT_RAW, size, 1, true); } @@ -797,16 +797,16 @@ brw_update_sol_surface(struct brw_context *brw, switch (num_vector_components) { case 1: - surface_format = BRW_SURFACEFORMAT_R32_FLOAT; + surface_format = ISL_FORMAT_R32_FLOAT; break; case 2: - surface_format = BRW_SURFACEFORMAT_R32G32_FLOAT; + surface_format = ISL_FORMAT_R32G32_FLOAT; break; case 3: - surface_format = BRW_SURFACEFORMAT_R32G32B32_FLOAT; + surface_format = ISL_FORMAT_R32G32B32_FLOAT; break; case 4: - surface_format = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT; + surface_format = ISL_FORMAT_R32G32B32A32_FLOAT; break; default: unreachable("Invalid vector size for transform feedback output"); @@ -930,7 +930,7 @@ brw_emit_null_surface_state(struct brw_context *brw, } surf[0] = (surface_type << BRW_SURFACE_TYPE_SHIFT | - BRW_SURFACEFORMAT_B8G8R8A8_UNORM << BRW_SURFACE_FORMAT_SHIFT); + ISL_FORMAT_B8G8R8A8_UNORM << BRW_SURFACE_FORMAT_SHIFT); if (brw->gen < 6) { surf[0] |= (1 << BRW_SURFACE_WRITEDISABLE_R_SHIFT | 1 << BRW_SURFACE_WRITEDISABLE_G_SHIFT | @@ -1498,7 +1498,7 @@ brw_upload_abo_surfaces(struct brw_context *brw, brw, intel_bo, binding->Offset, intel_bo->Base.Size - binding->Offset); brw_emit_buffer_surface_state(brw, &surf_offsets[i], bo, - binding->Offset, BRW_SURFACEFORMAT_RAW, + binding->Offset, ISL_FORMAT_RAW, bo->size - binding->Offset, 1, true); } @@ -1593,7 +1593,7 @@ get_image_format(struct brw_context *brw, mesa_format format, GLenum access) /* The hardware doesn't actually support a typed format that we can use * so we have to fall back to untyped read/write messages. */ - return BRW_SURFACEFORMAT_RAW; + return ISL_FORMAT_RAW; } } @@ -1709,7 +1709,7 @@ update_image_surface(struct brw_context *brw, if (obj->Target == GL_TEXTURE_BUFFER) { struct intel_buffer_object *intel_obj = intel_buffer_object(obj->BufferObject); - const unsigned texel_size = (format == BRW_SURFACEFORMAT_RAW ? 1 : + const unsigned texel_size = (format == ISL_FORMAT_RAW ? 1 : _mesa_get_format_bytes(u->_ActualFormat)); brw_emit_buffer_surface_state( @@ -1723,7 +1723,7 @@ update_image_surface(struct brw_context *brw, struct intel_texture_object *intel_obj = intel_texture_object(obj); struct intel_mipmap_tree *mt = intel_obj->mt; - if (format == BRW_SURFACEFORMAT_RAW) { + if (format == ISL_FORMAT_RAW) { brw_emit_buffer_surface_state( brw, surf_offset, mt->bo, mt->offset, format, mt->bo->size - mt->offset, 1 /* pitch */, @@ -1867,7 +1867,7 @@ brw_upload_cs_work_groups_surface(struct brw_context *brw) brw_emit_buffer_surface_state(brw, surf_offset, bo, bo_offset, - BRW_SURFACEFORMAT_RAW, + ISL_FORMAT_RAW, 3 * sizeof(GLuint), 1, true); brw->ctx.NewDriverState |= BRW_NEW_SURFACES; } diff --git a/src/mesa/drivers/dri/i965/gen7_cs_state.c b/src/mesa/drivers/dri/i965/gen7_cs_state.c index dc3cc66407a..d8df6bb8d29 100644 --- a/src/mesa/drivers/dri/i965/gen7_cs_state.c +++ b/src/mesa/drivers/dri/i965/gen7_cs_state.c @@ -51,7 +51,7 @@ brw_upload_cs_state(struct brw_context *brw) brw_emit_buffer_surface_state( brw, &stage_state->surf_offset[ prog_data->binding_table.shader_time_start], - brw->shader_time.bo, 0, BRW_SURFACEFORMAT_RAW, + brw->shader_time.bo, 0, ISL_FORMAT_RAW, brw->shader_time.bo->size, 1, true); } diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c index 5587a028001..e30dbb336d9 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c @@ -115,10 +115,10 @@ gen7_check_surface_setup(uint32_t *surf, bool is_render_target) } if (is_multisampled) { switch (GET_FIELD(surf[0], BRW_SURFACE_FORMAT)) { - case BRW_SURFACEFORMAT_I24X8_UNORM: - case BRW_SURFACEFORMAT_L24X8_UNORM: - case BRW_SURFACEFORMAT_A24X8_UNORM: - case BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS: + case ISL_FORMAT_I24X8_UNORM: + case ISL_FORMAT_L24X8_UNORM: + case ISL_FORMAT_A24X8_UNORM: + case ISL_FORMAT_R24_UNORM_X8_TYPELESS: assert(multisampled_surface_storage_format == GEN7_SURFACE_MSFMT_DEPTH_STENCIL); } @@ -164,7 +164,7 @@ gen7_emit_null_surface_state(struct brw_context *brw, * "If Surface Type is SURFTYPE_NULL, this field must be TRUE." */ surf[0] = BRW_SURFACE_NULL << BRW_SURFACE_TYPE_SHIFT | - BRW_SURFACEFORMAT_B8G8R8A8_UNORM << BRW_SURFACE_FORMAT_SHIFT | + ISL_FORMAT_B8G8R8A8_UNORM << BRW_SURFACE_FORMAT_SHIFT | GEN7_SURFACE_TILING_Y; surf[2] = SET_FIELD(width - 1, GEN7_SURFACE_WIDTH) | diff --git a/src/mesa/drivers/dri/i965/gen8_draw_upload.c b/src/mesa/drivers/dri/i965/gen8_draw_upload.c index 3177f9a8c7f..32e144741a0 100644 --- a/src/mesa/drivers/dri/i965/gen8_draw_upload.c +++ b/src/mesa/drivers/dri/i965/gen8_draw_upload.c @@ -39,10 +39,10 @@ static bool is_passthru_format(uint32_t format) { switch (format) { - case BRW_SURFACEFORMAT_R64_PASSTHRU: - case BRW_SURFACEFORMAT_R64G64_PASSTHRU: - case BRW_SURFACEFORMAT_R64G64B64_PASSTHRU: - case BRW_SURFACEFORMAT_R64G64B64A64_PASSTHRU: + case ISL_FORMAT_R64_PASSTHRU: + case ISL_FORMAT_R64G64_PASSTHRU: + case ISL_FORMAT_R64G64B64_PASSTHRU: + case ISL_FORMAT_R64G64B64A64_PASSTHRU: return true; default: return false; @@ -138,7 +138,7 @@ gen8_emit_vertices(struct brw_context *brw) OUT_BATCH((_3DSTATE_VERTEX_ELEMENTS << 16) | (3 - 2)); OUT_BATCH((0 << GEN6_VE0_INDEX_SHIFT) | GEN6_VE0_VALID | - (BRW_SURFACEFORMAT_R32G32B32A32_FLOAT << BRW_VE0_FORMAT_SHIFT) | + (ISL_FORMAT_R32G32B32A32_FLOAT << BRW_VE0_FORMAT_SHIFT) | (0 << BRW_VE0_SRC_OFFSET_SHIFT)); OUT_BATCH((BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_0_SHIFT) | (BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_1_SHIFT) | @@ -281,7 +281,7 @@ gen8_emit_vertices(struct brw_context *brw) vs_prog_data->uses_baseinstance) { OUT_BATCH(GEN6_VE0_VALID | brw->vb.nr_buffers << GEN6_VE0_INDEX_SHIFT | - BRW_SURFACEFORMAT_R32G32_UINT << BRW_VE0_FORMAT_SHIFT); + ISL_FORMAT_R32G32_UINT << BRW_VE0_FORMAT_SHIFT); OUT_BATCH((BRW_VE1_COMPONENT_STORE_SRC << BRW_VE1_COMPONENT_0_SHIFT) | (BRW_VE1_COMPONENT_STORE_SRC << BRW_VE1_COMPONENT_1_SHIFT) | (BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_2_SHIFT) | @@ -298,7 +298,7 @@ gen8_emit_vertices(struct brw_context *brw) if (vs_prog_data->uses_drawid) { OUT_BATCH(GEN6_VE0_VALID | ((brw->vb.nr_buffers + 1) << GEN6_VE0_INDEX_SHIFT) | - (BRW_SURFACEFORMAT_R32_UINT << BRW_VE0_FORMAT_SHIFT)); + (ISL_FORMAT_R32_UINT << BRW_VE0_FORMAT_SHIFT)); OUT_BATCH((BRW_VE1_COMPONENT_STORE_SRC << BRW_VE1_COMPONENT_0_SHIFT) | (BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_1_SHIFT) | (BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_2_SHIFT) | diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c index 08f83f3e064..501531d4ad4 100644 --- a/src/mesa/drivers/dri/i965/gen8_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c @@ -71,7 +71,7 @@ gen8_emit_null_surface_state(struct brw_context *brw, uint32_t *surf = gen8_allocate_surface_state(brw, out_offset, -1); surf[0] = BRW_SURFACE_NULL << BRW_SURFACE_TYPE_SHIFT | - BRW_SURFACEFORMAT_B8G8R8A8_UNORM << BRW_SURFACE_FORMAT_SHIFT | + ISL_FORMAT_B8G8R8A8_UNORM << BRW_SURFACE_FORMAT_SHIFT | GEN8_SURFACE_TILING_Y; surf[2] = SET_FIELD(width - 1, GEN7_SURFACE_WIDTH) | SET_FIELD(height - 1, GEN7_SURFACE_HEIGHT); -- 2.30.2