Commit adfbba47 authored by Zack Rusin's avatar Zack Rusin

gallium: make p_winsys internal

move it to pipe/internal/p_winsys_screen.h and start converting
the state trackers to the screen usage
parent 3cfaccf9
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include "pipe/p_compiler.h" #include "pipe/p_compiler.h"
#include "pipe/p_error.h" #include "pipe/p_error.h"
#include "pipe/p_debug.h" #include "pipe/p_debug.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_thread.h" #include "pipe/p_thread.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "util/u_double_list.h" #include "util/u_double_list.h"
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "pipe/p_compiler.h" #include "pipe/p_compiler.h"
#include "pipe/p_debug.h" #include "pipe/p_debug.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_thread.h" #include "pipe/p_thread.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "util/u_double_list.h" #include "util/u_double_list.h"
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "pipe/p_compiler.h" #include "pipe/p_compiler.h"
#include "pipe/p_debug.h" #include "pipe/p_debug.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_thread.h" #include "pipe/p_thread.h"
#include "util/u_math.h" #include "util/u_math.h"
#include "util/u_memory.h" #include "util/u_memory.h"
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
*/ */
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "pb_buffer.h" #include "pb_buffer.h"
...@@ -184,8 +184,8 @@ pb_winsys_buffer_destroy(struct pipe_winsys *winsys, ...@@ -184,8 +184,8 @@ pb_winsys_buffer_destroy(struct pipe_winsys *winsys,
void void
pb_init_winsys(struct pipe_winsys *winsys) pb_init_winsys(struct pipe_winsys *winsys)
{ {
winsys->_user_buffer_create = pb_winsys_user_buffer_create; winsys->user_buffer_create = pb_winsys_user_buffer_create;
winsys->_buffer_map = pb_winsys_buffer_map; winsys->buffer_map = pb_winsys_buffer_map;
winsys->_buffer_unmap = pb_winsys_buffer_unmap; winsys->buffer_unmap = pb_winsys_buffer_unmap;
winsys->_buffer_destroy = pb_winsys_buffer_destroy; winsys->buffer_destroy = pb_winsys_buffer_destroy;
} }
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "pipe/p_debug.h" #include "pipe/p_debug.h"
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_shader_tokens.h" #include "pipe/p_shader_tokens.h"
#include "util/u_blit.h" #include "util/u_blit.h"
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "pipe/p_context.h" #include "pipe/p_context.h"
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h"
#include "util/u_draw_quad.h" #include "util/u_draw_quad.h"
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include "pipe/p_debug.h" #include "pipe/p_debug.h"
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_shader_tokens.h" #include "pipe/p_shader_tokens.h"
#include "util/u_memory.h" #include "util/u_memory.h"
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "pipe/p_debug.h" #include "pipe/p_debug.h"
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h" #include "pipe/p_screen.h"
#include "pipe/p_shader_tokens.h" #include "pipe/p_shader_tokens.h"
#include "util/u_memory.h" #include "util/u_memory.h"
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* Authors: Keith Whitwell <keithw-at-tungstengraphics-dot-com> * Authors: Keith Whitwell <keithw-at-tungstengraphics-dot-com>
*/ */
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "u_timed_winsys.h" #include "u_timed_winsys.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "util/u_time.h" #include "util/u_time.h"
...@@ -122,7 +122,7 @@ timed_buffer_create(struct pipe_winsys *winsys, ...@@ -122,7 +122,7 @@ timed_buffer_create(struct pipe_winsys *winsys,
uint64_t start = time_start(); uint64_t start = time_start();
struct pipe_buffer *buf = struct pipe_buffer *buf =
backend->_buffer_create( backend, alignment, usage, size ); backend->buffer_create( backend, alignment, usage, size );
time_finish(winsys, start, 0, __FUNCTION__); time_finish(winsys, start, 0, __FUNCTION__);
...@@ -140,7 +140,7 @@ timed_user_buffer_create(struct pipe_winsys *winsys, ...@@ -140,7 +140,7 @@ timed_user_buffer_create(struct pipe_winsys *winsys,
struct pipe_winsys *backend = timed_winsys(winsys)->backend; struct pipe_winsys *backend = timed_winsys(winsys)->backend;
uint64_t start = time_start(); uint64_t start = time_start();
struct pipe_buffer *buf = backend->_user_buffer_create( backend, data, bytes ); struct pipe_buffer *buf = backend->user_buffer_create( backend, data, bytes );
time_finish(winsys, start, 1, __FUNCTION__); time_finish(winsys, start, 1, __FUNCTION__);
...@@ -156,7 +156,7 @@ timed_buffer_map(struct pipe_winsys *winsys, ...@@ -156,7 +156,7 @@ timed_buffer_map(struct pipe_winsys *winsys,
struct pipe_winsys *backend = timed_winsys(winsys)->backend; struct pipe_winsys *backend = timed_winsys(winsys)->backend;
uint64_t start = time_start(); uint64_t start = time_start();
void *map = backend->_buffer_map( backend, buf, flags ); void *map = backend->buffer_map( backend, buf, flags );
time_finish(winsys, start, 2, __FUNCTION__); time_finish(winsys, start, 2, __FUNCTION__);
...@@ -171,7 +171,7 @@ timed_buffer_unmap(struct pipe_winsys *winsys, ...@@ -171,7 +171,7 @@ timed_buffer_unmap(struct pipe_winsys *winsys,
struct pipe_winsys *backend = timed_winsys(winsys)->backend; struct pipe_winsys *backend = timed_winsys(winsys)->backend;
uint64_t start = time_start(); uint64_t start = time_start();
backend->_buffer_unmap( backend, buf ); backend->buffer_unmap( backend, buf );
time_finish(winsys, start, 3, __FUNCTION__); time_finish(winsys, start, 3, __FUNCTION__);
} }
...@@ -184,7 +184,7 @@ timed_buffer_destroy(struct pipe_winsys *winsys, ...@@ -184,7 +184,7 @@ timed_buffer_destroy(struct pipe_winsys *winsys,
struct pipe_winsys *backend = timed_winsys(winsys)->backend; struct pipe_winsys *backend = timed_winsys(winsys)->backend;
uint64_t start = time_start(); uint64_t start = time_start();
backend->_buffer_destroy( backend, buf ); backend->buffer_destroy( backend, buf );
time_finish(winsys, start, 4, __FUNCTION__); time_finish(winsys, start, 4, __FUNCTION__);
} }
...@@ -216,7 +216,7 @@ timed_surface_buffer_create(struct pipe_winsys *winsys, ...@@ -216,7 +216,7 @@ timed_surface_buffer_create(struct pipe_winsys *winsys,
struct pipe_winsys *backend = timed_winsys(winsys)->backend; struct pipe_winsys *backend = timed_winsys(winsys)->backend;
uint64_t start = time_start(); uint64_t start = time_start();
struct pipe_buffer *ret = backend->_surface_buffer_create( backend, width, height, struct pipe_buffer *ret = backend->surface_buffer_create( backend, width, height,
format, usage, stride ); format, usage, stride );
time_finish(winsys, start, 7, __FUNCTION__); time_finish(winsys, start, 7, __FUNCTION__);
...@@ -296,12 +296,12 @@ struct pipe_winsys *u_timed_winsys_create( struct pipe_winsys *backend ) ...@@ -296,12 +296,12 @@ struct pipe_winsys *u_timed_winsys_create( struct pipe_winsys *backend )
{ {
struct timed_winsys *ws = CALLOC_STRUCT(timed_winsys); struct timed_winsys *ws = CALLOC_STRUCT(timed_winsys);
ws->base._user_buffer_create = timed_user_buffer_create; ws->base.user_buffer_create = timed_user_buffer_create;
ws->base._buffer_map = timed_buffer_map; ws->base.buffer_map = timed_buffer_map;
ws->base._buffer_unmap = timed_buffer_unmap; ws->base.buffer_unmap = timed_buffer_unmap;
ws->base._buffer_destroy = timed_buffer_destroy; ws->base.buffer_destroy = timed_buffer_destroy;
ws->base._buffer_create = timed_buffer_create; ws->base.buffer_create = timed_buffer_create;
ws->base._surface_buffer_create = timed_surface_buffer_create; ws->base.surface_buffer_create = timed_surface_buffer_create;
ws->base.flush_frontbuffer = timed_flush_frontbuffer; ws->base.flush_frontbuffer = timed_flush_frontbuffer;
ws->base.get_name = timed_get_name; ws->base.get_name = timed_get_name;
ws->base.fence_reference = timed_fence_reference; ws->base.fence_reference = timed_fence_reference;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_format.h" #include "pipe/p_format.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_screen.h" #include "pipe/p_screen.h"
#include "draw/draw_context.h" #include "draw/draw_context.h"
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_context.h" #include "pipe/p_context.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "cell_context.h" #include "cell_context.h"
...@@ -52,7 +52,7 @@ cell_map_constant_buffers(struct cell_context *sp) ...@@ -52,7 +52,7 @@ cell_map_constant_buffers(struct cell_context *sp)
uint i; uint i;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
if (sp->constants[i].size) { if (sp->constants[i].size) {
sp->mapped_constants[i] = ws->_buffer_map(ws, sp->constants[i].buffer, sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i].buffer,
PIPE_BUFFER_USAGE_CPU_READ); PIPE_BUFFER_USAGE_CPU_READ);
cell_flush_buffer_range(sp, sp->mapped_constants[i], cell_flush_buffer_range(sp, sp->mapped_constants[i],
sp->constants[i].buffer->size); sp->constants[i].buffer->size);
...@@ -71,7 +71,7 @@ cell_unmap_constant_buffers(struct cell_context *sp) ...@@ -71,7 +71,7 @@ cell_unmap_constant_buffers(struct cell_context *sp)
uint i; uint i;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
if (sp->constants[i].size) if (sp->constants[i].size)
ws->_buffer_unmap(ws, sp->constants[i].buffer); ws->buffer_unmap(ws, sp->constants[i].buffer);
sp->mapped_constants[i] = NULL; sp->mapped_constants[i] = NULL;
} }
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "util/u_memory.h" #include "util/u_memory.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_screen.h" #include "pipe/p_screen.h"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "draw/draw_context.h" #include "draw/draw_context.h"
#include "tgsi/tgsi_parse.h" #include "tgsi/tgsi_parse.h"
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "pipe/p_context.h" #include "pipe/p_context.h"
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_math.h" #include "util/u_math.h"
#include "util/u_memory.h" #include "util/u_memory.h"
...@@ -112,7 +112,7 @@ cell_texture_create(struct pipe_screen *screen, ...@@ -112,7 +112,7 @@ cell_texture_create(struct pipe_screen *screen,
cell_texture_layout(ct); cell_texture_layout(ct);
ct->buffer = ws->_buffer_create(ws, 32, PIPE_BUFFER_USAGE_PIXEL, ct->buffer = ws->buffer_create(ws, 32, PIPE_BUFFER_USAGE_PIXEL,
ct->buffer_size); ct->buffer_size);
if (!ct->buffer) { if (!ct->buffer) {
...@@ -324,11 +324,11 @@ cell_twiddle_texture(struct pipe_screen *screen, ...@@ -324,11 +324,11 @@ cell_twiddle_texture(struct pipe_screen *screen,
/* allocate buffer for tiled data now */ /* allocate buffer for tiled data now */
struct pipe_winsys *ws = screen->winsys; struct pipe_winsys *ws = screen->winsys;
uint bytes = bufWidth * bufHeight * 4 * numFaces; uint bytes = bufWidth * bufHeight * 4 * numFaces;
ct->tiled_buffer[level] = ws->_buffer_create(ws, 16, ct->tiled_buffer[level] = ws->buffer_create(ws, 16,
PIPE_BUFFER_USAGE_PIXEL, PIPE_BUFFER_USAGE_PIXEL,
bytes); bytes);
/* and map it */ /* and map it */
ct->tiled_mapped[level] = ws->_buffer_map(ws, ct->tiled_buffer[level], ct->tiled_mapped[level] = ws->buffer_map(ws, ct->tiled_buffer[level],
PIPE_BUFFER_USAGE_GPU_READ); PIPE_BUFFER_USAGE_GPU_READ);
} }
dst = (uint *) ((ubyte *) ct->tiled_mapped[level] + offset); dst = (uint *) ((ubyte *) ct->tiled_mapped[level] + offset);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_context.h" #include "pipe/p_context.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_math.h" #include "util/u_math.h"
#include "cell_context.h" #include "cell_context.h"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "pipe/p_context.h" #include "pipe/p_context.h"
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "draw/draw_context.h" #include "draw/draw_context.h"
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "pipe/p_screen.h" #include "pipe/p_screen.h"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "i915_winsys.h" #include "i915_winsys.h"
#include "i915_debug.h" #include "i915_debug.h"
#include "i915_batch.h" #include "i915_batch.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_debug.h" #include "pipe/p_debug.h"
......
...@@ -72,7 +72,7 @@ void i915_print_ureg(const char *msg, unsigned ureg); ...@@ -72,7 +72,7 @@ void i915_print_ureg(const char *msg, unsigned ureg);
#if defined(DEBUG) && defined(FILE_DEBUG_FLAG) #if defined(DEBUG) && defined(FILE_DEBUG_FLAG)
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
static INLINE void static INLINE void
I915_DBG( I915_DBG(
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "i915_reg.h" #include "i915_reg.h"
#include "i915_debug.h" #include "i915_debug.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_memory.h" #include "util/u_memory.h"
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "draw/draw_vbuf.h" #include "draw/draw_vbuf.h"
#include "pipe/p_debug.h" #include "pipe/p_debug.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_math.h" #include "util/u_math.h"
#include "util/u_memory.h" #include "util/u_memory.h"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "util/u_memory.h" #include "util/u_memory.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "util/u_string.h" #include "util/u_string.h"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "draw/draw_context.h" #include "draw/draw_context.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "util/u_math.h" #include "util/u_math.h"
#include "util/u_memory.h" #include "util/u_memory.h"
...@@ -536,10 +536,10 @@ static void i915_set_constant_buffer(struct pipe_context *pipe, ...@@ -536,10 +536,10 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
if (buf) { if (buf) {
void *mapped; void *mapped;
if (buf->buffer && buf->buffer->size && if (buf->buffer && buf->buffer->size &&
(mapped = ws->_buffer_map(ws, buf->buffer, (mapped = ws->buffer_map(ws, buf->buffer,
PIPE_BUFFER_USAGE_CPU_READ))) { PIPE_BUFFER_USAGE_CPU_READ))) {
memcpy(i915->current.constants[shader], mapped, buf->buffer->size); memcpy(i915->current.constants[shader], mapped, buf->buffer->size);
ws->_buffer_unmap(ws, buf->buffer); ws->buffer_unmap(ws, buf->buffer);
i915->current.num_user_constants[shader] i915->current.num_user_constants[shader]
= buf->buffer->size / (4 * sizeof(float)); = buf->buffer->size / (4 * sizeof(float));
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_tile.h" #include "util/u_tile.h"
#include "util/u_rect.h" #include "util/u_rect.h"
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "pipe/p_context.h" #include "pipe/p_context.h"
#include "pipe/p_defines.h" #include "pipe/p_defines.h"
#include "pipe/p_inlines.h" #include "pipe/p_inlines.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_math.h" #include "util/u_math.h"
#include "util/u_memory.h" #include "util/u_memory.h"
...@@ -605,7 +605,7 @@ i915_texture_create(struct pipe_screen *screen, ...@@ -605,7 +605,7 @@ i915_texture_create(struct pipe_screen *screen,
tex_size = tex->stride * tex->total_nblocksy; tex_size = tex->stride * tex->total_nblocksy;
tex->buffer = ws->_buffer_create(ws, 64, tex->buffer = ws->buffer_create(ws, 64,
PIPE_BUFFER_USAGE_PIXEL, PIPE_BUFFER_USAGE_PIXEL,
tex_size); tex_size);
...@@ -613,10 +613,10 @@ i915_texture_create(struct pipe_screen *screen, ...@@ -613,10 +613,10 @@ i915_texture_create(struct pipe_screen *screen,
goto fail; goto fail;
#if 0 #if 0
void *ptr = ws->_buffer_map(ws, tex->buffer, void *ptr = ws->buffer_map(ws, tex->buffer,
PIPE_BUFFER_USAGE_CPU_WRITE); PIPE_BUFFER_USAGE_CPU_WRITE);
memset(ptr, 0x80, tex_size); memset(ptr, 0x80, tex_size);
ws->_buffer_unmap(ws, tex->buffer); ws->buffer_unmap(ws, tex->buffer);
#endif #endif
return &tex->base; return &tex->base;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "brw_reg.h" #include "brw_reg.h"
#include "pipe/p_context.h" #include "pipe/p_context.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#define FILE_DEBUG_FLAG DEBUG_BLIT #define FILE_DEBUG_FLAG DEBUG_BLIT
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "brw_tex_layout.h" #include "brw_tex_layout.h"
#include "brw_winsys.h" #include "brw_winsys.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_context.h" #include "pipe/p_context.h"
#include "util/u_memory.h" #include "util/u_memory.h"
#include "pipe/p_screen.h" #include "pipe/p_screen.h"
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "brw_util.h" #include "brw_util.h"
#include "brw_wm.h" #include "brw_wm.h"
#include "pipe/p_state.h" #include "pipe/p_state.h"
#include "pipe/p_winsys.h" #include "pipe/internal/p_winsys_screen.h"
#include "util/u_math.h" #include "util/u_math.h"
#include "util/u_memory.h" #include "util/u_memory.h"
...@@ -256,13 +256,13 @@ static void upload_constant_buffer(struct brw_context *brw) ...@@ -256,13 +256,13 @@ static void upload_constant_buffer(struct brw_context *brw)
/* FIXME: buffer size is num_consts + num_immediates */ /* FIXME: buffer size is num_consts + num_immediates */
if (brw->vs.prog_data->num_consts) { if (brw->vs.prog_data->num_consts) {
/* map the vertex constant buffer and copy to curbe: */ /* map the vertex constant buffer and copy to curbe: */
void *data = ws->_buffer_map(ws, cbuffer->buffer, 0); void *data = ws->buffer_map(ws, cbuffer->buffer, 0);
/* FIXME: this is wrong. the cbuffer->buffer->size currently /* FIXME: this is wrong. the cbuffer->buffer->size currently
* represents size of consts + immediates. so if we'll * represents size of consts + immediates. so if we'll