Bring in several forgotten MSVC fixes.

This commit is contained in:
José Fonseca 2008-02-23 14:14:54 +09:00
parent bed547cb82
commit e8de5c70e3
7 changed files with 18 additions and 7 deletions

View File

@ -166,6 +166,7 @@ static INLINE void
pb_destroy(struct pb_buffer *buf)
{
assert(buf);
assert(buf->vtbl);
buf->vtbl->destroy(buf);
}

View File

@ -192,8 +192,8 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
}
/* Some sanity checks */
assert(0 <= mm_buf->block->ofs && mm_buf->block->ofs < mm->size);
assert(size <= mm_buf->block->size && mm_buf->block->ofs + mm_buf->block->size <= mm->size);
assert(0 <= (unsigned)mm_buf->block->ofs && (unsigned)mm_buf->block->ofs < mm->size);
assert(size <= (unsigned)mm_buf->block->size && (unsigned)mm_buf->block->ofs + (unsigned)mm_buf->block->size <= mm->size);
_glthread_UNLOCK_MUTEX(mm->mutex);
return SUPER(mm_buf);

View File

@ -2455,7 +2455,7 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach )
/* execute instructions, until pc is set to -1 */
while (pc != -1) {
assert(pc < mach->NumInstructions);
assert(pc < (int) mach->NumInstructions);
exec_instruction( mach, mach->Instructions + pc, &pc );
}

View File

@ -299,7 +299,8 @@ static const char *TGSI_SEMANTICS[] =
"SEMANTIC_BCOLOR",
"SEMANTIC_FOG",
"SEMANTIC_PSIZE",
"SEMANTIC_GENERIC,"
"SEMANTIC_GENERIC",
"SEMANTIC_NORMAL"
};
static const char *TGSI_SEMANTICS_SHORT[] =
@ -310,6 +311,7 @@ static const char *TGSI_SEMANTICS_SHORT[] =
"FOG",
"PSIZE",
"GENERIC",
"NORMAL"
};
static const char *TGSI_IMMS[] =

View File

@ -81,7 +81,7 @@ sp_setup_pos_vector(const struct tgsi_interp_coef *coef,
static void
exec_prepare( struct sp_fragment_shader *base,
exec_prepare( const struct sp_fragment_shader *base,
struct tgsi_exec_machine *machine,
struct tgsi_sampler *samplers )
{
@ -98,7 +98,7 @@ exec_prepare( struct sp_fragment_shader *base,
* interface:
*/
static unsigned
exec_run( struct sp_fragment_shader *base,
exec_run( const struct sp_fragment_shader *base,
struct tgsi_exec_machine *machine,
struct quad_header *quad )
{

View File

@ -146,7 +146,7 @@ shade_quad_llvm(struct quad_stage *qs,
unsigned
run_llvm_fs( struct sp_fragment_shader *base,
run_llvm_fs( const struct sp_fragment_shader *base,
struct foo *machine )
{
}

View File

@ -42,6 +42,14 @@
#endif
#if defined(__MSC__)
/* Avoid 'expression is always true' warning */
#pragma warning(disable: 4296)
#endif /* __MSC__ */
typedef unsigned int uint;
typedef unsigned char ubyte;
typedef unsigned char boolean;