mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 14:10:09 +01:00
Groups containing fields smaller than a DWord were not being decoded
correctly. For example:
<group count="32" start="32" size="4">
<field name="Vertex Element Enables" start="0" end="3" type="uint"/>
</group>
gen_field_iterator_next would properly walk over each element of the
array, incrementing group_iter, and calling iter_group_offset_bits()
to advance to the proper DWord. However, the code to print the actual
values only considered iter->field->start/end, which are 0 and 3 in the
above example. So it would always fetch bits 3:0 of the current DWord
when printing values, instead of advancing to each element of the array,
printing bits 0-3, 4-7, 8-11, and so on.
To fix this, we add new iter->start/end tracking, which properly
advances for each instance of a group's field.
Caught by Matt Turner while working on 3DSTATE_VF_COMPONENT_PACKING,
with a patch to convert it to use an array of bitfields (the example
above).
This also fixes the decoding of 3DSTATE_SBE's "Attribute Active
Component Format" fields.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
||
|---|---|---|
| .. | ||
| blorp | ||
| common | ||
| compiler | ||
| genxml | ||
| isl | ||
| tools | ||
| vulkan | ||
| Android.blorp.mk | ||
| Android.common.mk | ||
| Android.compiler.mk | ||
| Android.genxml.mk | ||
| Android.isl.mk | ||
| Android.mk | ||
| Android.vulkan.mk | ||
| Makefile.am | ||
| Makefile.blorp.am | ||
| Makefile.common.am | ||
| Makefile.compiler.am | ||
| Makefile.genxml.am | ||
| Makefile.isl.am | ||
| Makefile.sources | ||
| Makefile.tools.am | ||
| Makefile.vulkan.am | ||
| meson.build | ||