void draw_pipe_passthrough_line(struct draw_stage *stage, struct prim_header *header);
void draw_pipe_passthrough_point(struct draw_stage *stage, struct prim_header *header);
-
+void draw_aapoint_prepare_outputs(struct draw_context *context,
+ struct draw_stage *stage);
+void draw_aaline_prepare_outputs(struct draw_context *context,
+ struct draw_stage *stage);
void draw_unfilled_prepare_outputs(struct draw_context *context,
struct draw_stage *stage);
return;
}
- /* update vertex attrib info */
- aaline->pos_slot = draw_current_shader_position_output(draw);;
-
- /* allocate the extra post-transformed vertex attribute */
- aaline->tex_slot = draw_alloc_extra_vertex_attrib(draw,
- TGSI_SEMANTIC_GENERIC,
- aaline->fs->generic_attrib);
+ draw_aaline_prepare_outputs(draw, draw->pipeline.aaline);
/* how many samplers? */
/* we'll use sampler/texture[pstip->sampler_unit] for the stipple */
}
+void
+draw_aaline_prepare_outputs(struct draw_context *draw,
+ struct draw_stage *stage)
+{
+ struct aaline_stage *aaline = aaline_stage(stage);
+ const struct pipe_rasterizer_state *rast = draw->rasterizer;
+
+ /* update vertex attrib info */
+ aaline->pos_slot = draw_current_shader_position_output(draw);;
+
+ if (!rast->line_smooth)
+ return;
+
+ /* allocate the extra post-transformed vertex attribute */
+ aaline->tex_slot = draw_alloc_extra_vertex_attrib(draw,
+ TGSI_SEMANTIC_GENERIC,
+ aaline->fs->generic_attrib);
+}
+
/**
* Called by drivers that want to install this AA line prim stage
* into the draw module's pipeline. This will not be used if the
*/
bind_aapoint_fragment_shader(aapoint);
- /* update vertex attrib info */
- aapoint->pos_slot = draw_current_shader_position_output(draw);
-
- /* allocate the extra post-transformed vertex attribute */
- aapoint->tex_slot = draw_alloc_extra_vertex_attrib(draw,
- TGSI_SEMANTIC_GENERIC,
- aapoint->fs->generic_attrib);
- assert(aapoint->tex_slot > 0); /* output[0] is vertex pos */
-
- /* find psize slot in post-transform vertex */
- aapoint->psize_slot = -1;
- if (draw->rasterizer->point_size_per_vertex) {
- const struct tgsi_shader_info *info = draw_get_shader_info(draw);
- uint i;
- /* find PSIZ vertex output */
- for (i = 0; i < info->num_outputs; i++) {
- if (info->output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
- aapoint->psize_slot = i;
- break;
- }
- }
- }
+ draw_aapoint_prepare_outputs(draw, draw->pipeline.aapoint);
draw->suspend_flushing = TRUE;
FREE( stage );
}
+void
+draw_aapoint_prepare_outputs(struct draw_context *draw,
+ struct draw_stage *stage)
+{
+ struct aapoint_stage *aapoint = aapoint_stage(stage);
+ const struct pipe_rasterizer_state *rast = draw->rasterizer;
+
+ /* update vertex attrib info */
+ aapoint->pos_slot = draw_current_shader_position_output(draw);
+
+ if (!rast->point_smooth)
+ return;
+
+ /* allocate the extra post-transformed vertex attribute */
+ aapoint->tex_slot = draw_alloc_extra_vertex_attrib(draw,
+ TGSI_SEMANTIC_GENERIC,
+ aapoint->fs->generic_attrib);
+ assert(aapoint->tex_slot > 0); /* output[0] is vertex pos */
+
+ /* find psize slot in post-transform vertex */
+ aapoint->psize_slot = -1;
+ if (draw->rasterizer->point_size_per_vertex) {
+ const struct tgsi_shader_info *info = draw_get_shader_info(draw);
+ uint i;
+ /* find PSIZ vertex output */
+ for (i = 0; i < info->num_outputs; i++) {
+ if (info->output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
+ aapoint->psize_slot = i;
+ break;
+ }
+ }
+ }
+}
static struct aapoint_stage *
draw_aapoint_stage(struct draw_context *draw)