{
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;
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__);
/* 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]);
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]);
void
draw_vertex_shader_queue_flush(struct draw_context *draw)
{
- unsigned i, j;
+ unsigned i;
assert(draw->vs.queue_nr != 0);
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;
#include "draw_vf.h"
-#define DBG 0
+#define DRAW_VF_DBG 0
/* TODO: remove this */
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;
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++;
* 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);
}
#include <assert.h>
-#include "simple_list.h"
-
#include "pipe/p_compiler.h"
#include "pipe/p_util.h"
/* Do the delayed destroy:
*/
pb_reference(&fenced_buf->buffer, NULL);
- free(fenced_buf);
+ FREE(fenced_buf);
}
}
}
else {
pb_reference(&fenced_buf->buffer, NULL);
- free(fenced_buf);
+ FREE(fenced_buf);
}
if ((fenced_list->numDelayed % fenced_list->checkDelayed) == 0)