mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
pan/genxml: Remove reg_format from v9+ ConversionDesc
The Register Format-field in ConversionDescriptor is not used since v9 and should be left as zero. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
This commit is contained in:
parent
6058cd2dfa
commit
dfb6a101f1
6 changed files with 32 additions and 36 deletions
|
|
@ -150,13 +150,14 @@ pan_preload_emit_blend(unsigned rt,
|
|||
cfg.equation.color_mask = 0xf;
|
||||
|
||||
#if PAN_ARCH >= 6
|
||||
nir_alu_type type = preload_shader->key.surfaces[rt].type;
|
||||
|
||||
cfg.internal.fixed_function.num_comps = 4;
|
||||
cfg.internal.fixed_function.conversion.memory_format =
|
||||
GENX(pan_dithered_format_from_pipe_format)(iview->format, false);
|
||||
#if PAN_ARCH < 9
|
||||
nir_alu_type type = preload_shader->key.surfaces[rt].type;
|
||||
cfg.internal.fixed_function.conversion.register_format =
|
||||
nir_type_to_reg_fmt(type);
|
||||
#endif
|
||||
|
||||
cfg.internal.fixed_function.rt = rt;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1028,7 +1028,6 @@
|
|||
<struct name="Internal Conversion" size="1" align="4">
|
||||
<field name="Memory Format" size="22" start="0" type="Pixel Format"/>
|
||||
<field name="Raw" size="1" start="22" type="bool"/>
|
||||
<field name="Register Format" size="3" start="24" type="Register File Format"/>
|
||||
</struct>
|
||||
|
||||
<struct name="Blend Fixed-Function" size="2">
|
||||
|
|
|
|||
|
|
@ -1267,7 +1267,6 @@
|
|||
<struct name="Internal Conversion" size="1" align="4">
|
||||
<field name="Memory Format" size="22" start="0" type="Pixel Format"/>
|
||||
<field name="Raw" size="1" start="22" type="bool"/>
|
||||
<field name="Register Format" size="3" start="24" type="Register File Format"/>
|
||||
</struct>
|
||||
|
||||
<struct name="Blend Fixed-Function" size="2">
|
||||
|
|
|
|||
|
|
@ -1576,7 +1576,6 @@
|
|||
<struct name="Internal Conversion" size="1" align="4">
|
||||
<field name="Memory Format" size="22" start="0" type="Pixel Format"/>
|
||||
<field name="Raw" size="1" start="22" type="bool"/>
|
||||
<field name="Register Format" size="3" start="24" type="Register File Format"/>
|
||||
</struct>
|
||||
|
||||
<struct name="Blend Fixed-Function" size="2">
|
||||
|
|
|
|||
|
|
@ -575,7 +575,6 @@
|
|||
<struct name="Internal Conversion" size="1" align="4">
|
||||
<field name="Memory Format" size="22" start="0" type="Pixel Format"/>
|
||||
<field name="Raw" size="1" start="22" type="bool"/>
|
||||
<field name="Register Format" size="3" start="24" type="Register File Format"/>
|
||||
</struct>
|
||||
|
||||
<struct name="Blend Fixed-Function" size="2">
|
||||
|
|
|
|||
|
|
@ -703,6 +703,32 @@ GENX(pan_blend_create_shader)(const struct pan_blend_state *state,
|
|||
}
|
||||
|
||||
#if PAN_ARCH >= 6
|
||||
|
||||
#if PAN_ARCH < 9
|
||||
static enum mali_register_file_format
|
||||
get_register_format(nir_alu_type T)
|
||||
{
|
||||
switch (T) {
|
||||
case nir_type_float16:
|
||||
return MALI_REGISTER_FILE_FORMAT_F16;
|
||||
case nir_type_float32:
|
||||
return MALI_REGISTER_FILE_FORMAT_F32;
|
||||
case nir_type_int8:
|
||||
case nir_type_int16:
|
||||
return MALI_REGISTER_FILE_FORMAT_I16;
|
||||
case nir_type_int32:
|
||||
return MALI_REGISTER_FILE_FORMAT_I32;
|
||||
case nir_type_uint8:
|
||||
case nir_type_uint16:
|
||||
return MALI_REGISTER_FILE_FORMAT_U16;
|
||||
case nir_type_uint32:
|
||||
return MALI_REGISTER_FILE_FORMAT_U32;
|
||||
default:
|
||||
UNREACHABLE("Invalid format");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
uint64_t
|
||||
GENX(pan_blend_get_internal_desc)(enum pipe_format fmt, unsigned rt,
|
||||
unsigned force_size, bool dithered)
|
||||
|
|
@ -715,41 +741,14 @@ GENX(pan_blend_get_internal_desc)(enum pipe_format fmt, unsigned rt,
|
|||
cfg.fixed_function.num_comps = desc->nr_channels;
|
||||
cfg.fixed_function.rt = rt;
|
||||
|
||||
#if PAN_ARCH < 9
|
||||
nir_alu_type T = pan_unpacked_type_for_format(desc);
|
||||
|
||||
if (force_size)
|
||||
T = nir_alu_type_get_base_type(T) | force_size;
|
||||
|
||||
switch (T) {
|
||||
case nir_type_float16:
|
||||
cfg.fixed_function.conversion.register_format =
|
||||
MALI_REGISTER_FILE_FORMAT_F16;
|
||||
break;
|
||||
case nir_type_float32:
|
||||
cfg.fixed_function.conversion.register_format =
|
||||
MALI_REGISTER_FILE_FORMAT_F32;
|
||||
break;
|
||||
case nir_type_int8:
|
||||
case nir_type_int16:
|
||||
cfg.fixed_function.conversion.register_format =
|
||||
MALI_REGISTER_FILE_FORMAT_I16;
|
||||
break;
|
||||
case nir_type_int32:
|
||||
cfg.fixed_function.conversion.register_format =
|
||||
MALI_REGISTER_FILE_FORMAT_I32;
|
||||
break;
|
||||
case nir_type_uint8:
|
||||
case nir_type_uint16:
|
||||
cfg.fixed_function.conversion.register_format =
|
||||
MALI_REGISTER_FILE_FORMAT_U16;
|
||||
break;
|
||||
case nir_type_uint32:
|
||||
cfg.fixed_function.conversion.register_format =
|
||||
MALI_REGISTER_FILE_FORMAT_U32;
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE("Invalid format");
|
||||
}
|
||||
cfg.fixed_function.conversion.register_format = get_register_format(T);
|
||||
#endif
|
||||
|
||||
cfg.fixed_function.conversion.memory_format =
|
||||
GENX(pan_dithered_format_from_pipe_format)(fmt, dithered);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue