Module: Mesa
Branch: main
Commit: 129de7ee606540c34cd6addd682541d9ee8dcd63
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=129de7ee606540c34cd6addd682541d9ee8dcd63

Author: Gert Wollny <[email protected]>
Date:   Sun May  9 19:46:24 2021 +0200

r600/sfn: Use valid pixel mode only in fragment shaders

The doc says that it should only be set in the FS.

Signed-off-by: Gert Wollny <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10608>

---

 src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp 
b/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
index e47a46b889c..9a4a4f5fbe5 100644
--- a/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
@@ -757,7 +757,7 @@ bool AssemblyFromShaderLegacyImpl::visit(const 
FetchInstruction& fetch_instr)
       }
    }
 
-   m_bc->cf_last->vpm = fetch_instr.use_vpm();
+   m_bc->cf_last->vpm = (m_bc->type == PIPE_SHADER_FRAGMENT) && 
fetch_instr.use_vpm();
    m_bc->cf_last->barrier = 1;
 
    return true;
@@ -858,7 +858,7 @@ bool AssemblyFromShaderLegacyImpl::visit(const GDSInstr& 
instr)
    int r = r600_bytecode_add_gds(m_bc, &gds);
    if (r)
       return false;
-   m_bc->cf_last->vpm = 1;
+   m_bc->cf_last->vpm = PIPE_SHADER_FRAGMENT == m_bc->type;
    m_bc->cf_last->barrier = 1;
    return true;
 }
@@ -1041,7 +1041,7 @@ bool AssemblyFromShaderLegacyImpl::visit(const 
RatInstruction& instr)
              instr.data_swz(2) == PIPE_SWIZZLE_MAX) ;
    }
 
-   cf->vpm = 1;
+   cf->vpm = m_bc->type == PIPE_SHADER_FRAGMENT;
    cf->barrier = 1;
    cf->mark = instr.need_ack();
    cf->output.elem_size = instr.elm_size();

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to