summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/v3d/v3d_context.c22
-rw-r--r--src/gallium/drivers/v3d/v3d_context.h3
-rw-r--r--src/gallium/drivers/v3d/v3dx_state.c22
3 files changed, 25 insertions, 22 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c
index 185bdc687b4..2b39b74a272 100644
--- a/src/gallium/drivers/v3d/v3d_context.c
+++ b/src/gallium/drivers/v3d/v3d_context.c
@@ -194,6 +194,28 @@ v3d_get_real_line_width(struct v3d_context *v3d)
return width;
}
+void
+v3d_flag_dirty_sampler_state(struct v3d_context *v3d,
+ enum pipe_shader_type shader)
+{
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ v3d->dirty |= VC5_DIRTY_VERTTEX;
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ v3d->dirty |= VC5_DIRTY_GEOMTEX;
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ v3d->dirty |= VC5_DIRTY_FRAGTEX;
+ break;
+ case PIPE_SHADER_COMPUTE:
+ v3d->dirty |= VC5_DIRTY_COMPTEX;
+ break;
+ default:
+ unreachable("Unsupported shader stage");
+ }
+}
+
static void
v3d_context_destroy(struct pipe_context *pctx)
{
diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h
index 74df773ca9a..baf58d924ea 100644
--- a/src/gallium/drivers/v3d/v3d_context.h
+++ b/src/gallium/drivers/v3d/v3d_context.h
@@ -703,6 +703,9 @@ bool v3d_line_smoothing_enabled(struct v3d_context *v3d);
float v3d_get_real_line_width(struct v3d_context *v3d);
+void v3d_flag_dirty_sampler_state(struct v3d_context *v3d,
+ enum pipe_shader_type shader);
+
#ifdef v3dX
# include "v3dx_context.h"
#else
diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c
index ee41b9fa75e..ee4f7d8ce59 100644
--- a/src/gallium/drivers/v3d/v3dx_state.c
+++ b/src/gallium/drivers/v3d/v3dx_state.c
@@ -771,28 +771,6 @@ v3d_create_sampler_state(struct pipe_context *pctx,
}
static void
-v3d_flag_dirty_sampler_state(struct v3d_context *v3d,
- enum pipe_shader_type shader)
-{
- switch (shader) {
- case PIPE_SHADER_VERTEX:
- v3d->dirty |= VC5_DIRTY_VERTTEX;
- break;
- case PIPE_SHADER_GEOMETRY:
- v3d->dirty |= VC5_DIRTY_GEOMTEX;
- break;
- case PIPE_SHADER_FRAGMENT:
- v3d->dirty |= VC5_DIRTY_FRAGTEX;
- break;
- case PIPE_SHADER_COMPUTE:
- v3d->dirty |= VC5_DIRTY_COMPTEX;
- break;
- default:
- unreachable("Unsupported shader stage");
- }
-}
-
-static void
v3d_sampler_states_bind(struct pipe_context *pctx,
enum pipe_shader_type shader, unsigned start,
unsigned nr, void **hwcso)