X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fdraw%2Fdraw_pipe_stipple.c;h=70fbab9ea7673dca3cbdf1a1162dd4fb0a6caaff;hb=2b8db4ce156fbd4d094f46fad0b8b3291b057fff;hp=bf0db18a684fb89ee40989371c8037fdb7c603a6;hpb=2161b0fafcdc16703162dd489d2ec1e7114cce4c;p=mesa.git diff --git a/src/gallium/auxiliary/draw/draw_pipe_stipple.c b/src/gallium/auxiliary/draw/draw_pipe_stipple.c index bf0db18a684..70fbab9ea76 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_stipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_stipple.c @@ -36,10 +36,12 @@ */ -#include "pipe/p_util.h" #include "pipe/p_defines.h" #include "pipe/p_shader_tokens.h" -#include "draw_pipe.h" +#include "util/u_math.h" +#include "util/u_memory.h" + +#include "draw/draw_pipe.h" /** Subclass of draw_stage */ @@ -71,7 +73,8 @@ screen_interp( struct draw_context *draw, const struct vertex_header *v1 ) { uint attr; - for (attr = 0; attr < draw->vs.num_vs_outputs; attr++) { + int num_outputs = draw_current_shader_outputs(draw); + for (attr = 0; attr < num_outputs; attr++) { const float *val0 = v0->data[attr]; const float *val1 = v1->data[attr]; float *newv = dst->data[attr]; @@ -119,7 +122,7 @@ stipple_line(struct draw_stage *stage, struct prim_header *header) struct stipple_stage *stipple = stipple_stage(stage); struct vertex_header *v0 = header->v[0]; struct vertex_header *v1 = header->v[1]; - const unsigned pos = stage->draw->vs.position_output; + const unsigned pos = draw_current_shader_position_output(stage->draw); const float *pos0 = v0->data[pos]; const float *pos1 = v1->data[pos]; float start = 0; @@ -236,6 +239,7 @@ struct draw_stage *draw_stipple_stage( struct draw_context *draw ) draw_alloc_temp_verts( &stipple->stage, 2 ); stipple->stage.draw = draw; + stipple->stage.name = "stipple"; stipple->stage.next = NULL; stipple->stage.point = stipple_reset_point; stipple->stage.line = stipple_first_line;