gallium: Fix build on WinXP.

This commit is contained in:
Michal Krol 2008-01-29 16:41:10 +01:00 committed by José Fonseca
parent 7f2713a29f
commit 17ef840af4
6 changed files with 19 additions and 19 deletions

View file

@ -406,7 +406,7 @@ clip_init_state( struct draw_stage *stage )
{
struct clipper *clipper = clipper_stage( stage );
clipper->flat = stage->draw->rasterizer->flatshade;
clipper->flat = stage->draw->rasterizer->flatshade ? TRUE : FALSE;
if (clipper->flat) {
const struct pipe_shader_state *vs = stage->draw->vertex_shader->state;

View file

@ -326,6 +326,10 @@ static void fetch_xyz_rgb( struct draw_context *draw,
const unsigned *elts,
unsigned count )
{
const unsigned *pitch = draw->vertex_fetch.pitch;
const ubyte **src = draw->vertex_fetch.src_ptr;
int i;
assert(count <= 4);
// _mesa_printf("%s\n", __FUNCTION__);
@ -333,10 +337,6 @@ static void fetch_xyz_rgb( struct draw_context *draw,
/* loop over vertex attributes (vertex shader inputs)
*/
const unsigned *pitch = draw->vertex_fetch.pitch;
const ubyte **src = draw->vertex_fetch.src_ptr;
int i;
for (i = 0; i < 4; i++) {
{
const float *in = (const float *)(src[0] + elts[i] * pitch[0]);
@ -366,15 +366,15 @@ static void fetch_xyz_rgb_st( struct draw_context *draw,
const unsigned *elts,
unsigned count )
{
const unsigned *pitch = draw->vertex_fetch.pitch;
const ubyte **src = draw->vertex_fetch.src_ptr;
int i;
assert(count <= 4);
/* loop over vertex attributes (vertex shader inputs)
*/
const unsigned *pitch = draw->vertex_fetch.pitch;
const ubyte **src = draw->vertex_fetch.src_ptr;
int i;
for (i = 0; i < 4; i++) {
{
const float *in = (const float *)(src[0] + elts[i] * pitch[0]);

View file

@ -199,7 +199,7 @@ run_vertex_program(struct draw_context *draw,
void
draw_vertex_shader_queue_flush(struct draw_context *draw)
{
unsigned i, j;
unsigned i;
assert(draw->vs.queue_nr != 0);
@ -219,7 +219,7 @@ draw_vertex_shader_queue_flush(struct draw_context *draw)
for (i = 0; i < draw->vs.queue_nr; i += 4) {
struct vertex_header *dests[4];
unsigned elts[4];
int n = MIN2(4, draw->vs.queue_nr - i);
int j, n = MIN2(4, draw->vs.queue_nr - i);
for (j = 0; j < n; j++) {
elts[j] = draw->vs.queue[i + j].elt;

View file

@ -32,7 +32,7 @@
#include "draw_vf.h"
#define DBG 0
#define DRAW_VF_DBG 0
/* TODO: remove this */
@ -166,9 +166,10 @@ unsigned draw_vf_set_vertex_attributes( struct draw_vertex_fetch *vf,
for (j = 0, i = 0; i < nr; i++) {
const unsigned format = map[i].format;
if (format == DRAW_EMIT_PAD) {
if (DBG)
#if (DRAW_VF_DBG)
_mesa_printf("%d: pad %d, offset %d\n", i,
map[i].offset, offset);
#endif
offset += map[i].offset;
@ -186,10 +187,11 @@ unsigned draw_vf_set_vertex_attributes( struct draw_vertex_fetch *vf,
if(vf->attr[j].isconst)
memcpy(vf->attr[j].data, &map[i].data, vf->attr[j].vertattrsize);
if (DBG)
#if (DRAW_VF_DBG)
_mesa_printf("%d: %s, offset %d\n", i,
draw_vf_format_info[format].name,
vf->attr[j].vertoffset);
#endif
offset += draw_vf_format_info[format].attrsize;
j++;
@ -303,7 +305,7 @@ void draw_vf_destroy( struct draw_vertex_fetch *vf )
* to unify them, but this probably won't change until this
* module gets another overhaul.
*/
_mesa_exec_free((void *) fp->func);
//_mesa_exec_free((void *) fp->func);
FREE(fp);
}

View file

@ -29,8 +29,6 @@
#include <assert.h>
#include "simple_list.h"
#include "pipe/p_compiler.h"
#include "pipe/p_util.h"

View file

@ -145,7 +145,7 @@ _fenced_buffer_list_check_free(struct fenced_buffer_list *fenced_list,
/* Do the delayed destroy:
*/
pb_reference(&fenced_buf->buffer, NULL);
free(fenced_buf);
FREE(fenced_buf);
}
}
@ -162,7 +162,7 @@ fenced_buffer_destroy(struct pb_buffer *buf)
}
else {
pb_reference(&fenced_buf->buffer, NULL);
free(fenced_buf);
FREE(fenced_buf);
}
if ((fenced_list->numDelayed % fenced_list->checkDelayed) == 0)