summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_pipe_vs.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-01-31 17:23:11 -0700
committerBrian Paul <[email protected]>2014-02-03 12:40:13 -0700
commit4686f610b18a04bc6213ccadf7be1176bbda3e34 (patch)
treef3465d5134ec8c0d4f029f87d894f3ce2d6dff99 /src/gallium/drivers/svga/svga_pipe_vs.c
parent9bace99d77642f8fbd46b1f0be025ad758f83f5e (diff)
svga: refactor some shader code
Put common code in new svga_shader.c file. Considate separate vertex/ fragment shader ID generation. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_vs.c')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_vs.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_vs.c b/src/gallium/drivers/svga/svga_pipe_vs.c
index fd132ebf280..c3ac663b4a2 100644
--- a/src/gallium/drivers/svga/svga_pipe_vs.c
+++ b/src/gallium/drivers/svga/svga_pipe_vs.c
@@ -36,6 +36,7 @@
#include "svga_hw_reg.h"
#include "svga_cmd.h"
#include "svga_debug.h"
+#include "svga_shader.h"
/**
@@ -158,17 +159,8 @@ svga_delete_vs_state(struct pipe_context *pipe, void *shader)
for (variant = vs->base.variants; variant; variant = tmp) {
tmp = variant->next;
- ret = SVGA3D_DestroyShader(svga->swc, variant->id, SVGA3D_SHADERTYPE_VS);
- if (ret != PIPE_OK) {
- svga_context_flush(svga, NULL);
- ret = SVGA3D_DestroyShader(svga->swc, variant->id,
- SVGA3D_SHADERTYPE_VS);
- assert(ret == PIPE_OK);
- }
-
- util_bitmask_clear(svga->vs_bm, variant->id);
-
- svga_destroy_shader_variant(variant);
+ ret = svga_destroy_shader_variant(svga, SVGA3D_SHADERTYPE_VS, variant);
+ (void) ret; /* PIPE_ERROR_ not handled yet */
/*
* Remove stale references to this variant to ensure a new variant on the