mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 16:40:13 +01:00
i965/fs: Fix return value of fs_inst::regs_read() for BAD_FILE.
Typically BAD_FILE sources are used to mark a source as not present what implies that no registers are read. This will become much more frequent with logical send opcodes which have a large number of sources, many of them optionally used and marked as BAD_FILE when they aren't applicable. It will prove to be useful to be able to rely on the value of regs_read() regardless of whether a source is present or not. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
5a5607a16c
commit
86ae788bae
1 changed files with 1 additions and 0 deletions
|
|
@ -727,6 +727,7 @@ fs_inst::regs_read(int arg) const
|
|||
|
||||
switch (src[arg].file) {
|
||||
case BAD_FILE:
|
||||
return 0;
|
||||
case UNIFORM:
|
||||
case IMM:
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue