svga: Fix banded DMA upload unmap
[mesa.git] / src / gallium / drivers / svga / svga_tgsi.c
index 7cbd5166900e70fbe5911b1f42b70688ae72a1e3..5c3afee38453e8cbcf34cb7b3c4b1d38152d415e 100644 (file)
@@ -168,7 +168,8 @@ svga_shader_emit_header(struct svga_shader_emitter *emit)
 struct svga_shader_variant *
 svga_tgsi_vgpu9_translate(struct svga_context *svga,
                           const struct svga_shader *shader,
-                          const struct svga_compile_key *key, unsigned unit)
+                          const struct svga_compile_key *key,
+                          enum pipe_shader_type unit)
 {
    struct svga_shader_variant *variant = NULL;
    struct svga_shader_emitter emit;
@@ -209,6 +210,12 @@ svga_tgsi_vgpu9_translate(struct svga_context *svga,
       goto fail;
    }
 
+   if (emit.info.indirect_files & (1 << TGSI_FILE_TEMPORARY)) {
+      debug_printf(
+         "svga: indirect indexing of temporary registers is not supported.\n");
+      goto fail;
+   }
+
    emit.in_main_func = TRUE;
 
    if (!svga_shader_emit_header(&emit)) {
@@ -221,7 +228,7 @@ svga_tgsi_vgpu9_translate(struct svga_context *svga,
       goto fail;
    }
 
-   variant = svga_new_shader_variant(svga);
+   variant = svga_new_shader_variant(svga, unit);
    if (!variant)
       goto fail;