draw: Fix MSVC warnings.
This commit is contained in:
@@ -255,7 +255,8 @@ void draw_pipeline_run( struct draw_context *draw,
|
||||
char *verts = (char *)vertices; \
|
||||
boolean flatfirst = (draw->rasterizer->flatshade && \
|
||||
draw->rasterizer->flatshade_first); \
|
||||
unsigned i, flags
|
||||
unsigned i; \
|
||||
ushort flags
|
||||
|
||||
#define FLUSH
|
||||
|
||||
|
||||
@@ -118,9 +118,9 @@ static void FUNC( ARGS,
|
||||
/* These bitflags look a little odd because we submit the
|
||||
* vertices as (1,2,0) to satisfy flatshade requirements.
|
||||
*/
|
||||
const unsigned edge_first = DRAW_PIPE_EDGE_FLAG_2;
|
||||
const unsigned edge_middle = DRAW_PIPE_EDGE_FLAG_0;
|
||||
const unsigned edge_last = DRAW_PIPE_EDGE_FLAG_1;
|
||||
const ushort edge_first = DRAW_PIPE_EDGE_FLAG_2;
|
||||
const ushort edge_middle = DRAW_PIPE_EDGE_FLAG_0;
|
||||
const ushort edge_last = DRAW_PIPE_EDGE_FLAG_1;
|
||||
|
||||
flags = DRAW_PIPE_RESET_STIPPLE | edge_first | edge_middle;
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@ static INLINE void fetch_init(struct varray_frontend *varray,
|
||||
|
||||
|
||||
static INLINE void add_draw_el(struct varray_frontend *varray,
|
||||
int idx)
|
||||
unsigned idx)
|
||||
{
|
||||
varray->draw_elts[varray->draw_count++] = idx;
|
||||
varray->draw_elts[varray->draw_count++] = (ushort)idx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@ void draw_vs_set_constants( struct draw_context *draw,
|
||||
if (((unsigned)constants) & 0xf) {
|
||||
if (size > draw->vs.const_storage_size) {
|
||||
if (draw->vs.aligned_constant_storage)
|
||||
align_free(draw->vs.aligned_constant_storage);
|
||||
align_free((void *)draw->vs.aligned_constant_storage);
|
||||
draw->vs.aligned_constant_storage = align_malloc( size, 16 );
|
||||
}
|
||||
memcpy( draw->vs.aligned_constant_storage,
|
||||
memcpy( (void*)draw->vs.aligned_constant_storage,
|
||||
constants,
|
||||
size );
|
||||
constants = draw->vs.aligned_constant_storage;
|
||||
@@ -174,7 +174,7 @@ draw_vs_destroy( struct draw_context *draw )
|
||||
draw_vs_aos_machine_destroy(draw->vs.aos_machine);
|
||||
|
||||
if (draw->vs.aligned_constant_storage)
|
||||
align_free(draw->vs.aligned_constant_storage);
|
||||
align_free((void*)draw->vs.aligned_constant_storage);
|
||||
|
||||
tgsi_exec_machine_free_data(&draw->vs.machine);
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ static struct x86_reg fetch_src( struct aos_compilation *cp,
|
||||
src->SrcRegister.File,
|
||||
src->SrcRegister.Index);
|
||||
unsigned i;
|
||||
unsigned swz = 0;
|
||||
ubyte swz = 0;
|
||||
unsigned negs = 0;
|
||||
unsigned abs = 0;
|
||||
|
||||
@@ -704,7 +704,7 @@ static void store_dest( struct aos_compilation *cp,
|
||||
static void inject_scalar( struct aos_compilation *cp,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg result,
|
||||
unsigned swizzle )
|
||||
ubyte swizzle )
|
||||
{
|
||||
sse_shufps(cp->func, dst, dst, swizzle);
|
||||
sse_movss(cp->func, dst, result);
|
||||
|
||||
@@ -118,7 +118,7 @@ static void get_src_ptr( struct aos_compilation *cp,
|
||||
static void emit_swizzle( struct aos_compilation *cp,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg src,
|
||||
unsigned shuffle )
|
||||
ubyte shuffle )
|
||||
{
|
||||
sse_shufps(cp->func, dest, src, shuffle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user