aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-09-17 18:41:30 -0600
committerBrian Paul <[email protected]>2010-09-17 18:45:13 -0600
commite22e3927b056806e9bbb089734132ad0bcb98df1 (patch)
tree54e1a8fcdec93e315f9c04afefadedd43cc7877d /src/gallium/auxiliary/draw/draw_context.h
parent49cb978aa46af0d86ab609013d7883c8105a6d1d (diff)
gallium: rework handling of sprite_coord_enable state
Implement the pipe_rasterizer_state::sprite_coord_enable field in the draw module (and softpipe) according to what's specified in the documentation. The draw module can now add any number of extra vertex attributes to a post-transformed vertex and generate texcoords for those attributes per sprite_coord_enable. Auto-generated texcoords for sprites only worked for one texcoord unit before. The frag shader gl_PointCoord input is now implemented like any other generic/texcoord attribute. The draw module now needs to be informed about fragment shaders since we need to look at the fragment shader's inputs to know which ones need auto-generated texcoords. Only softpipe has been updated so far.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index 4f0d30123a4..1f27cbf488a 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -46,6 +46,7 @@ struct draw_context;
struct draw_stage;
struct draw_vertex_shader;
struct draw_geometry_shader;
+struct draw_fragment_shader;
struct tgsi_sampler;
#define DRAW_MAX_TEXTURE_LEVELS 13 /* 4K x 4K for now */
@@ -138,6 +139,17 @@ void draw_delete_vertex_shader(struct draw_context *draw,
/*
+ * Fragment shader functions
+ */
+struct draw_fragment_shader *
+draw_create_fragment_shader(struct draw_context *draw,
+ const struct pipe_shader_state *shader);
+void draw_bind_fragment_shader(struct draw_context *draw,
+ struct draw_fragment_shader *dvs);
+void draw_delete_fragment_shader(struct draw_context *draw,
+ struct draw_fragment_shader *dvs);
+
+/*
* Geometry shader functions
*/
struct draw_geometry_shader *