mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
pan: fix a bifrost disassembly assert failure
We were overflowing an array during bifrost disassembly. This was only a problem if the user explicitly set an environment variable, so unlikely to occur in casual use, and also only could be triggered in very specific, dense code. But we still should get this right! The specific CTS test that caused the assert is: 'dEQP-VK.graphicsfuzz.stable-quicksort-for-loop-with-injection' with environment variable `BIFROST_MESA_DEBUG=shaders`. One of the shaders has a clause with 6 constants (the maximum) and this overflowed the array because we assume we always have an extra slot (used for modifier processing). Cc: mesa-stable Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38501>
This commit is contained in:
parent
7a3bfd1f79
commit
65ba14519e
1 changed files with 5 additions and 2 deletions
|
|
@ -619,10 +619,13 @@ enum bi_constmod {
|
|||
|
||||
struct bi_constants {
|
||||
/* Raw constant values */
|
||||
uint64_t raw[6];
|
||||
/* There are at most 6 constants per clause, but internally
|
||||
* we can use an extra slot for modifiers, so give room for 7
|
||||
*/
|
||||
uint64_t raw[7];
|
||||
|
||||
/* Associated modifier derived from M values */
|
||||
enum bi_constmod mods[6];
|
||||
enum bi_constmod mods[7];
|
||||
};
|
||||
|
||||
/* FAU selectors for constants are out-of-order, construct the top bits
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue