mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 05:48:18 +02:00
nvk/mme: Add missing nullcheck in nvk_mme_test_state_state
Needed for some FSR macro changes I want to test.
Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 7d6cc15ab8 ("nvk/mme: Add a unit test framework for driver macros")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40407>
This commit is contained in:
parent
73faef7bd3
commit
32895657b4
1 changed files with 5 additions and 3 deletions
|
|
@ -80,9 +80,11 @@ nvk_mme_test_state_state(void *_ts, uint16_t addr)
|
|||
/* First, look backwards through the expected data that we've already
|
||||
* written. This ensures that mthd() impacts state().
|
||||
*/
|
||||
for (int32_t i = ts->ei - 1; i >= 0; i--) {
|
||||
if (ts->test->expected[i].mthd == addr)
|
||||
return ts->test->expected[i].data;
|
||||
if (ts->test->expected != NULL) {
|
||||
for (int32_t i = ts->ei - 1; i >= 0; i--) {
|
||||
if (ts->test->expected[i].mthd == addr)
|
||||
return ts->test->expected[i].data;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now look at init. We assume the init data is unique */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue