mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
r300: bias presubtract fix
We need to double check that the source is indeed constant before looking at the constant type. Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com> Fixes:0508db9155Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29893> (cherry picked from commit1cad339409)
This commit is contained in:
parent
6fca3cd058
commit
34b1102390
2 changed files with 5 additions and 2 deletions
|
|
@ -924,7 +924,7 @@
|
|||
"description": "r300: bias presubtract fix",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "0508db91556242c57029ad538613c2b1ee1969ef",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -627,7 +627,10 @@ static int peephole_mad_presub_bias(
|
|||
if (rc_inline_to_float(src1_reg.Index) != 2.0f)
|
||||
return 0;
|
||||
} else {
|
||||
struct rc_constant *constant = &c->Program.Constants.Constants[src1_reg.Index];
|
||||
if (src1_reg.File != RC_FILE_CONSTANT)
|
||||
return 0;
|
||||
|
||||
struct rc_constant *constant = &c->Program.Constants.Constants[src1_reg.Index];
|
||||
if (constant->Type != RC_CONSTANT_IMMEDIATE)
|
||||
return 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue