mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 09:48:07 +02:00
r300: allow copy propagate of RC_FILE_NONE reads to TEX instructions
Texturing instructions can't read from constant sources, however this can work when the constant was transformed to constant swizzles and hence RC_FILE_NONE. Prevents a regression in single Unigine Tropics shader that uses constant (0.5,0.5) as a TEX coordinate in a next patch. We now convert to constant swizzles twice, first when translating from TGSI and than in constant folding. If we disable the first conversion rc_transform_tex will emit a mov from constant to temporary. With this patch, copy propagate will clean it up later. Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com> Reviewed-by: Filip Gawin <filip@gawin.net> Tested-by: Filip Gawin <filip@gawin.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20484>
This commit is contained in:
parent
d869f0f7ca
commit
7decc7efba
1 changed files with 1 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ static void copy_propagate_scan_read(void * data, struct rc_instruction * inst,
|
|||
*/
|
||||
if(reader_data->Writer->U.I.SrcReg[0].File != RC_FILE_TEMPORARY &&
|
||||
reader_data->Writer->U.I.SrcReg[0].File != RC_FILE_INPUT &&
|
||||
reader_data->Writer->U.I.SrcReg[0].File != RC_FILE_NONE &&
|
||||
(inst->U.I.Opcode == RC_OPCODE_TEX ||
|
||||
inst->U.I.Opcode == RC_OPCODE_TXB ||
|
||||
inst->U.I.Opcode == RC_OPCODE_TXP ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue