Commit ec1ddb97 authored by Marek Olšák's avatar Marek Olšák Committed by Marge Bot
Browse files

amd/registers: rename IMG_FORMAT to GFX10_FORMAT to disambiguate the meaning


Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Pierre-Eric Pelloux-Prayer's avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <!10261>
parent 3e0ce4af
......@@ -109,8 +109,8 @@ unsigned ac_get_tbuffer_format(enum chip_class chip_class, unsigned dfmt, unsign
{
// Some games try to access vertex buffers without a valid format.
// This is a game bug, but we should still handle it gracefully.
if (dfmt == V_008F0C_IMG_FORMAT_INVALID)
return V_008F0C_IMG_FORMAT_INVALID;
if (dfmt == V_008F0C_GFX10_FORMAT_INVALID)
return V_008F0C_GFX10_FORMAT_INVALID;
if (chip_class >= GFX10) {
unsigned format;
......@@ -118,43 +118,43 @@ unsigned ac_get_tbuffer_format(enum chip_class chip_class, unsigned dfmt, unsign
default:
unreachable("bad dfmt");
case V_008F0C_BUF_DATA_FORMAT_INVALID:
format = V_008F0C_IMG_FORMAT_INVALID;
format = V_008F0C_GFX10_FORMAT_INVALID;
break;
case V_008F0C_BUF_DATA_FORMAT_8:
format = V_008F0C_IMG_FORMAT_8_UINT;
format = V_008F0C_GFX10_FORMAT_8_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_8_8:
format = V_008F0C_IMG_FORMAT_8_8_UINT;
format = V_008F0C_GFX10_FORMAT_8_8_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_8_8_8_8:
format = V_008F0C_IMG_FORMAT_8_8_8_8_UINT;
format = V_008F0C_GFX10_FORMAT_8_8_8_8_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_16:
format = V_008F0C_IMG_FORMAT_16_UINT;
format = V_008F0C_GFX10_FORMAT_16_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_16_16:
format = V_008F0C_IMG_FORMAT_16_16_UINT;
format = V_008F0C_GFX10_FORMAT_16_16_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_16_16_16_16:
format = V_008F0C_IMG_FORMAT_16_16_16_16_UINT;
format = V_008F0C_GFX10_FORMAT_16_16_16_16_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_32:
format = V_008F0C_IMG_FORMAT_32_UINT;
format = V_008F0C_GFX10_FORMAT_32_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_32_32:
format = V_008F0C_IMG_FORMAT_32_32_UINT;
format = V_008F0C_GFX10_FORMAT_32_32_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_32_32_32:
format = V_008F0C_IMG_FORMAT_32_32_32_UINT;
format = V_008F0C_GFX10_FORMAT_32_32_32_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_32_32_32_32:
format = V_008F0C_IMG_FORMAT_32_32_32_32_UINT;
format = V_008F0C_GFX10_FORMAT_32_32_32_32_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_2_10_10_10:
format = V_008F0C_IMG_FORMAT_2_10_10_10_UINT;
format = V_008F0C_GFX10_FORMAT_2_10_10_10_UINT;
break;
case V_008F0C_BUF_DATA_FORMAT_10_11_11:
format = V_008F0C_IMG_FORMAT_10_11_11_UINT;
format = V_008F0C_GFX10_FORMAT_10_11_11_UINT;
break;
}
......
......@@ -21,8 +21,7 @@
# USE OR OTHER DEALINGS IN THE SOFTWARE.
#
"""
Script that generates the mapping from Gallium PIPE_FORMAT_xxx to gfx10
IMG_FORMAT_xxx enums.
Script that generates the mapping from Gallium PIPE_FORMAT_xxx to GFX10_FORMAT_xxx enums.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
......@@ -112,7 +111,7 @@ header_template = mako.template.Template("""\
#include "amdgfxregs.h"
#define FMT(_img_format, ...) \
{ .img_format = V_008F0C_IMG_FORMAT_##_img_format, \
{ .img_format = V_008F0C_GFX10_FORMAT_##_img_format, \
##__VA_ARGS__ }
const struct gfx10_format gfx10_format_table[PIPE_FORMAT_COUNT] = {
......@@ -130,7 +129,7 @@ class Gfx10Format(object):
RE_plain_channel = re.compile(r'X?([0-9]+)')
def __init__(self, enum_entry):
self.img_format = enum_entry.name[11:]
self.img_format = enum_entry.name[13:]
self.flags = getattr(enum_entry, 'flags', [])
code = self.img_format.split('_')
......@@ -258,7 +257,7 @@ if __name__ == '__main__':
with open(sys.argv[2], 'r') as filp:
db = RegisterDatabase.from_json(json.load(filp))
gfx10_formats = [Gfx10Format(entry) for entry in db.enum('IMG_FORMAT').entries]
gfx10_formats = [Gfx10Format(entry) for entry in db.enum('GFX10_FORMAT').entries]
mapping = Gfx10FormatMapping(pipe_formats, gfx10_formats)
......
......@@ -5077,7 +5077,7 @@ void visit_load_ubo(isel_context *ctx, nir_intrinsic_instr *instr)
S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) |
S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
if (ctx->options->chip_class >= GFX10) {
desc_type |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
desc_type |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_FLOAT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_RAW) |
S_008F0C_RESOURCE_LEVEL(1);
} else {
......@@ -5201,7 +5201,7 @@ void visit_load_constant(isel_context *ctx, nir_intrinsic_instr *instr)
S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) |
S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
if (ctx->options->chip_class >= GFX10) {
desc_type |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
desc_type |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_FLOAT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_RAW) |
S_008F0C_RESOURCE_LEVEL(1);
} else {
......@@ -6872,7 +6872,7 @@ Temp get_scratch_resource(isel_context *ctx)
S_008F0C_INDEX_STRIDE(ctx->program->wave_size == 64 ? 3 : 2);
if (ctx->program->chip_class >= GFX10) {
rsrc_conf |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
rsrc_conf |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_FLOAT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_RAW) |
S_008F0C_RESOURCE_LEVEL(1);
} else if (ctx->program->chip_class <= GFX7) { /* dfmt modifies stride on GFX8/GFX9 when ADD_TID_EN=1 */
......
......@@ -1275,7 +1275,7 @@ Temp load_scratch_resource(spill_ctx& ctx, Temp& scratch_offset,
S_008F0C_INDEX_STRIDE(ctx.program->wave_size == 64 ? 3 : 2);
if (ctx.program->chip_class >= GFX10) {
rsrc_conf |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
rsrc_conf |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_FLOAT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_RAW) |
S_008F0C_RESOURCE_LEVEL(1);
} else if (ctx.program->chip_class <= GFX7) { /* dfmt modifies stride on GFX8/GFX9 when ADD_TID_EN=1 */
......
{
"enums": {
"IMG_FORMAT": {
"GFX10_FORMAT": {
"entries": [
{"name": "IMG_FORMAT_INVALID", "value": 0},
{"name": "IMG_FORMAT_8_UNORM", "value": 1},
{"name": "IMG_FORMAT_8_SNORM", "value": 2},
{"name": "IMG_FORMAT_8_USCALED", "value": 3},
{"name": "IMG_FORMAT_8_SSCALED", "value": 4},
{"name": "IMG_FORMAT_8_UINT", "value": 5},
{"name": "IMG_FORMAT_8_SINT", "value": 6},
{"name": "IMG_FORMAT_16_UNORM", "value": 7},
{"name": "IMG_FORMAT_16_SNORM", "value": 8},
{"name": "IMG_FORMAT_16_USCALED", "value": 9},
{"name": "IMG_FORMAT_16_SSCALED", "value": 10},
{"name": "IMG_FORMAT_16_UINT", "value": 11},
{"name": "IMG_FORMAT_16_SINT", "value": 12},
{"name": "IMG_FORMAT_16_FLOAT", "value": 13},
{"name": "IMG_FORMAT_8_8_UNORM", "value": 14},
{"name": "IMG_FORMAT_8_8_SNORM", "value": 15},
{"name": "IMG_FORMAT_8_8_USCALED", "value": 16},
{"name": "IMG_FORMAT_8_8_SSCALED", "value": 17},
{"name": "IMG_FORMAT_8_8_UINT", "value": 18},
{"name": "IMG_FORMAT_8_8_SINT", "value": 19},
{"name": "IMG_FORMAT_32_UINT", "value": 20},
{"name": "IMG_FORMAT_32_SINT", "value": 21},
{"name": "IMG_FORMAT_32_FLOAT", "value": 22},
{"name": "IMG_FORMAT_16_16_UNORM", "value": 23},
{"name": "IMG_FORMAT_16_16_SNORM", "value": 24},
{"name": "IMG_FORMAT_16_16_USCALED", "value": 25},
{"name": "IMG_FORMAT_16_16_SSCALED", "value": 26},
{"name": "IMG_FORMAT_16_16_UINT", "value": 27},
{"name": "IMG_FORMAT_16_16_SINT", "value": 28},
{"name": "IMG_FORMAT_16_16_FLOAT", "value": 29},
{"name": "IMG_FORMAT_10_11_11_UNORM", "value": 30},
{"name": "IMG_FORMAT_10_11_11_SNORM", "value": 31},
{"name": "IMG_FORMAT_10_11_11_USCALED", "value": 32},
{"name": "IMG_FORMAT_10_11_11_SSCALED", "value": 33},
{"name": "IMG_FORMAT_10_11_11_UINT", "value": 34},
{"name": "IMG_FORMAT_10_11_11_SINT", "value": 35},
{"name": "IMG_FORMAT_10_11_11_FLOAT", "value": 36},
{"name": "IMG_FORMAT_11_11_10_UNORM", "value": 37},
{"name": "IMG_FORMAT_11_11_10_SNORM", "value": 38},
{"name": "IMG_FORMAT_11_11_10_USCALED", "value": 39},
{"name": "IMG_FORMAT_11_11_10_SSCALED", "value": 40},
{"name": "IMG_FORMAT_11_11_10_UINT", "value": 41},
{"name": "IMG_FORMAT_11_11_10_SINT", "value": 42},
{"name": "IMG_FORMAT_11_11_10_FLOAT", "value": 43},
{"name": "IMG_FORMAT_10_10_10_2_UNORM", "value": 44},
{"name": "IMG_FORMAT_10_10_10_2_SNORM", "value": 45},
{"name": "IMG_FORMAT_10_10_10_2_USCALED", "value": 46},
{"name": "IMG_FORMAT_10_10_10_2_SSCALED", "value": 47},
{"name": "IMG_FORMAT_10_10_10_2_UINT", "value": 48},
{"name": "IMG_FORMAT_10_10_10_2_SINT", "value": 49},
{"name": "IMG_FORMAT_2_10_10_10_UNORM", "value": 50},
{"name": "IMG_FORMAT_2_10_10_10_SNORM", "value": 51},
{"name": "IMG_FORMAT_2_10_10_10_USCALED", "value": 52},
{"name": "IMG_FORMAT_2_10_10_10_SSCALED", "value": 53},
{"name": "IMG_FORMAT_2_10_10_10_UINT", "value": 54},
{"name": "IMG_FORMAT_2_10_10_10_SINT", "value": 55},
{"name": "IMG_FORMAT_8_8_8_8_UNORM", "value": 56},
{"name": "IMG_FORMAT_8_8_8_8_SNORM", "value": 57},
{"name": "IMG_FORMAT_8_8_8_8_USCALED", "value": 58},
{"name": "IMG_FORMAT_8_8_8_8_SSCALED", "value": 59},
{"name": "IMG_FORMAT_8_8_8_8_UINT", "value": 60},
{"name": "IMG_FORMAT_8_8_8_8_SINT", "value": 61},
{"name": "IMG_FORMAT_32_32_UINT", "value": 62},
{"name": "IMG_FORMAT_32_32_SINT", "value": 63},
{"name": "IMG_FORMAT_32_32_FLOAT", "value": 64},
{"name": "IMG_FORMAT_16_16_16_16_UNORM", "value": 65},
{"name": "IMG_FORMAT_16_16_16_16_SNORM", "value": 66},
{"name": "IMG_FORMAT_16_16_16_16_USCALED", "value": 67},
{"name": "IMG_FORMAT_16_16_16_16_SSCALED", "value": 68},
{"name": "IMG_FORMAT_16_16_16_16_UINT", "value": 69},
{"name": "IMG_FORMAT_16_16_16_16_SINT", "value": 70},
{"name": "IMG_FORMAT_16_16_16_16_FLOAT", "value": 71},
{"flags": ["buffers_only"], "name": "IMG_FORMAT_32_32_32_UINT", "value": 72},
{"flags": ["buffers_only"], "name": "IMG_FORMAT_32_32_32_SINT", "value": 73},
{"flags": ["buffers_only"], "name": "IMG_FORMAT_32_32_32_FLOAT", "value": 74},
{"name": "IMG_FORMAT_32_32_32_32_UINT", "value": 75},
{"name": "IMG_FORMAT_32_32_32_32_SINT", "value": 76},
{"name": "IMG_FORMAT_32_32_32_32_FLOAT", "value": 77},
{"name": "IMG_FORMAT_8_SRGB", "value": 128},
{"name": "IMG_FORMAT_8_8_SRGB", "value": 129},
{"name": "IMG_FORMAT_8_8_8_8_SRGB", "value": 130},
{"name": "IMG_FORMAT_6E4_FLOAT", "value": 131},
{"name": "IMG_FORMAT_5_9_9_9_FLOAT", "value": 132},
{"name": "IMG_FORMAT_5_6_5_UNORM", "value": 133},
{"name": "IMG_FORMAT_1_5_5_5_UNORM", "value": 134},
{"name": "IMG_FORMAT_5_5_5_1_UNORM", "value": 135},
{"name": "IMG_FORMAT_4_4_4_4_UNORM", "value": 136},
{"name": "IMG_FORMAT_4_4_UNORM", "value": 137},
{"name": "IMG_FORMAT_1_UNORM", "value": 138},
{"name": "IMG_FORMAT_1_REVERSED_UNORM", "value": 139},
{"name": "IMG_FORMAT_32_FLOAT_CLAMP", "value": 140},
{"name": "IMG_FORMAT_8_24_UNORM", "value": 141},
{"name": "IMG_FORMAT_8_24_UINT", "value": 142},
{"name": "IMG_FORMAT_24_8_UNORM", "value": 143},
{"name": "IMG_FORMAT_24_8_UINT", "value": 144},
{"name": "IMG_FORMAT_X24_8_32_UINT", "value": 145},
{"name": "IMG_FORMAT_X24_8_32_FLOAT", "value": 146},
{"name": "IMG_FORMAT_GB_GR_UNORM", "value": 147},
{"name": "IMG_FORMAT_GB_GR_SNORM", "value": 148},
{"name": "IMG_FORMAT_GB_GR_UINT", "value": 149},
{"name": "IMG_FORMAT_GB_GR_SRGB", "value": 150},
{"name": "IMG_FORMAT_BG_RG_UNORM", "value": 151},
{"name": "IMG_FORMAT_BG_RG_SNORM", "value": 152},
{"name": "IMG_FORMAT_BG_RG_UINT", "value": 153},
{"name": "IMG_FORMAT_BG_RG_SRGB", "value": 154},
{"name": "IMG_FORMAT_FMASK8_S2_F1", "value": 156},
{"name": "IMG_FORMAT_FMASK8_S4_F1", "value": 157},
{"name": "IMG_FORMAT_FMASK8_S8_F1", "value": 158},
{"name": "IMG_FORMAT_FMASK8_S2_F2", "value": 159},
{"name": "IMG_FORMAT_FMASK8_S4_F2", "value": 160},
{"name": "IMG_FORMAT_FMASK8_S4_F4", "value": 161},
{"name": "IMG_FORMAT_FMASK16_S16_F1", "value": 162},
{"name": "IMG_FORMAT_FMASK16_S8_F2", "value": 163},
{"name": "IMG_FORMAT_FMASK32_S16_F2", "value": 164},
{"name": "IMG_FORMAT_FMASK32_S8_F4", "value": 165},
{"name": "IMG_FORMAT_FMASK32_S8_F8", "value": 166},
{"name": "IMG_FORMAT_FMASK64_S16_F4", "value": 167},
{"name": "IMG_FORMAT_FMASK64_S16_F8", "value": 168},
{"name": "IMG_FORMAT_BC1_UNORM", "value": 169},
{"name": "IMG_FORMAT_BC1_SRGB", "value": 170},
{"name": "IMG_FORMAT_BC2_UNORM", "value": 171},
{"name": "IMG_FORMAT_BC2_SRGB", "value": 172},
{"name": "IMG_FORMAT_BC3_UNORM", "value": 173},
{"name": "IMG_FORMAT_BC3_SRGB", "value": 174},
{"name": "IMG_FORMAT_BC4_UNORM", "value": 175},
{"name": "IMG_FORMAT_BC4_SNORM", "value": 176},
{"name": "IMG_FORMAT_BC5_UNORM", "value": 177},
{"name": "IMG_FORMAT_BC5_SNORM", "value": 178},
{"name": "IMG_FORMAT_BC6_UFLOAT", "value": 179},
{"name": "IMG_FORMAT_BC6_SFLOAT", "value": 180},
{"name": "IMG_FORMAT_BC7_UNORM", "value": 181},
{"name": "IMG_FORMAT_BC7_SRGB", "value": 182},
{"name": "IMG_FORMAT_MM_8_UNORM", "value": 265},
{"name": "IMG_FORMAT_MM_8_UINT", "value": 266},
{"name": "IMG_FORMAT_MM_8_8_UNORM", "value": 267},
{"name": "IMG_FORMAT_MM_8_8_UINT", "value": 268},
{"name": "IMG_FORMAT_MM_8_8_8_8_UNORM", "value": 269},
{"name": "IMG_FORMAT_MM_8_8_8_8_UINT", "value": 270},
{"name": "IMG_FORMAT_MM_VYUY8_UNORM", "value": 271},
{"name": "IMG_FORMAT_MM_VYUY8_UINT", "value": 272},
{"name": "IMG_FORMAT_MM_10_11_11_UNORM", "value": 273},
{"name": "IMG_FORMAT_MM_10_11_11_UINT", "value": 274},
{"name": "IMG_FORMAT_MM_2_10_10_10_UNORM", "value": 275},
{"name": "IMG_FORMAT_MM_2_10_10_10_UINT", "value": 276},
{"name": "IMG_FORMAT_MM_16_16_16_16_UNORM", "value": 277},
{"name": "IMG_FORMAT_MM_16_16_16_16_UINT", "value": 278},
{"name": "IMG_FORMAT_MM_10_IN_16_UNORM", "value": 279},
{"name": "IMG_FORMAT_MM_10_IN_16_UINT", "value": 280},
{"name": "IMG_FORMAT_MM_10_IN_16_16_UNORM", "value": 281},
{"name": "IMG_FORMAT_MM_10_IN_16_16_UINT", "value": 282},
{"name": "IMG_FORMAT_MM_10_IN_16_16_16_16_UNORM ", "value": 283},
{"name": "IMG_FORMAT_MM_10_IN_16_16_16_16_UINT", "value": 284},
{"name": "IMG_FORMAT_7E3_FLOAT", "value": 285},
{"name": "IMG_FORMAT_YCBCR_UNORM", "value": 286},
{"name": "IMG_FORMAT_YCBCR_SNORM", "value": 287},
{"name": "IMG_FORMAT_YCBCR_USCALED", "value": 288},
{"name": "IMG_FORMAT_YCBCR_SSCALED", "value": 289},
{"name": "IMG_FORMAT_YCBCR_UINT", "value": 290},
{"name": "IMG_FORMAT_YCBCR_SINT", "value": 291},
{"name": "IMG_FORMAT_YCBCR_SRGB", "value": 292}
{"name": "GFX10_FORMAT_INVALID", "value": 0},
{"name": "GFX10_FORMAT_8_UNORM", "value": 1},
{"name": "GFX10_FORMAT_8_SNORM", "value": 2},
{"name": "GFX10_FORMAT_8_USCALED", "value": 3},
{"name": "GFX10_FORMAT_8_SSCALED", "value": 4},
{"name": "GFX10_FORMAT_8_UINT", "value": 5},
{"name": "GFX10_FORMAT_8_SINT", "value": 6},
{"name": "GFX10_FORMAT_16_UNORM", "value": 7},
{"name": "GFX10_FORMAT_16_SNORM", "value": 8},
{"name": "GFX10_FORMAT_16_USCALED", "value": 9},
{"name": "GFX10_FORMAT_16_SSCALED", "value": 10},
{"name": "GFX10_FORMAT_16_UINT", "value": 11},
{"name": "GFX10_FORMAT_16_SINT", "value": 12},
{"name": "GFX10_FORMAT_16_FLOAT", "value": 13},
{"name": "GFX10_FORMAT_8_8_UNORM", "value": 14},
{"name": "GFX10_FORMAT_8_8_SNORM", "value": 15},
{"name": "GFX10_FORMAT_8_8_USCALED", "value": 16},
{"name": "GFX10_FORMAT_8_8_SSCALED", "value": 17},
{"name": "GFX10_FORMAT_8_8_UINT", "value": 18},
{"name": "GFX10_FORMAT_8_8_SINT", "value": 19},
{"name": "GFX10_FORMAT_32_UINT", "value": 20},
{"name": "GFX10_FORMAT_32_SINT", "value": 21},
{"name": "GFX10_FORMAT_32_FLOAT", "value": 22},
{"name": "GFX10_FORMAT_16_16_UNORM", "value": 23},
{"name": "GFX10_FORMAT_16_16_SNORM", "value": 24},
{"name": "GFX10_FORMAT_16_16_USCALED", "value": 25},
{"name": "GFX10_FORMAT_16_16_SSCALED", "value": 26},
{"name": "GFX10_FORMAT_16_16_UINT", "value": 27},
{"name": "GFX10_FORMAT_16_16_SINT", "value": 28},
{"name": "GFX10_FORMAT_16_16_FLOAT", "value": 29},
{"name": "GFX10_FORMAT_10_11_11_UNORM", "value": 30},
{"name": "GFX10_FORMAT_10_11_11_SNORM", "value": 31},
{"name": "GFX10_FORMAT_10_11_11_USCALED", "value": 32},
{"name": "GFX10_FORMAT_10_11_11_SSCALED", "value": 33},
{"name": "GFX10_FORMAT_10_11_11_UINT", "value": 34},
{"name": "GFX10_FORMAT_10_11_11_SINT", "value": 35},
{"name": "GFX10_FORMAT_10_11_11_FLOAT", "value": 36},
{"name": "GFX10_FORMAT_11_11_10_UNORM", "value": 37},
{"name": "GFX10_FORMAT_11_11_10_SNORM", "value": 38},
{"name": "GFX10_FORMAT_11_11_10_USCALED", "value": 39},
{"name": "GFX10_FORMAT_11_11_10_SSCALED", "value": 40},
{"name": "GFX10_FORMAT_11_11_10_UINT", "value": 41},
{"name": "GFX10_FORMAT_11_11_10_SINT", "value": 42},
{"name": "GFX10_FORMAT_11_11_10_FLOAT", "value": 43},
{"name": "GFX10_FORMAT_10_10_10_2_UNORM", "value": 44},
{"name": "GFX10_FORMAT_10_10_10_2_SNORM", "value": 45},
{"name": "GFX10_FORMAT_10_10_10_2_USCALED", "value": 46},
{"name": "GFX10_FORMAT_10_10_10_2_SSCALED", "value": 47},
{"name": "GFX10_FORMAT_10_10_10_2_UINT", "value": 48},
{"name": "GFX10_FORMAT_10_10_10_2_SINT", "value": 49},
{"name": "GFX10_FORMAT_2_10_10_10_UNORM", "value": 50},
{"name": "GFX10_FORMAT_2_10_10_10_SNORM", "value": 51},
{"name": "GFX10_FORMAT_2_10_10_10_USCALED", "value": 52},
{"name": "GFX10_FORMAT_2_10_10_10_SSCALED", "value": 53},
{"name": "GFX10_FORMAT_2_10_10_10_UINT", "value": 54},
{"name": "GFX10_FORMAT_2_10_10_10_SINT", "value": 55},
{"name": "GFX10_FORMAT_8_8_8_8_UNORM", "value": 56},
{"name": "GFX10_FORMAT_8_8_8_8_SNORM", "value": 57},
{"name": "GFX10_FORMAT_8_8_8_8_USCALED", "value": 58},
{"name": "GFX10_FORMAT_8_8_8_8_SSCALED", "value": 59},
{"name": "GFX10_FORMAT_8_8_8_8_UINT", "value": 60},
{"name": "GFX10_FORMAT_8_8_8_8_SINT", "value": 61},
{"name": "GFX10_FORMAT_32_32_UINT", "value": 62},
{"name": "GFX10_FORMAT_32_32_SINT", "value": 63},
{"name": "GFX10_FORMAT_32_32_FLOAT", "value": 64},
{"name": "GFX10_FORMAT_16_16_16_16_UNORM", "value": 65},
{"name": "GFX10_FORMAT_16_16_16_16_SNORM", "value": 66},
{"name": "GFX10_FORMAT_16_16_16_16_USCALED", "value": 67},
{"name": "GFX10_FORMAT_16_16_16_16_SSCALED", "value": 68},
{"name": "GFX10_FORMAT_16_16_16_16_UINT", "value": 69},
{"name": "GFX10_FORMAT_16_16_16_16_SINT", "value": 70},
{"name": "GFX10_FORMAT_16_16_16_16_FLOAT", "value": 71},
{"flags": ["buffers_only"], "name": "GFX10_FORMAT_32_32_32_UINT", "value": 72},
{"flags": ["buffers_only"], "name": "GFX10_FORMAT_32_32_32_SINT", "value": 73},
{"flags": ["buffers_only"], "name": "GFX10_FORMAT_32_32_32_FLOAT", "value": 74},
{"name": "GFX10_FORMAT_32_32_32_32_UINT", "value": 75},
{"name": "GFX10_FORMAT_32_32_32_32_SINT", "value": 76},
{"name": "GFX10_FORMAT_32_32_32_32_FLOAT", "value": 77},
{"name": "GFX10_FORMAT_8_SRGB", "value": 128},
{"name": "GFX10_FORMAT_8_8_SRGB", "value": 129},
{"name": "GFX10_FORMAT_8_8_8_8_SRGB", "value": 130},
{"name": "GFX10_FORMAT_6E4_FLOAT", "value": 131},
{"name": "GFX10_FORMAT_5_9_9_9_FLOAT", "value": 132},
{"name": "GFX10_FORMAT_5_6_5_UNORM", "value": 133},
{"name": "GFX10_FORMAT_1_5_5_5_UNORM", "value": 134},
{"name": "GFX10_FORMAT_5_5_5_1_UNORM", "value": 135},
{"name": "GFX10_FORMAT_4_4_4_4_UNORM", "value": 136},
{"name": "GFX10_FORMAT_4_4_UNORM", "value": 137},
{"name": "GFX10_FORMAT_1_UNORM", "value": 138},
{"name": "GFX10_FORMAT_1_REVERSED_UNORM", "value": 139},
{"name": "GFX10_FORMAT_32_FLOAT_CLAMP", "value": 140},
{"name": "GFX10_FORMAT_8_24_UNORM", "value": 141},
{"name": "GFX10_FORMAT_8_24_UINT", "value": 142},
{"name": "GFX10_FORMAT_24_8_UNORM", "value": 143},
{"name": "GFX10_FORMAT_24_8_UINT", "value": 144},
{"name": "GFX10_FORMAT_X24_8_32_UINT", "value": 145},
{"name": "GFX10_FORMAT_X24_8_32_FLOAT", "value": 146},
{"name": "GFX10_FORMAT_GB_GR_UNORM", "value": 147},
{"name": "GFX10_FORMAT_GB_GR_SNORM", "value": 148},
{"name": "GFX10_FORMAT_GB_GR_UINT", "value": 149},
{"name": "GFX10_FORMAT_GB_GR_SRGB", "value": 150},
{"name": "GFX10_FORMAT_BG_RG_UNORM", "value": 151},
{"name": "GFX10_FORMAT_BG_RG_SNORM", "value": 152},
{"name": "GFX10_FORMAT_BG_RG_UINT", "value": 153},
{"name": "GFX10_FORMAT_BG_RG_SRGB", "value": 154},
{"name": "GFX10_FORMAT_FMASK8_S2_F1", "value": 156},
{"name": "GFX10_FORMAT_FMASK8_S4_F1", "value": 157},
{"name": "GFX10_FORMAT_FMASK8_S8_F1", "value": 158},
{"name": "GFX10_FORMAT_FMASK8_S2_F2", "value": 159},
{"name": "GFX10_FORMAT_FMASK8_S4_F2", "value": 160},
{"name": "GFX10_FORMAT_FMASK8_S4_F4", "value": 161},
{"name": "GFX10_FORMAT_FMASK16_S16_F1", "value": 162},
{"name": "GFX10_FORMAT_FMASK16_S8_F2", "value": 163},
{"name": "GFX10_FORMAT_FMASK32_S16_F2", "value": 164},
{"name": "GFX10_FORMAT_FMASK32_S8_F4", "value": 165},
{"name": "GFX10_FORMAT_FMASK32_S8_F8", "value": 166},
{"name": "GFX10_FORMAT_FMASK64_S16_F4", "value": 167},
{"name": "GFX10_FORMAT_FMASK64_S16_F8", "value": 168},
{"name": "GFX10_FORMAT_BC1_UNORM", "value": 169},
{"name": "GFX10_FORMAT_BC1_SRGB", "value": 170},
{"name": "GFX10_FORMAT_BC2_UNORM", "value": 171},
{"name": "GFX10_FORMAT_BC2_SRGB", "value": 172},
{"name": "GFX10_FORMAT_BC3_UNORM", "value": 173},
{"name": "GFX10_FORMAT_BC3_SRGB", "value": 174},
{"name": "GFX10_FORMAT_BC4_UNORM", "value": 175},
{"name": "GFX10_FORMAT_BC4_SNORM", "value": 176},
{"name": "GFX10_FORMAT_BC5_UNORM", "value": 177},
{"name": "GFX10_FORMAT_BC5_SNORM", "value": 178},
{"name": "GFX10_FORMAT_BC6_UFLOAT", "value": 179},
{"name": "GFX10_FORMAT_BC6_SFLOAT", "value": 180},
{"name": "GFX10_FORMAT_BC7_UNORM", "value": 181},
{"name": "GFX10_FORMAT_BC7_SRGB", "value": 182},
{"name": "GFX10_FORMAT_MM_8_UNORM", "value": 265},
{"name": "GFX10_FORMAT_MM_8_UINT", "value": 266},
{"name": "GFX10_FORMAT_MM_8_8_UNORM", "value": 267},
{"name": "GFX10_FORMAT_MM_8_8_UINT", "value": 268},
{"name": "GFX10_FORMAT_MM_8_8_8_8_UNORM", "value": 269},
{"name": "GFX10_FORMAT_MM_8_8_8_8_UINT", "value": 270},
{"name": "GFX10_FORMAT_MM_VYUY8_UNORM", "value": 271},
{"name": "GFX10_FORMAT_MM_VYUY8_UINT", "value": 272},
{"name": "GFX10_FORMAT_MM_10_11_11_UNORM", "value": 273},
{"name": "GFX10_FORMAT_MM_10_11_11_UINT", "value": 274},
{"name": "GFX10_FORMAT_MM_2_10_10_10_UNORM", "value": 275},
{"name": "GFX10_FORMAT_MM_2_10_10_10_UINT", "value": 276},
{"name": "GFX10_FORMAT_MM_16_16_16_16_UNORM", "value": 277},
{"name": "GFX10_FORMAT_MM_16_16_16_16_UINT", "value": 278},
{"name": "GFX10_FORMAT_MM_10_IN_16_UNORM", "value": 279},
{"name": "GFX10_FORMAT_MM_10_IN_16_UINT", "value": 280},
{"name": "GFX10_FORMAT_MM_10_IN_16_16_UNORM", "value": 281},
{"name": "GFX10_FORMAT_MM_10_IN_16_16_UINT", "value": 282},
{"name": "GFX10_FORMAT_MM_10_IN_16_16_16_16_UNORM ", "value": 283},
{"name": "GFX10_FORMAT_MM_10_IN_16_16_16_16_UINT", "value": 284},
{"name": "GFX10_FORMAT_7E3_FLOAT", "value": 285},
{"name": "GFX10_FORMAT_YCBCR_UNORM", "value": 286},
{"name": "GFX10_FORMAT_YCBCR_SNORM", "value": 287},
{"name": "GFX10_FORMAT_YCBCR_USCALED", "value": 288},
{"name": "GFX10_FORMAT_YCBCR_SSCALED", "value": 289},
{"name": "GFX10_FORMAT_YCBCR_UINT", "value": 290},
{"name": "GFX10_FORMAT_YCBCR_SINT", "value": 291},
{"name": "GFX10_FORMAT_YCBCR_SRGB", "value": 292}
]
},
"SQ_EXP_0__TGT": {
......@@ -332,7 +332,7 @@
{"bits": [3, 5], "name": "DST_SEL_Y"},
{"bits": [6, 8], "name": "DST_SEL_Z"},
{"bits": [9, 11], "name": "DST_SEL_W"},
{"bits": [12, 18], "enum_ref": "IMG_FORMAT", "name": "FORMAT"},
{"bits": [12, 18], "enum_ref": "GFX10_FORMAT", "name": "FORMAT"},
{"bits": [21, 22], "name": "INDEX_STRIDE"},
{"bits": [23, 23], "name": "ADD_TID_ENABLE"},
{"bits": [24, 24], "comment": "must be 1", "name": "RESOURCE_LEVEL"},
......@@ -346,7 +346,7 @@
{"bits": [3, 5], "name": "DST_SEL_Y"},
{"bits": [6, 8], "name": "DST_SEL_Z"},
{"bits": [9, 11], "name": "DST_SEL_W"},
{"bits": [12, 18], "enum_ref": "IMG_FORMAT", "name": "FORMAT"},
{"bits": [12, 18], "enum_ref": "GFX10_FORMAT", "name": "FORMAT"},
{"bits": [21, 22], "name": "INDEX_STRIDE"},
{"bits": [23, 23], "name": "ADD_TID_ENABLE"},
{"bits": [24, 24], "comment": "must be 1", "name": "RESOURCE_LEVEL"},
......@@ -368,7 +368,7 @@
"fields": [
{"bits": [0, 7], "name": "BASE_ADDRESS_HI"},
{"bits": [8, 19], "name": "MIN_LOD"},
{"bits": [20, 28], "enum_ref": "IMG_FORMAT", "name": "FORMAT"},
{"bits": [20, 28], "enum_ref": "GFX10_FORMAT", "name": "FORMAT"},
{"bits": [30, 31], "name": "WIDTH_LO"}
]
},
......
......@@ -2817,7 +2817,7 @@ radv_flush_vertex_descriptors(struct radv_cmd_buffer *cmd_buffer, bool pipeline_
*/
int oob_select = stride ? V_008F0C_OOB_SELECT_STRUCTURED : V_008F0C_OOB_SELECT_RAW;
rsrc_word3 |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_UINT) |
rsrc_word3 |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_UINT) |
S_008F0C_OOB_SELECT(oob_select) | S_008F0C_RESOURCE_LEVEL(1);
} else {
rsrc_word3 |= S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_UINT) |
......@@ -2923,7 +2923,7 @@ radv_flush_streamout_descriptors(struct radv_cmd_buffer *cmd_buffer)
S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) | S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX10) {
rsrc_word3 |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
rsrc_word3 |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_FLOAT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_RAW) | S_008F0C_RESOURCE_LEVEL(1);
} else {
rsrc_word3 |= S_008F0C_DATA_FORMAT(V_008F0C_BUF_DATA_FORMAT_32);
......@@ -4006,7 +4006,7 @@ radv_CmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pi
S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) | S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX10) {
dst[3] |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
dst[3] |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_FLOAT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_RAW) | S_008F0C_RESOURCE_LEVEL(1);
} else {
dst[3] |= S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_FLOAT) |
......
......@@ -980,7 +980,7 @@ write_buffer_descriptor(struct radv_device *device, struct radv_cmd_buffer *cmd_
S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) | S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
if (device->physical_device->rad_info.chip_class >= GFX10) {
rsrc_word3 |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
rsrc_word3 |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_FLOAT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_RAW) | S_008F0C_RESOURCE_LEVEL(1);
} else {
rsrc_word3 |= S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_FLOAT) |
......
......@@ -3256,7 +3256,7 @@ fill_geom_tess_rings(struct radv_queue *queue, uint32_t *map, bool add_sample_po
S_008F0C_INDEX_STRIDE(3) | S_008F0C_ADD_TID_ENABLE(1);
if (queue->device->physical_device->rad_info.chip_class >= GFX10) {
desc[3] |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
desc[3] |= S_008F0C_FORMAT(V_008F0C_GFX10_FORMAT_32_FLOAT) |
S_008F0C_OOB_SELECT(V_008F0C_OOB_SELECT_DISABLED) | S_008F0C_RESOURCE_LEVEL(1);
} else {
desc[3] |= S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_FLOAT) |
......@@ -3273,7 +3273,7 @@ fill_geom_tess_rings(struct radv_queue *queue, uint32_t *map, bool add_sample_po
S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) | S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
if (queue->device->physical_device->rad_info.chip_class >= GFX10) {