summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-10-06 09:35:07 +1000
committerDave Airlie <[email protected]>2010-10-13 09:30:04 +1000
commitef8bb7ada98f1ddc8e2554a7336af5d669cb1290 (patch)
treebbd81789000fa2c33ef5d4c2ccbd26a8646f40ff /src/mesa/state_tracker/st_texture.h
parent06642c61757b459f4f9283b721ad93b6f15386a7 (diff)
st/mesa: use shader stencil export to accelerate shader drawpixels.
If the pipe driver has shader stencil export we can accelerate DrawPixels using it. It tries to pick an S8 texture and works its way to X24S8 and S8X24 if that isn't supported.
Diffstat (limited to 'src/mesa/state_tracker/st_texture.h')
-rw-r--r--src/mesa/state_tracker/st_texture.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index ed5d271597c..c78901c0360 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -134,6 +134,20 @@ st_create_texture_sampler_view(struct pipe_context *pipe,
static INLINE struct pipe_sampler_view *
+st_create_texture_sampler_view_format(struct pipe_context *pipe,
+ struct pipe_resource *texture,
+ enum pipe_format format)
+{
+ struct pipe_sampler_view templ;
+
+ u_sampler_view_default_template(&templ,
+ texture,
+ format);
+
+ return pipe->create_sampler_view(pipe, texture, &templ);
+}
+
+static INLINE struct pipe_sampler_view *
st_get_texture_sampler_view(struct st_texture_object *stObj,
struct pipe_context *pipe)