Commit bc88c959 authored by Jakob Bornecrantz's avatar Jakob Bornecrantz

i915g: Rename winsys prefix to i915_ from intel_

Since the winsys isn't shared with i965 and never will be
parent 80672e84
...@@ -52,7 +52,7 @@ opts.Add(ListVariable('statetrackers', 'state trackers to build', default_statet ...@@ -52,7 +52,7 @@ opts.Add(ListVariable('statetrackers', 'state trackers to build', default_statet
opts.Add(ListVariable('drivers', 'pipe drivers to build', default_drivers, opts.Add(ListVariable('drivers', 'pipe drivers to build', default_drivers,
['softpipe', 'failover', 'svga', 'i915', 'i965', 'trace', 'r300', 'identity', 'llvmpipe'])) ['softpipe', 'failover', 'svga', 'i915', 'i965', 'trace', 'r300', 'identity', 'llvmpipe']))
opts.Add(ListVariable('winsys', 'winsys drivers to build', default_winsys, opts.Add(ListVariable('winsys', 'winsys drivers to build', default_winsys,
['xlib', 'vmware', 'intel', 'i965', 'gdi', 'radeon'])) ['xlib', 'vmware', 'i915', 'i965', 'gdi', 'radeon']))
opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0'))) opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
......
...@@ -28,19 +28,19 @@ ...@@ -28,19 +28,19 @@
#ifndef I915_BATCH_H #ifndef I915_BATCH_H
#define I915_BATCH_H #define I915_BATCH_H
#include "intel_batchbuffer.h" #include "i915_batchbuffer.h"
#define BEGIN_BATCH(dwords, relocs) \ #define BEGIN_BATCH(dwords, relocs) \
(intel_batchbuffer_check(i915->batch, dwords, relocs)) (i915_winsys_batchbuffer_check(i915->batch, dwords, relocs))
#define OUT_BATCH(dword) \ #define OUT_BATCH(dword) \
intel_batchbuffer_dword(i915->batch, dword) i915_winsys_batchbuffer_dword(i915->batch, dword)
#define OUT_RELOC(buf, usage, offset) \ #define OUT_RELOC(buf, usage, offset) \
intel_batchbuffer_reloc(i915->batch, buf, usage, offset) i915_winsys_batchbuffer_reloc(i915->batch, buf, usage, offset)
#define FLUSH_BATCH(fence) do { \ #define FLUSH_BATCH(fence) do { \
intel_batchbuffer_flush(i915->batch, fence); \ i915_winsys_batchbuffer_flush(i915->batch, fence); \
i915->hardware_dirty = ~0; \ i915->hardware_dirty = ~0; \
} while (0) } while (0)
......
/************************************************************************** /**************************************************************************
* *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved. * All Rights Reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the * copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including * "Software"), to deal in the Software without restriction, including
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to * distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to * permit persons to whom the Software is furnished to do so, subject to
* the following conditions: * the following conditions:
* *
* The above copyright notice and this permission notice (including the * The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions * next paragraph) shall be included in all copies or substantial portions
* of the Software. * of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
...@@ -22,34 +22,34 @@ ...@@ -22,34 +22,34 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
**************************************************************************/ **************************************************************************/
#ifndef INTEL_BATCH_H #ifndef I915_BATCHBUFFER_H
#define INTEL_BATCH_H #define I915_BATCHBUFFER_H
#include "intel_winsys.h" #include "i915_winsys.h"
static INLINE boolean static INLINE boolean
intel_batchbuffer_check(struct intel_batchbuffer *batch, i915_winsys_batchbuffer_check(struct i915_winsys_batchbuffer *batch,
size_t dwords, size_t dwords,
size_t relocs) size_t relocs)
{ {
return dwords * 4 <= batch->size - (batch->ptr - batch->map) && return dwords * 4 <= batch->size - (batch->ptr - batch->map) &&
relocs <= (batch->max_relocs - batch->relocs); relocs <= (batch->max_relocs - batch->relocs);
} }
static INLINE size_t static INLINE size_t
intel_batchbuffer_space(struct intel_batchbuffer *batch) i915_winsys_batchbuffer_space(struct i915_winsys_batchbuffer *batch)
{ {
return batch->size - (batch->ptr - batch->map); return batch->size - (batch->ptr - batch->map);
} }
static INLINE void static INLINE void
intel_batchbuffer_dword(struct intel_batchbuffer *batch, i915_winsys_batchbuffer_dword(struct i915_winsys_batchbuffer *batch,
unsigned dword) unsigned dword)
{ {
if (intel_batchbuffer_space(batch) < 4) if (i915_winsys_batchbuffer_space(batch) < 4)
return; return;
*(unsigned *)batch->ptr = dword; *(unsigned *)batch->ptr = dword;
...@@ -57,11 +57,11 @@ intel_batchbuffer_dword(struct intel_batchbuffer *batch, ...@@ -57,11 +57,11 @@ intel_batchbuffer_dword(struct intel_batchbuffer *batch,
} }
static INLINE void static INLINE void
intel_batchbuffer_write(struct intel_batchbuffer *batch, i915_winsys_batchbuffer_write(struct i915_winsys_batchbuffer *batch,
void *data, void *data,
size_t size) size_t size)
{ {
if (intel_batchbuffer_space(batch) < size) if (i915_winsys_batchbuffer_space(batch) < size)
return; return;
memcpy(data, batch->ptr, size); memcpy(data, batch->ptr, size);
...@@ -69,17 +69,17 @@ intel_batchbuffer_write(struct intel_batchbuffer *batch, ...@@ -69,17 +69,17 @@ intel_batchbuffer_write(struct intel_batchbuffer *batch,
} }
static INLINE int static INLINE int
intel_batchbuffer_reloc(struct intel_batchbuffer *batch, i915_winsys_batchbuffer_reloc(struct i915_winsys_batchbuffer *batch,
struct intel_buffer *buffer, struct i915_winsys_buffer *buffer,
enum intel_buffer_usage usage, enum i915_winsys_buffer_usage usage,
size_t offset) size_t offset)
{ {
return batch->iws->batchbuffer_reloc(batch, buffer, usage, offset); return batch->iws->batchbuffer_reloc(batch, buffer, usage, offset);
} }
static INLINE void static INLINE void
intel_batchbuffer_flush(struct intel_batchbuffer *batch, i915_winsys_batchbuffer_flush(struct i915_winsys_batchbuffer *batch,
struct pipe_fence_handle **fence) struct pipe_fence_handle **fence)
{ {
batch->iws->batchbuffer_flush(batch, fence); batch->iws->batchbuffer_flush(batch, fence);
} }
......
...@@ -37,7 +37,7 @@ void ...@@ -37,7 +37,7 @@ void
i915_fill_blit(struct i915_context *i915, i915_fill_blit(struct i915_context *i915,
unsigned cpp, unsigned cpp,
unsigned short dst_pitch, unsigned short dst_pitch,
struct intel_buffer *dst_buffer, struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset, unsigned dst_offset,
short x, short y, short x, short y,
short w, short h, short w, short h,
...@@ -77,7 +77,7 @@ i915_fill_blit(struct i915_context *i915, ...@@ -77,7 +77,7 @@ i915_fill_blit(struct i915_context *i915,
OUT_BATCH(BR13); OUT_BATCH(BR13);
OUT_BATCH((y << 16) | x); OUT_BATCH((y << 16) | x);
OUT_BATCH(((y + h) << 16) | (x + w)); OUT_BATCH(((y + h) << 16) | (x + w));
OUT_RELOC(dst_buffer, INTEL_USAGE_2D_TARGET, dst_offset); OUT_RELOC(dst_buffer, I915_USAGE_2D_TARGET, dst_offset);
OUT_BATCH(color); OUT_BATCH(color);
FLUSH_BATCH(NULL); FLUSH_BATCH(NULL);
} }
...@@ -87,10 +87,10 @@ i915_copy_blit(struct i915_context *i915, ...@@ -87,10 +87,10 @@ i915_copy_blit(struct i915_context *i915,
unsigned do_flip, unsigned do_flip,
unsigned cpp, unsigned cpp,
unsigned short src_pitch, unsigned short src_pitch,
struct intel_buffer *src_buffer, struct i915_winsys_buffer *src_buffer,
unsigned src_offset, unsigned src_offset,
unsigned short dst_pitch, unsigned short dst_pitch,
struct intel_buffer *dst_buffer, struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset, unsigned dst_offset,
short src_x, short src_y, short src_x, short src_y,
short dst_x, short dst_y, short dst_x, short dst_y,
...@@ -143,9 +143,9 @@ i915_copy_blit(struct i915_context *i915, ...@@ -143,9 +143,9 @@ i915_copy_blit(struct i915_context *i915,
OUT_BATCH(BR13); OUT_BATCH(BR13);
OUT_BATCH((dst_y << 16) | dst_x); OUT_BATCH((dst_y << 16) | dst_x);
OUT_BATCH((dst_y2 << 16) | dst_x2); OUT_BATCH((dst_y2 << 16) | dst_x2);
OUT_RELOC(dst_buffer, INTEL_USAGE_2D_TARGET, dst_offset); OUT_RELOC(dst_buffer, I915_USAGE_2D_TARGET, dst_offset);
OUT_BATCH((src_y << 16) | src_x); OUT_BATCH((src_y << 16) | src_x);
OUT_BATCH(((int) src_pitch & 0xffff)); OUT_BATCH(((int) src_pitch & 0xffff));
OUT_RELOC(src_buffer, INTEL_USAGE_2D_SOURCE, src_offset); OUT_RELOC(src_buffer, I915_USAGE_2D_SOURCE, src_offset);
FLUSH_BATCH(NULL); FLUSH_BATCH(NULL);
} }
...@@ -34,10 +34,10 @@ extern void i915_copy_blit(struct i915_context *i915, ...@@ -34,10 +34,10 @@ extern void i915_copy_blit(struct i915_context *i915,
unsigned do_flip, unsigned do_flip,
unsigned cpp, unsigned cpp,
unsigned short src_pitch, unsigned short src_pitch,
struct intel_buffer *src_buffer, struct i915_winsys_buffer *src_buffer,
unsigned src_offset, unsigned src_offset,
unsigned short dst_pitch, unsigned short dst_pitch,
struct intel_buffer *dst_buffer, struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset, unsigned dst_offset,
short srcx, short srcy, short srcx, short srcy,
short dstx, short dsty, short dstx, short dsty,
...@@ -46,7 +46,7 @@ extern void i915_copy_blit(struct i915_context *i915, ...@@ -46,7 +46,7 @@ extern void i915_copy_blit(struct i915_context *i915,
extern void i915_fill_blit(struct i915_context *i915, extern void i915_fill_blit(struct i915_context *i915,
unsigned cpp, unsigned cpp,
unsigned short dst_pitch, unsigned short dst_pitch,
struct intel_buffer *dst_buffer, struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset, unsigned dst_offset,
short x, short y, short x, short y,
short w, short h, unsigned color); short w, short h, unsigned color);
......
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
#include "i915_screen.h" #include "i915_screen.h"
#include "i915_buffer.h" #include "i915_buffer.h"
struct intel_buffer; struct i915_winsys_buffer;
struct i915_buffer struct i915_buffer
{ {
struct pipe_buffer base; struct pipe_buffer base;
struct intel_buffer *ibuf; /** hw buffer */ struct i915_winsys_buffer *ibuf; /** hw buffer */
void *data; /**< user and malloc data */ void *data; /**< user and malloc data */
boolean own; /**< we own the data incase of malloc */ boolean own; /**< we own the data incase of malloc */
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
#include "tgsi/tgsi_scan.h" #include "tgsi/tgsi_scan.h"
struct intel_winsys; struct i915_winsys;
struct intel_buffer; struct i915_winsys_buffer;
struct intel_batchbuffer; struct i915_winsys_batchbuffer;
#define I915_TEX_UNITS 8 #define I915_TEX_UNITS 8
...@@ -219,14 +219,14 @@ struct i915_texture { ...@@ -219,14 +219,14 @@ struct i915_texture {
/* The data is held here: /* The data is held here:
*/ */
struct intel_buffer *buffer; struct i915_winsys_buffer *buffer;
}; };
struct i915_context struct i915_context
{ {
struct pipe_context base; struct pipe_context base;
struct intel_winsys *iws; struct i915_winsys *iws;
struct draw_context *draw; struct draw_context *draw;
...@@ -257,10 +257,10 @@ struct i915_context ...@@ -257,10 +257,10 @@ struct i915_context
unsigned num_fragment_sampler_views; unsigned num_fragment_sampler_views;
unsigned num_vertex_buffers; unsigned num_vertex_buffers;
struct intel_batchbuffer *batch; struct i915_winsys_batchbuffer *batch;
/** Vertex buffer */ /** Vertex buffer */
struct intel_buffer *vbo; struct i915_winsys_buffer *vbo;
size_t vbo_offset; size_t vbo_offset;
unsigned vbo_flushed; unsigned vbo_flushed;
......
...@@ -863,7 +863,7 @@ static boolean i915_debug_packet( struct debug_stream *stream ) ...@@ -863,7 +863,7 @@ static boolean i915_debug_packet( struct debug_stream *stream )
void void
i915_dump_batchbuffer( struct intel_batchbuffer *batch ) i915_dump_batchbuffer( struct i915_winsys_batchbuffer *batch )
{ {
struct debug_stream stream; struct debug_stream stream;
unsigned *start = (unsigned*)batch->map; unsigned *start = (unsigned*)batch->map;
......
...@@ -104,9 +104,9 @@ I915_DBG( ...@@ -104,9 +104,9 @@ I915_DBG(
#endif #endif
struct intel_batchbuffer; struct i915_winsys_batchbuffer;
void i915_dump_batchbuffer( struct intel_batchbuffer *i915 ); void i915_dump_batchbuffer( struct i915_winsys_batchbuffer *i915 );
void i915_debug_init( struct i915_context *i915 ); void i915_debug_init( struct i915_context *i915 );
......
...@@ -76,7 +76,7 @@ struct i915_vbuf_render { ...@@ -76,7 +76,7 @@ struct i915_vbuf_render {
unsigned fallback; unsigned fallback;
/* Stuff for the vbo */ /* Stuff for the vbo */
struct intel_buffer *vbo; struct i915_winsys_buffer *vbo;
size_t vbo_size; /**< current size of allocated buffer */ size_t vbo_size; /**< current size of allocated buffer */
size_t vbo_alloc_size; /**< minimum buffer size to allocate */ size_t vbo_alloc_size; /**< minimum buffer size to allocate */
size_t vbo_offset; size_t vbo_offset;
...@@ -141,7 +141,7 @@ static void ...@@ -141,7 +141,7 @@ static void
i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size) i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
{ {
struct i915_context *i915 = i915_render->i915; struct i915_context *i915 = i915_render->i915;
struct intel_winsys *iws = i915->iws; struct i915_winsys *iws = i915->iws;
if (i915_render->vbo) { if (i915_render->vbo) {
#ifdef VBUF_USE_FIFO #ifdef VBUF_USE_FIFO
...@@ -172,7 +172,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size) ...@@ -172,7 +172,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
if (i915_render->vbo_size != i915_render->pool_buffer_size) { if (i915_render->vbo_size != i915_render->pool_buffer_size) {
i915_render->pool_not_used = TRUE; i915_render->pool_not_used = TRUE;
i915_render->vbo = iws->buffer_create(iws, i915_render->vbo_size, 64, i915_render->vbo = iws->buffer_create(iws, i915_render->vbo_size, 64,
INTEL_NEW_VERTEX); I915_NEW_VERTEX);
} else { } else {
i915_render->pool_not_used = FALSE; i915_render->pool_not_used = FALSE;
...@@ -185,7 +185,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size) ...@@ -185,7 +185,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
} }
#else #else
i915_render->vbo = iws->buffer_create(iws, i915_render->vbo_size, i915_render->vbo = iws->buffer_create(iws, i915_render->vbo_size,
64, INTEL_NEW_VERTEX); 64, I915_NEW_VERTEX);
#endif #endif
} }
...@@ -225,7 +225,7 @@ i915_vbuf_render_map_vertices(struct vbuf_render *render) ...@@ -225,7 +225,7 @@ i915_vbuf_render_map_vertices(struct vbuf_render *render)
{ {
struct i915_vbuf_render *i915_render = i915_vbuf_render(render); struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
struct i915_context *i915 = i915_render->i915; struct i915_context *i915 = i915_render->i915;
struct intel_winsys *iws = i915->iws; struct i915_winsys *iws = i915->iws;
if (i915->vbo_flushed) if (i915->vbo_flushed)
debug_printf("%s bad vbo flush occured stalling on hw\n", __FUNCTION__); debug_printf("%s bad vbo flush occured stalling on hw\n", __FUNCTION__);
...@@ -246,7 +246,7 @@ i915_vbuf_render_unmap_vertices(struct vbuf_render *render, ...@@ -246,7 +246,7 @@ i915_vbuf_render_unmap_vertices(struct vbuf_render *render,
{ {
struct i915_vbuf_render *i915_render = i915_vbuf_render(render); struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
struct i915_context *i915 = i915_render->i915; struct i915_context *i915 = i915_render->i915;
struct intel_winsys *iws = i915->iws; struct i915_winsys *iws = i915->iws;
i915_render->vbo_max_used = MAX2(i915_render->vbo_max_used, i915_render->vertex_size * (max_index + 1)); i915_render->vbo_max_used = MAX2(i915_render->vbo_max_used, i915_render->vertex_size * (max_index + 1));
#ifdef VBUF_MAP_BUFFER #ifdef VBUF_MAP_BUFFER
...@@ -621,7 +621,7 @@ static struct vbuf_render * ...@@ -621,7 +621,7 @@ static struct vbuf_render *
i915_vbuf_render_create(struct i915_context *i915) i915_vbuf_render_create(struct i915_context *i915)
{ {
struct i915_vbuf_render *i915_render = CALLOC_STRUCT(i915_vbuf_render); struct i915_vbuf_render *i915_render = CALLOC_STRUCT(i915_vbuf_render);
struct intel_winsys *iws = i915->iws; struct i915_winsys *iws = i915->iws;
int i; int i;
i915_render->i915 = i915; i915_render->i915 = i915;
...@@ -662,7 +662,7 @@ i915_vbuf_render_create(struct i915_context *i915) ...@@ -662,7 +662,7 @@ i915_vbuf_render_create(struct i915_context *i915)
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
u_fifo_add(i915_render->pool_fifo, u_fifo_add(i915_render->pool_fifo,
iws->buffer_create(iws, i915_render->pool_buffer_size, 64, iws->buffer_create(iws, i915_render->pool_buffer_size, 64,
INTEL_NEW_VERTEX)); I915_NEW_VERTEX));
#else #else
(void)i; (void)i;
(void)iws; (void)iws;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "i915_screen.h" #include "i915_screen.h"
#include "i915_buffer.h" #include "i915_buffer.h"
#include "i915_texture.h" #include "i915_texture.h"
#include "intel_winsys.h" #include "i915_winsys.h"
/* /*
...@@ -260,7 +260,7 @@ i915_destroy_screen(struct pipe_screen *screen) ...@@ -260,7 +260,7 @@ i915_destroy_screen(struct pipe_screen *screen)
* Create a new i915_screen object * Create a new i915_screen object
*/ */
struct pipe_screen * struct pipe_screen *
i915_create_screen(struct intel_winsys *iws, uint pci_id) i915_create_screen(struct i915_winsys *iws, uint pci_id)
{ {
struct i915_screen *is = CALLOC_STRUCT(i915_screen); struct i915_screen *is = CALLOC_STRUCT(i915_screen);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "pipe/p_screen.h" #include "pipe/p_screen.h"
struct intel_winsys; struct i915_winsys;
/** /**
...@@ -42,7 +42,7 @@ struct i915_screen ...@@ -42,7 +42,7 @@ struct i915_screen
{ {
struct pipe_screen base; struct pipe_screen base;
struct intel_winsys *iws; struct i915_winsys *iws;
boolean is_i945; boolean is_i945;
uint pci_id; uint pci_id;
......
...@@ -182,7 +182,7 @@ i915_emit_hardware_state(struct i915_context *i915 ) ...@@ -182,7 +182,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
if(i915->vbo) if(i915->vbo)
OUT_RELOC(i915->vbo, OUT_RELOC(i915->vbo,
INTEL_USAGE_VERTEX, I915_USAGE_VERTEX,
i915->current.immediate[I915_IMMEDIATE_S0]); i915->current.immediate[I915_IMMEDIATE_S0]);
else else
/* FIXME: we should not do this */ /* FIXME: we should not do this */
...@@ -226,7 +226,7 @@ i915_emit_hardware_state(struct i915_context *i915 ) ...@@ -226,7 +226,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
ctile); ctile);
OUT_RELOC(tex->buffer, OUT_RELOC(tex->buffer,
INTEL_USAGE_RENDER, I915_USAGE_RENDER,
cbuf_surface->offset); cbuf_surface->offset);
} }
...@@ -250,7 +250,7 @@ i915_emit_hardware_state(struct i915_context *i915 ) ...@@ -250,7 +250,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
ztile); ztile);
OUT_RELOC(tex->buffer, OUT_RELOC(tex->buffer,
INTEL_USAGE_RENDER, I915_USAGE_RENDER,
depth_surface->offset); depth_surface->offset);
} }
...@@ -291,13 +291,13 @@ i915_emit_hardware_state(struct i915_context *i915 ) ...@@ -291,13 +291,13 @@ i915_emit_hardware_state(struct i915_context *i915 )
for (unit = 0; unit < I915_TEX_UNITS; unit++) { for (unit = 0; unit < I915_TEX_UNITS; unit++) {
if (enabled & (1 << unit)) { if (enabled & (1 << unit)) {
struct i915_texture *texture = (struct i915_texture *)i915->fragment_sampler_views[unit]->texture; struct i915_texture *texture = (struct i915_texture *)i915->fragment_sampler_views[unit]->texture;
struct intel_buffer *buf = texture->buffer; struct i915_winsys_buffer *buf = texture->buffer;
uint offset = 0; uint offset = 0;
assert(buf); assert(buf);
count++; count++;
OUT_RELOC(buf, INTEL_USAGE_SAMPLER, offset); OUT_RELOC(buf, I915_USAGE_SAMPLER, offset);
OUT_BATCH(i915->current.texbuffer[unit][0]); /* MS3 */ OUT_BATCH(i915->current.texbuffer[unit][0]); /* MS3 */
OUT_BATCH(i915->current.texbuffer[unit][1]); /* MS4 */ OUT_BATCH(i915->current.texbuffer[unit][1]); /* MS4 */
} }
......
...@@ -52,11 +52,11 @@ static void upload_S0S1(struct i915_context *i915) ...@@ -52,11 +52,11 @@ static void upload_S0S1(struct i915_context *i915)
{ {
unsigned LIS0, LIS1; unsigned LIS0, LIS1;
/* INTEL_NEW_VBO */ /* I915_NEW_VBO */
/* TODO: re-use vertex buffers here? */ /* TODO: re-use vertex buffers here? */
LIS0 = i915->vbo_offset; LIS0 = i915->vbo_offset;
/* INTEL_NEW_VERTEX_SIZE -- do this where the vertex size is calculated! /* I915_NEW_VERTEX_SIZE -- do this where the vertex size is calculated!
*/ */
{ {
unsigned vertex_size = i915->current.vertex_info.size; unsigned vertex_size = i915->current.vertex_info.size;
...@@ -65,7 +65,7 @@ static void upload_S0S1(struct i915_context *i915) ...@@ -65,7 +65,7 @@ static void upload_S0S1(struct i915_context *i915)
(vertex_size << 16)); (vertex_size << 16));
} }
/* INTEL_NEW_VBO */ /* I915_NEW_VBO */
/* TODO: use a vertex generation number to track vbo changes */ /* TODO: use a vertex generation number to track vbo changes */
if (1 || if (1 ||
i915->current.immediate[I915_IMMEDIATE_S0] != LIS0 ||