summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aapoint.c2
-rw-r--r--src/gallium/auxiliary/draw/draw_vertex.h9
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_exec.c1
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
index 5008086cf2..3133abe5dc 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
@@ -286,7 +286,7 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
ctx->emit_instruction(ctx, &newInst);
#endif
- /* SGT t0.y, t0.xxxx, t0.wwww; # bool b = d > 1 (NOTE t0.w == 1) */
+ /* SGT t0.y, t0.xxxx, tex.wwww; # bool b = d > 1 (NOTE tex.w == 1) */
newInst = tgsi_default_full_instruction();
newInst.Instruction.Opcode = TGSI_OPCODE_SGT;
newInst.Instruction.NumDstRegs = 1;
diff --git a/src/gallium/auxiliary/draw/draw_vertex.h b/src/gallium/auxiliary/draw/draw_vertex.h
index c143cf2372..554f4ac3c1 100644
--- a/src/gallium/auxiliary/draw/draw_vertex.h
+++ b/src/gallium/auxiliary/draw/draw_vertex.h
@@ -87,18 +87,17 @@ struct vertex_info
} attrib[PIPE_MAX_SHADER_INPUTS];
};
-static INLINE int
+static INLINE size_t
draw_vinfo_size( const struct vertex_info *a )
{
- return ((const char *)&a->attrib[a->num_attribs] -
- (const char *)a);
+ return offsetof(const struct vertex_info, attrib[a->num_attribs]);
}
static INLINE int
draw_vinfo_compare( const struct vertex_info *a,
const struct vertex_info *b )
{
- unsigned sizea = draw_vinfo_size( a );
+ size_t sizea = draw_vinfo_size( a );
return memcmp( a, b, sizea );
}
@@ -106,7 +105,7 @@ static INLINE void
draw_vinfo_copy( struct vertex_info *dst,
const struct vertex_info *src )
{
- unsigned size = draw_vinfo_size( src );
+ size_t size = draw_vinfo_size( src );
memcpy( dst, src, size );
}
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c
index b3200df811..dbbc33fffa 100644
--- a/src/gallium/auxiliary/draw/draw_vs_exec.c
+++ b/src/gallium/auxiliary/draw/draw_vs_exec.c
@@ -151,6 +151,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
output[slot][1],
output[slot][2],
output[slot][3]);
+ assert(!util_is_inf_or_nan(output[slot][0]));
}
#endif