projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
draw: Update for renamed sampler/texture state setters.
[mesa.git]
/
src
/
gallium
/
auxiliary
/
draw
/
draw_pipe_wide_line.c
diff --git
a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
index 452732e662c2eb38533ca195748e143661aa5aad..f32cbef983d71aa70a2c9d9dcab0682cfe8d1bd5 100644
(file)
--- a/
src/gallium/auxiliary/draw/draw_pipe_wide_line.c
+++ b/
src/gallium/auxiliary/draw/draw_pipe_wide_line.c
@@
-28,9
+28,10
@@
/* Authors: Keith Whitwell <keith@tungstengraphics.com>
*/
/* Authors: Keith Whitwell <keith@tungstengraphics.com>
*/
-#include "pipe/p_util.h"
#include "pipe/p_defines.h"
#include "pipe/p_shader_tokens.h"
#include "pipe/p_defines.h"
#include "pipe/p_shader_tokens.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
#include "draw_private.h"
#include "draw_pipe.h"
#include "draw_private.h"
#include "draw_pipe.h"
@@
-58,6
+59,7
@@
static void wideline_line( struct draw_stage *stage,
struct prim_header *header )
{
/*const struct wideline_stage *wide = wideline_stage(stage);*/
struct prim_header *header )
{
/*const struct wideline_stage *wide = wideline_stage(stage);*/
+ const unsigned pos = stage->draw->vs.position_output;
const float half_width = 0.5f * stage->draw->rasterizer->line_width;
struct prim_header tri;
const float half_width = 0.5f * stage->draw->rasterizer->line_width;
struct prim_header tri;
@@
-67,13
+69,13
@@
static void wideline_line( struct draw_stage *stage,
struct vertex_header *v2 = dup_vert(stage, header->v[1], 2);
struct vertex_header *v3 = dup_vert(stage, header->v[1], 3);
struct vertex_header *v2 = dup_vert(stage, header->v[1], 2);
struct vertex_header *v3 = dup_vert(stage, header->v[1], 3);
- float *pos0 = v0->data[
0
];
- float *pos1 = v1->data[
0
];
- float *pos2 = v2->data[
0
];
- float *pos3 = v3->data[
0
];
+ float *pos0 = v0->data[
pos
];
+ float *pos1 = v1->data[
pos
];
+ float *pos2 = v2->data[
pos
];
+ float *pos3 = v3->data[
pos
];
- const float dx =
FABSF
(pos0[0] - pos2[0]);
- const float dy =
FABSF
(pos0[1] - pos2[1]);
+ const float dx =
fabsf
(pos0[0] - pos2[0]);
+ const float dy =
fabsf
(pos0[1] - pos2[1]);
/* small tweak to meet GL specification */
const float bias = 0.125f;
/* small tweak to meet GL specification */
const float bias = 0.125f;
@@
-166,10
+168,11
@@
struct draw_stage *draw_wide_line_stage( struct draw_context *draw )
draw_alloc_temp_verts( &wide->stage, 4 );
wide->stage.draw = draw;
draw_alloc_temp_verts( &wide->stage, 4 );
wide->stage.draw = draw;
+ wide->stage.name = "wide-line";
wide->stage.next = NULL;
wide->stage.point = draw_pipe_passthrough_point;
wide->stage.line = wideline_line;
wide->stage.next = NULL;
wide->stage.point = draw_pipe_passthrough_point;
wide->stage.line = wideline_line;
- wide->stage.tri = draw_pipe_passthrough_
point
;
+ wide->stage.tri = draw_pipe_passthrough_
tri
;
wide->stage.flush = wideline_flush;
wide->stage.reset_stipple_counter = wideline_reset_stipple_counter;
wide->stage.destroy = wideline_destroy;
wide->stage.flush = wideline_flush;
wide->stage.reset_stipple_counter = wideline_reset_stipple_counter;
wide->stage.destroy = wideline_destroy;