[GPU] Reuse base+index*stride in vfetch_mini instead of reloading the index GPR

The wheel shader in 4D530910 does vfetch_full to r0 with the index from r0.x, and then vfetch_mini.
Thanks @Gliniak for the finding :3
Also small formatting cleanup in commented-out code.
This commit is contained in:
Triang3l
2022-01-09 14:58:38 +03:00
parent 600c14b3f0
commit d6188c5d7e
7 changed files with 103 additions and 66 deletions

View File

@@ -849,7 +849,7 @@ void DxbcShaderTranslator::StartTranslation() {
system_temp_aL_ = PushSystemTemp(0b1111);
system_temp_loop_count_ = PushSystemTemp(0b1111);
system_temp_grad_h_lod_ = PushSystemTemp(0b1111);
system_temp_grad_v_ = PushSystemTemp(0b0111);
system_temp_grad_v_vfetch_address_ = PushSystemTemp(0b1111);
// Zero general-purpose registers to prevent crashes when the game
// references them after only initializing them conditionally.
@@ -1039,7 +1039,7 @@ void DxbcShaderTranslator::CompleteShaderCode() {
// - system_temp_aL_.
// - system_temp_loop_count_.
// - system_temp_grad_h_lod_.
// - system_temp_grad_v_.
// - system_temp_grad_v_vfetch_address_.
PopSystemTemp(6);
// Write memexported data to the shared memory UAV.