#define CELL_CMD_RENDER 5
#define CELL_CMD_BATCH 6
#define CELL_CMD_STATE_DEPTH_STENCIL 7
+#define CELL_CMD_STATE_SAMPLER 8
#define CELL_NUM_BATCH_BUFFERS 3
cell_batch_append(cell, cell->depth_stencil,
sizeof(struct pipe_depth_stencil_alpha_state));
}
+
+ if (cell->dirty & CELL_NEW_SAMPLER) {
+ uint cmd = CELL_CMD_STATE_SAMPLER;
+ cell_batch_append(cell, &cmd, 4);
+ cell_batch_append(cell, cell->sampler[0],
+ sizeof(struct pipe_sampler_state));
+ }
}
state->depth.enabled);
memcpy(&spu.depth_stencil, state, sizeof(*state));
+}
+
+
+static void
+cmd_state_sampler(const struct pipe_sampler_state *state)
+{
+ if (Debug)
+ printf("SPU %u: SAMPLER\n",
+ spu.init.id);
+ memcpy(&spu.sampler[0], state, sizeof(*state));
}
&buffer[pos+1]);
pos += (1 + sizeof(struct pipe_depth_stencil_alpha_state) / 4);
break;
+ case CELL_CMD_STATE_SAMPLER:
+ cmd_state_sampler((struct pipe_sampler_state *)
+ &buffer[pos+1]);
+ pos += (1 + sizeof(struct pipe_sampler_state) / 4);
+ break;
default:
printf("SPU %u: bad opcode: 0x%x\n", spu.init.id, buffer[pos]);
ASSERT(0);
struct spu_framebuffer fb;
struct pipe_depth_stencil_alpha_state depth_stencil;
struct pipe_blend_state blend;
+ struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
/* XXX more state to come */
} ALIGN16_ATTRIB;