mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
gallium: WinCE portability fixes.
This commit is contained in:
parent
b041dbe901
commit
b721bc8792
6 changed files with 24 additions and 6 deletions
|
|
@ -129,7 +129,7 @@ static void unfilled_tri( struct draw_stage *stage,
|
|||
points( stage, header );
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,11 +57,15 @@ int rpl_vsnprintf(char *, size_t, const char *, va_list);
|
|||
void debug_vprintf(const char *format, va_list ap)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifndef WINCE
|
||||
/* EngDebugPrint does not handle float point arguments, so we need to use
|
||||
* our own vsnprintf implementation */
|
||||
char buf[512 + 1];
|
||||
rpl_vsnprintf(buf, sizeof(buf), format, ap);
|
||||
rpl_EngDebugPrint("%s", buf);
|
||||
#else
|
||||
/* TODO: Implement debug print for WINCE */
|
||||
#endif
|
||||
#else
|
||||
vfprintf(stderr, format, ap);
|
||||
#endif
|
||||
|
|
@ -80,7 +84,11 @@ void debug_printf(const char *format, ...)
|
|||
static INLINE void debug_abort(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifndef WINCE
|
||||
EngDebugBreak();
|
||||
#else
|
||||
_asm {int 3};
|
||||
#endif
|
||||
#else
|
||||
abort();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad)
|
|||
passMask = MASK_ALL;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
assert(0);
|
||||
}
|
||||
|
||||
quad->mask &= passMask;
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)
|
|||
assert(0); /* to do */
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -464,7 +464,7 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -716,7 +716,7 @@ blend_quad(struct quad_stage *qs, struct quad_header *quad)
|
|||
VEC4_MAX(quadColor[3], source[3], dest[3]); /* A */
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* pass blended quad to next stage */
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ sp_depth_test_quad(struct quad_stage *qs, struct quad_header *quad)
|
|||
zmask = MASK_ALL;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
assert(0);
|
||||
}
|
||||
|
||||
quad->mask &= zmask;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,12 @@ EngFreeMem(
|
|||
static INLINE void *
|
||||
MALLOC( unsigned size )
|
||||
{
|
||||
#ifdef WINCE
|
||||
/* TODO: Need to abstract this */
|
||||
return malloc( size );
|
||||
#else
|
||||
return EngAllocMem( 0, size, 'D3AG' );
|
||||
#endif
|
||||
}
|
||||
|
||||
static INLINE void *
|
||||
|
|
@ -71,7 +76,12 @@ static INLINE void
|
|||
FREE( void *ptr )
|
||||
{
|
||||
if( ptr ) {
|
||||
#ifdef WINCE
|
||||
/* TODO: Need to abstract this */
|
||||
free( ptr );
|
||||
#else
|
||||
EngFreeMem( ptr );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue