aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_defines.h
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2015-04-15 14:15:10 -0700
committerNanley Chery <[email protected]>2015-08-26 14:36:43 -0700
commit8b1f008e9acf94645a28c27fa261f6450a3edb84 (patch)
tree9494cd49a897f23abd1ada6fec1db9510a003af0 /src/mesa/drivers/dri/i965/brw_defines.h
parentcd49b97a8a2c0dd8dc1d7f32b86f519e936571fd (diff)
i965/surface_formats: add support for 2D ASTC surface formats
Define two-thirds of the 2D Intel ASTC surface formats (LDR-only). This allows a 1-to-1 mapping from the mesa format to the Intel format. ASTC textures will default to being processed in LDR mode. If there is hardware support for HDR/Full mode and the texture is not sRGB, add the format bit necessary to process it in HDR/Full mode. v2: remove extra newlines. v3: follow existing coding style in translate_tex_format(). v4: expound on the GEN9_SURFACE_ASTC_HDR_FORMAT_BIT comment. update SF table - ASTC is actually supported in Gen8. v5: conform the ASTC MESA_FORMAT enums to the existing naming convention. Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_defines.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 82a36357de9..cb5c82a002d 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -504,6 +504,38 @@
#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)