Skip to content
Snippets Groups Projects
Commit 6947016b authored by Emma Anholt's avatar Emma Anholt
Browse files

nir: Add lowering for fround_even on r300.


When we put NIR in the compiler stack for r300, indirect addressing broke
for gallium nine.  DX's array indirects round the float value, so the DX
shader gets mapped to a TGSI "ARR ADDR[0] src.x" instruction.  Translating
that to NIR maps to r0[f2i32(fround(src.x))].  While we might hope that in
translation back using nir-to-tgsi after optimization we would recognize
the construct and emit ARR again, that's going to be error prone (think
"what if src.x is in a NIR register?") so we need a fallback plan.  r300
will be able to handle this lowering, so get it in place first to fix the
regression.

Fixes: #6297
Fixes: 7d2ea9b0 ("r300: Request NIR shaders from mesa/st and use NIR-to-TGSI.")
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!15870>
parent c60fea8c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment