summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_context.h2
-rw-r--r--src/gallium/drivers/svga/svga_state_fs.c13
-rw-r--r--src/gallium/drivers/svga/svga_state_vs.c13
3 files changed, 10 insertions, 18 deletions
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index eb666c2616..32e9304f81 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -268,8 +268,6 @@ struct svga_hw_draw_state
unsigned ts[16][TS_MAX];
float cb[PIPE_SHADER_TYPES][CB_MAX][4];
- unsigned shader_id[PIPE_SHADER_TYPES];
-
struct svga_shader_result *fs;
struct svga_shader_result *vs;
struct svga_hw_view_state views[PIPE_MAX_SAMPLERS];
diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c
index 1902b0106b..272d1dd14e 100644
--- a/src/gallium/drivers/svga/svga_state_fs.c
+++ b/src/gallium/drivers/svga/svga_state_fs.c
@@ -268,16 +268,13 @@ static int emit_hw_fs( struct svga_context *svga,
assert(id != SVGA3D_INVALID_ID);
if (result != svga->state.hw_draw.fs) {
- if (id != svga->state.hw_draw.shader_id[PIPE_SHADER_FRAGMENT]) {
- ret = SVGA3D_SetShader(svga->swc,
- SVGA3D_SHADERTYPE_PS,
- id );
- if (ret)
- return ret;
- }
+ ret = SVGA3D_SetShader(svga->swc,
+ SVGA3D_SHADERTYPE_PS,
+ id );
+ if (ret)
+ return ret;
svga->dirty |= SVGA_NEW_FS_RESULT;
- svga->state.hw_draw.shader_id[PIPE_SHADER_FRAGMENT] = id;
svga->state.hw_draw.fs = result;
}
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c
index 6cf51434d7..db30f2735f 100644
--- a/src/gallium/drivers/svga/svga_state_vs.c
+++ b/src/gallium/drivers/svga/svga_state_vs.c
@@ -149,16 +149,13 @@ static int emit_hw_vs( struct svga_context *svga,
}
if (result != svga->state.hw_draw.vs) {
- if (id != svga->state.hw_draw.shader_id[PIPE_SHADER_VERTEX]) {
- ret = SVGA3D_SetShader(svga->swc,
- SVGA3D_SHADERTYPE_VS,
- id );
- if (ret)
- return ret;
- }
+ ret = SVGA3D_SetShader(svga->swc,
+ SVGA3D_SHADERTYPE_VS,
+ id );
+ if (ret)
+ return ret;
svga->dirty |= SVGA_NEW_VS_RESULT;
- svga->state.hw_draw.shader_id[PIPE_SHADER_VERTEX] = id;
svga->state.hw_draw.vs = result;
}