summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/ppu/cell_state_sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/cell/ppu/cell_state_sampler.c')
-rw-r--r--src/mesa/pipe/cell/ppu/cell_state_sampler.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_state_sampler.c b/src/mesa/pipe/cell/ppu/cell_state_sampler.c
index ae1eeb4620..ade6cc8338 100644
--- a/src/mesa/pipe/cell/ppu/cell_state_sampler.c
+++ b/src/mesa/pipe/cell/ppu/cell_state_sampler.c
@@ -30,21 +30,17 @@
*/
#include "pipe/p_util.h"
+#include "pipe/draw/draw_context.h"
#include "cell_context.h"
#include "cell_state.h"
-#if 0
#include "cell_texture.h"
-#include "cell_tile_cache.h"
-#endif
void *
cell_create_sampler_state(struct pipe_context *pipe,
const struct pipe_sampler_state *sampler)
{
- struct pipe_sampler_state *state = MALLOC( sizeof(struct pipe_sampler_state) );
- memcpy(state, sampler, sizeof(struct pipe_sampler_state));
- return state;
+ return mem_dup(sampler, sizeof(*sampler));
}
void
@@ -53,6 +49,8 @@ cell_bind_sampler_state(struct pipe_context *pipe,
{
struct cell_context *cell = cell_context(pipe);
+ draw_flush(cell->draw);
+
assert(unit < PIPE_MAX_SAMPLERS);
cell->sampler[unit] = (struct pipe_sampler_state *)sampler;
@@ -76,7 +74,11 @@ cell_set_sampler_texture(struct pipe_context *pipe,
{
struct cell_context *cell = cell_context(pipe);
+ draw_flush(cell->draw);
+
cell->texture[sampler] = texture;
+ cell_update_texture_mapping(cell);
+
cell->dirty |= CELL_NEW_TEXTURE;
}