aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-09-12 15:45:52 -0600
committerBrian Paul <[email protected]>2013-10-03 14:05:28 -0600
commit27c054edf0ae92c8c498830e7c7510fa94f5dcfd (patch)
tree15d0424ebf93a70152aeb5c9b472da7b854c3e15 /src
parent1e8d3eb08d6dd9660e2bf86119c36a941ef74d94 (diff)
radeon: don't use old bind_vertex/fragment_sampler_states() hooks
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_state.c21
-rw-r--r--src/gallium/drivers/r600/evergreen_compute.c18
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c18
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c2
4 files changed, 6 insertions, 53 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index e10ea164f9f..4aebbea83d8 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -1522,25 +1522,6 @@ static void*
return (void*)sampler;
}
-static void r300_bind_fragment_sampler_states(struct pipe_context* pipe,
- unsigned count,
- void** states)
-{
- struct r300_context* r300 = r300_context(pipe);
- struct r300_textures_state* state =
- (struct r300_textures_state*)r300->textures_state.state;
- unsigned tex_units = r300->screen->caps.num_tex_units;
-
- if (count > tex_units) {
- return;
- }
-
- memcpy(state->sampler_states, states, sizeof(void*) * count);
- state->sampler_state_count = count;
-
- r300_mark_atom_dirty(r300, &r300->textures_state);
-}
-
static void r300_bind_sampler_states(struct pipe_context* pipe,
unsigned shader,
unsigned start, unsigned count,
@@ -2183,8 +2164,6 @@ void r300_init_state_functions(struct r300_context* r300)
r300->context.create_sampler_state = r300_create_sampler_state;
r300->context.bind_sampler_states = r300_bind_sampler_states;
- r300->context.bind_fragment_sampler_states = r300_bind_fragment_sampler_states;
- r300->context.bind_vertex_sampler_states = r300_lacks_vertex_textures;
r300->context.delete_sampler_state = r300_delete_sampler_state;
r300->context.set_fragment_sampler_views = r300_set_fragment_sampler_views;
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index 30692369694..e36c3a8d831 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -615,22 +615,6 @@ static void evergreen_set_cs_sampler_view(struct pipe_context *ctx_,
}
}
-static void evergreen_bind_compute_sampler_states(
- struct pipe_context *ctx_,
- unsigned start_slot,
- unsigned num_samplers,
- void **samplers_)
-{
- struct compute_sampler_state ** samplers =
- (struct compute_sampler_state **)samplers_;
-
- for (int i = 0; i < num_samplers; i++) {
- if (samplers[i]) {
- /* XXX: Implement */
- assert(!"Compute samplers not implemented.");
- }
- }
-}
static void evergreen_set_global_binding(
struct pipe_context *ctx_, unsigned first, unsigned n,
@@ -865,7 +849,6 @@ void evergreen_init_compute_state_functions(struct r600_context *ctx)
// ctx->context.create_sampler_view = evergreen_compute_create_sampler_view;
ctx->b.b.set_compute_resources = evergreen_set_compute_resources;
ctx->b.b.set_compute_sampler_views = evergreen_set_cs_sampler_view;
- ctx->b.b.bind_compute_sampler_states = evergreen_bind_compute_sampler_states;
ctx->b.b.set_global_binding = evergreen_set_global_binding;
ctx->b.b.launch_grid = evergreen_launch_grid;
@@ -874,7 +857,6 @@ void evergreen_init_compute_state_functions(struct r600_context *ctx)
ctx->cs_vertex_buffer_state.dirty_mask = 0x2;
}
-
struct pipe_resource *r600_compute_global_buffer_create(
struct pipe_screen *screen,
const struct pipe_resource *templ)
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index b2688489bf9..f91aa27f0f9 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -394,6 +394,12 @@ static void r600_bind_sampler_states(struct pipe_context *pipe,
assert(start == 0); /* XXX fix below */
+ if (shader != PIPE_SHADER_VERTEX &&
+ shader != PIPE_SHADER_FRAGMENT) {
+ assert(!"Only vertex/fragment sampler are implemented.");
+ return;
+ }
+
for (i = 0; i < count; i++) {
struct r600_pipe_sampler_state *rstate = rstates[i];
@@ -437,16 +443,6 @@ static void r600_bind_sampler_states(struct pipe_context *pipe,
}
}
-static void r600_bind_vs_sampler_states(struct pipe_context *ctx, unsigned count, void **states)
-{
- r600_bind_sampler_states(ctx, PIPE_SHADER_VERTEX, 0, count, states);
-}
-
-static void r600_bind_ps_sampler_states(struct pipe_context *ctx, unsigned count, void **states)
-{
- r600_bind_sampler_states(ctx, PIPE_SHADER_FRAGMENT, 0, count, states);
-}
-
static void r600_delete_sampler_state(struct pipe_context *ctx, void *state)
{
free(state);
@@ -2086,11 +2082,9 @@ void r600_init_common_state_functions(struct r600_context *rctx)
rctx->b.b.bind_blend_state = r600_bind_blend_state;
rctx->b.b.bind_depth_stencil_alpha_state = r600_bind_dsa_state;
rctx->b.b.bind_sampler_states = r600_bind_sampler_states;
- rctx->b.b.bind_fragment_sampler_states = r600_bind_ps_sampler_states;
rctx->b.b.bind_fs_state = r600_bind_ps_state;
rctx->b.b.bind_rasterizer_state = r600_bind_rs_state;
rctx->b.b.bind_vertex_elements_state = r600_bind_vertex_elements;
- rctx->b.b.bind_vertex_sampler_states = r600_bind_vs_sampler_states;
rctx->b.b.bind_vs_state = r600_bind_vs_state;
rctx->b.b.delete_blend_state = r600_delete_blend_state;
rctx->b.b.delete_depth_stencil_alpha_state = r600_delete_dsa_state;
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 2079ffca6bf..d1b8f6e3df2 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3031,8 +3031,6 @@ void si_init_state_functions(struct r600_context *rctx)
rctx->b.b.create_sampler_state = si_create_sampler_state;
rctx->b.b.bind_sampler_states = si_bind_sampler_states;
- rctx->b.b.bind_vertex_sampler_states = si_bind_vs_sampler_states;
- rctx->b.b.bind_fragment_sampler_states = si_bind_ps_sampler_states;
rctx->b.b.delete_sampler_state = si_delete_sampler_state;
rctx->b.b.create_sampler_view = si_create_sampler_view;