svga: Add somewhat sensible fallback and silence warning
authorJakob Bornecrantz <jakob@vmware.com>
Mon, 9 Jan 2012 12:50:29 +0000 (13:50 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Tue, 10 Jan 2012 15:59:45 +0000 (16:59 +0100)
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by Brian Paul <brianp@vmware.com>

src/gallium/drivers/svga/svga_tgsi_decl_sm30.c

index 0c5cb90939ce1c080029980d675f82f282c7ce81..a4e80b5571d77b7495972460affe571956c1a051 100644 (file)
@@ -318,8 +318,6 @@ ps30_output(struct svga_shader_emitter *emit,
             struct tgsi_declaration_semantic semantic,
             unsigned idx)
 {
-   SVGA3dShaderDestToken reg;
-
    switch (semantic.Name) {
    case TGSI_SEMANTIC_COLOR:
       if (emit->unit == PIPE_SHADER_FRAGMENT &&
@@ -345,7 +343,8 @@ ps30_output(struct svga_shader_emitter *emit,
       break;
    default:
       assert(0);
-      reg = dst_register( SVGA3DREG_COLOROUT, 0 );
+      /* A wild stab in the dark. */
+      emit->output_map[idx] = dst_register( SVGA3DREG_COLOROUT, 0 );
       break;
    }