mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
pan/bi: Use texture index instead of sampler for message preloading
The VAR_TEX definition in ISA.xml only has a field for texture_index,
so trying to read sampler_index will return zero; read from
texture_index instead, and rename other fields for consistency.
The texture and sampler indices must be equal for VAR_TEX to be used,
so either name could be used for the field.
Fixes the wrong textures being used in Thief.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6219
Fixes: eb1479bda2 ("pan/bi: Support message preloading")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16255>
This commit is contained in:
parent
4a2ff9eb86
commit
2864094f69
4 changed files with 5 additions and 5 deletions
|
|
@ -112,7 +112,7 @@ bi_opt_message_preload(bi_context *ctx)
|
|||
.enabled = true,
|
||||
.texture = true,
|
||||
.varying_index = I->varying_index,
|
||||
.sampler_index = I->sampler_index,
|
||||
.texture_index = I->texture_index,
|
||||
.fp16 = (I->op == BI_OPCODE_VAR_TEX_F16),
|
||||
.skip = I->skip,
|
||||
.zero_lod = I->lod_mode
|
||||
|
|
|
|||
|
|
@ -854,7 +854,7 @@
|
|||
|
||||
<struct name="VAR_TEX Preload" size="1" no-direct-packing="true">
|
||||
<field name="Varying Index" size="3" start="4" type="uint"/>
|
||||
<field name="Sampler Index" size="2" start="7" type="uint"/>
|
||||
<field name="Texture Index" size="2" start="7" type="uint"/>
|
||||
<field name="Register Format" size="2" start="9" type="Message Preload Register Format"/>
|
||||
<field name="Skip" size="1" start="14" type="bool"/>
|
||||
<field name="Zero LOD" size="1" start="15" type="bool"/>
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ pan_pack_message_preload(struct MALI_MESSAGE_PRELOAD *cfg,
|
|||
if (msg->enabled && msg->texture) {
|
||||
cfg->type = MALI_MESSAGE_TYPE_VAR_TEX;
|
||||
cfg->var_tex.varying_index = msg->varying_index;
|
||||
cfg->var_tex.sampler_index = msg->sampler_index;
|
||||
cfg->var_tex.texture_index = msg->texture_index;
|
||||
cfg->var_tex.register_format = regfmt;
|
||||
cfg->var_tex.skip = msg->skip;
|
||||
cfg->var_tex.zero_lod = msg->zero_lod;
|
||||
|
|
|
|||
|
|
@ -231,11 +231,11 @@ struct bifrost_message_preload {
|
|||
unsigned num_components;
|
||||
|
||||
/* If texture is set, performs a texture instruction according to
|
||||
* sampler_index, skip, and zero_lod. If texture is unset, only the
|
||||
* texture_index, skip, and zero_lod. If texture is unset, only the
|
||||
* varying load is performed.
|
||||
*/
|
||||
bool texture, skip, zero_lod;
|
||||
unsigned sampler_index;
|
||||
unsigned texture_index;
|
||||
};
|
||||
|
||||
struct bifrost_shader_info {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue