i965g: hook up some missing vertex shader code
authorKeith Whitwell <keithw@vmware.com>
Wed, 4 Nov 2009 23:18:07 +0000 (23:18 +0000)
committerKeith Whitwell <keithw@vmware.com>
Wed, 4 Nov 2009 23:18:07 +0000 (23:18 +0000)
src/gallium/drivers/i965/brw_pipe_shader.c
src/gallium/drivers/i965/brw_vs_emit.c

index 8e10edb459306bec11f0f358b56c21edeae30dc2..2833f2bce02a7b542f5852209e142f4b88f70424 100644 (file)
@@ -128,12 +128,19 @@ static void *brw_create_vs_state( struct pipe_context *pipe,
    vs->id = brw->program_id++;
    //vs->has_flow_control = brw_wm_has_flow_control(vs);
 
-   /* Tell the draw module about this shader:
-    */
+   vs->tokens = tgsi_dup_tokens(shader->tokens);
+   if (vs->tokens == NULL)
+      goto fail;
+
+   tgsi_scan_shader(vs->tokens, &vs->info);
    
    /* Done:
     */
    return (void *)vs;
+
+fail:
+   FREE(vs);
+   return NULL;
 }
 
 
index bcc5c5f71300635cf47cbd507298702b02059f75..95e2b8e2cb6f47f0d88826a169a0abb1a41237a6 100644 (file)
@@ -90,7 +90,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
       /* XXX: immediates can go elsewhere if necessary:
        */
       assert(c->vp->info.file_max[TGSI_FILE_IMMEDIATE] +
-            c->vp->info.file_max[TGSI_FILE_TEMPORARY] + 21 > BRW_MAX_GRF);
+            c->vp->info.file_max[TGSI_FILE_TEMPORARY] + 21 <= BRW_MAX_GRF);
 
       c->vp->use_const_buffer = GL_FALSE;
    }