diff options
author | Marek Olšák <[email protected]> | 2011-09-02 07:35:48 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-09-10 08:53:29 +0200 |
commit | c4519c3aec37f5cb3db8fe7e8ead13ae04e792b5 (patch) | |
tree | 364ef162d7c0f89b9733cc684bce277b23e2079c /src/gallium/drivers/r600/r600_pipe.h | |
parent | 9edd0b5ddf406ef089edebd12999ff2a26774ca3 (diff) |
r600g: fix texture array filtering
This fixes piglit/fbo-generatemipmap-array.
It looks like SQ_TEX_SAMPLER_WORD0_0.TEX_ARRAY_OVERRIDE should be set
for array textures in order to disable filtering between slices,
which adds a dependency between sampler views and sampler states.
This patch reworks sampler state updates such that they are postponed until
draw time. TEX_ARRAY_OVERRIDE is updated according to bound sampler views.
This also consolidates setting the texture state between vertex and
pixel shaders.
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index a9d5ef529dc..c4952214364 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -143,9 +143,11 @@ struct r600_pipe_sampler_state { struct r600_textures_info { struct r600_pipe_sampler_view *views[NUM_TEX_UNITS]; + struct r600_pipe_sampler_state *samplers[NUM_TEX_UNITS]; unsigned n_views; - void *samplers[NUM_TEX_UNITS]; unsigned n_samplers; + bool samplers_dirty; + bool is_array_sampler[NUM_TEX_UNITS]; }; struct r600_fence { @@ -218,6 +220,7 @@ struct r600_pipe_context { unsigned alpha_ref; boolean alpha_ref_dirty; unsigned nr_cbufs; + struct r600_textures_info vs_samplers; struct r600_textures_info ps_samplers; struct r600_pipe_fences fences; @@ -292,6 +295,7 @@ int r600_find_vs_semantic_index(struct r600_shader *vs, struct r600_shader *ps, int id); /* r600_state.c */ +void r600_update_sampler_states(struct r600_pipe_context *rctx); void r600_init_state_functions(struct r600_pipe_context *rctx); void r600_init_config(struct r600_pipe_context *rctx); void r600_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader); |