|
|
|
@@ -518,7 +518,7 @@ static void i915_set_constant_buffer(struct pipe_context *pipe, |
|
|
|
const struct pipe_constant_buffer *buf) |
|
|
|
{ |
|
|
|
struct i915_context *i915 = i915_context(pipe); |
|
|
|
struct pipe_winsys *ws = pipe->winsys; |
|
|
|
struct pipe_screen *screen = pipe->screen; |
|
|
|
draw_flush(i915->draw); |
|
|
|
|
|
|
|
assert(shader < PIPE_SHADER_TYPES); |
|
|
|
@@ -536,10 +536,10 @@ static void i915_set_constant_buffer(struct pipe_context *pipe, |
|
|
|
if (buf) { |
|
|
|
void *mapped; |
|
|
|
if (buf->buffer && buf->buffer->size && |
|
|
|
(mapped = ws->buffer_map(ws, buf->buffer, |
|
|
|
(mapped = pipe_buffer_map(screen, buf->buffer, |
|
|
|
PIPE_BUFFER_USAGE_CPU_READ))) { |
|
|
|
memcpy(i915->current.constants[shader], mapped, buf->buffer->size); |
|
|
|
ws->buffer_unmap(ws, buf->buffer); |
|
|
|
pipe_buffer_unmap(screen, buf->buffer); |
|
|
|
i915->current.num_user_constants[shader] |
|
|
|
= buf->buffer->size / (4 * sizeof(float)); |
|
|
|
} |