summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_tex_sample.h
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-07-27 12:44:58 +0100
committerKeith Whitwell <keithw@vmware.com>2009-07-27 12:44:58 +0100
commit6142de393fe34ff0866f8489f1292eb473276f11 (patch)
tree57615973e618ecd7aac697e2553d08ab5ebb821d /src/gallium/drivers/softpipe/sp_tex_sample.h
parentc61145820556833dccd728eb6df3397bec7f70da (diff)
softpipe: example fast paths for simple samplers
All these fastpaths are examples of the types of things we'd code-generate in a more sophisticated version of softpipe.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tex_sample.h')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.h b/src/gallium/drivers/softpipe/sp_tex_sample.h
index 3c5beb560f..0650c7830b 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.h
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.h
@@ -39,6 +39,12 @@ struct sp_shader_sampler
{
struct tgsi_sampler base; /**< base class */
+ /* For sp_get_samples_2d_linear_POT:
+ */
+ unsigned xpot;
+ unsigned ypot;
+ unsigned level;
+
const struct pipe_texture *texture;
const struct pipe_sampler_state *sampler;
@@ -47,10 +53,10 @@ struct sp_shader_sampler
-static INLINE const struct sp_shader_sampler *
+static INLINE struct sp_shader_sampler *
sp_shader_sampler(const struct tgsi_sampler *sampler)
{
- return (const struct sp_shader_sampler *) sampler;
+ return (struct sp_shader_sampler *) sampler;
}