mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 15:10:37 +01:00
i965/fs: Add a new fs_inst::regs_written function.
Certain instructions write more than one register. Texturing, for
example, returns 4 registers. (We set rlen to 4 even for TXS and float
shadow sampling.) Some math functions return 2. Most return 1.
The next commit introduces a use of this function.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 8ab02b5118)
This commit is contained in:
parent
ff1d945032
commit
740123fff7
1 changed files with 12 additions and 0 deletions
|
|
@ -286,6 +286,18 @@ public:
|
|||
offset == inst->offset);
|
||||
}
|
||||
|
||||
int regs_written()
|
||||
{
|
||||
if (is_tex())
|
||||
return 4;
|
||||
|
||||
/* The SINCOS and INT_DIV_QUOTIENT_AND_REMAINDER math functions return 2,
|
||||
* but we don't currently use them...nor do we have an opcode for them.
|
||||
*/
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool is_tex()
|
||||
{
|
||||
return (opcode == SHADER_OPCODE_TEX ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue