r600/sfn: add emit if start cayman support
authorDave Airlie <airlied@redhat.com>
Mon, 18 May 2020 06:40:55 +0000 (16:40 +1000)
committerMarge Bot <eric+marge@anholt.net>
Mon, 18 May 2020 21:56:29 +0000 (21:56 +0000)
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5084>

src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp

index 6bb6486eb923500e15053ea6a9cc6c19ea0fd8b6..6b5da430622e7368683544c00aabcc763e2080ab 100644 (file)
@@ -485,11 +485,11 @@ bool AssemblyFromShaderLegacyImpl::emit_export(const ExportInstruction & exi)
 
 bool AssemblyFromShaderLegacyImpl::emit_if_start(const IfInstruction & if_instr)
 {
-   assert(m_bc->chip_class == EVERGREEN);
-
        bool needs_workaround = false;
    int elems = m_callstack.push(FC_PUSH_VPM);
 
+   if (m_bc->chip_class == CAYMAN && m_bc->stack.loop > 1)
+      needs_workaround = true;
    if (m_bc->family != CHIP_HEMLOCK &&
        m_bc->family != CHIP_CYPRESS &&
        m_bc->family != CHIP_JUNIPER) {