summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_context.h
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2013-03-08 22:29:34 +0100
committerRoland Scheidegger <sroland@vmware.com>2013-03-11 17:07:51 +0100
commitef17cc9cb697a7146cf2a3dba2eb0f6a968918cc (patch)
treef409b9ec2c9fd536fc42f063590f4a6704033378 /src/gallium/drivers/softpipe/sp_context.h
parentf33c744fb9b4bb711335412018ecc108a4b38355 (diff)
downloadexternal_mesa3d-ef17cc9cb697a7146cf2a3dba2eb0f6a968918cc.zip
external_mesa3d-ef17cc9cb697a7146cf2a3dba2eb0f6a968918cc.tar.gz
external_mesa3d-ef17cc9cb697a7146cf2a3dba2eb0f6a968918cc.tar.bz2
softpipe: don't use samplers with prebaked sampler and sampler_view state
This is needed for handling the dx10-style sample opcodes. This also simplifies the logic by getting rid of sampler variants completely (sampler_views though OTOH have sort of variants because some of their state is different depending on the shader stage they are bound to). No significant performance difference (openarena run: 840 frames in 459.8 seconds vs. 840 frames in 460.5 seconds). v2: fix reference counting bug spotted by Jose. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.h')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index dcd29be..ed38bac 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -80,7 +80,7 @@ struct softpipe_context {
struct pipe_framebuffer_state framebuffer;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
- struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
+ struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_SAMPLER_VIEWS];
struct pipe_viewport_state viewport;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
@@ -184,8 +184,10 @@ struct softpipe_context {
* Texture caches for vertex, fragment, geometry stages.
* Don't use PIPE_SHADER_TYPES here to avoid allocating unused memory
* for compute shaders.
+ * XXX wouldn't it make more sense for the tile cache to just be part
+ * of sp_sampler_view?
*/
- struct softpipe_tex_tile_cache *tex_cache[PIPE_SHADER_GEOMETRY+1][PIPE_MAX_SAMPLERS];
+ struct softpipe_tex_tile_cache *tex_cache[PIPE_SHADER_GEOMETRY+1][PIPE_MAX_SHADER_SAMPLER_VIEWS];
unsigned dump_fs : 1;
unsigned dump_gs : 1;
@@ -199,8 +201,6 @@ softpipe_context( struct pipe_context *pipe )
return (struct softpipe_context *)pipe;
}
-void
-softpipe_reset_sampler_variants(struct softpipe_context *softpipe);
struct pipe_context *
softpipe_create_context( struct pipe_screen *, void *priv );