summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-03-25 19:19:00 +0100
committerJakob Bornecrantz <[email protected]>2010-03-26 00:38:17 +0100
commitbc88c95990f871a206a8fe93e7541f1f41841f7e (patch)
treefe394e2b3dedc3ab6de5c2f108bf0c5c78983872 /src/gallium/drivers/i915
parent80672e84cf79ab12b7a4ff56567184d1c39baef3 (diff)
i915g: Rename winsys prefix to i915_ from intel_
Since the winsys isn't shared with i965 and never will be
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r--src/gallium/drivers/i915/i915_batch.h10
-rw-r--r--src/gallium/drivers/i915/i915_batchbuffer.h (renamed from src/gallium/drivers/i915/intel_batchbuffer.h)50
-rw-r--r--src/gallium/drivers/i915/i915_blit.c12
-rw-r--r--src/gallium/drivers/i915/i915_blit.h6
-rw-r--r--src/gallium/drivers/i915/i915_buffer.c4
-rw-r--r--src/gallium/drivers/i915/i915_context.h14
-rw-r--r--src/gallium/drivers/i915/i915_debug.c2
-rw-r--r--src/gallium/drivers/i915/i915_debug.h4
-rw-r--r--src/gallium/drivers/i915/i915_prim_vbuf.c16
-rw-r--r--src/gallium/drivers/i915/i915_screen.c4
-rw-r--r--src/gallium/drivers/i915/i915_screen.h4
-rw-r--r--src/gallium/drivers/i915/i915_state_emit.c10
-rw-r--r--src/gallium/drivers/i915/i915_state_immediate.c6
-rw-r--r--src/gallium/drivers/i915/i915_texture.c26
-rw-r--r--src/gallium/drivers/i915/i915_winsys.h (renamed from src/gallium/drivers/i915/intel_winsys.h)107
15 files changed, 139 insertions, 136 deletions
diff --git a/src/gallium/drivers/i915/i915_batch.h b/src/gallium/drivers/i915/i915_batch.h
index b813784723f..f0086695d16 100644
--- a/src/gallium/drivers/i915/i915_batch.h
+++ b/src/gallium/drivers/i915/i915_batch.h
@@ -28,19 +28,19 @@
#ifndef I915_BATCH_H
#define I915_BATCH_H
-#include "intel_batchbuffer.h"
+#include "i915_batchbuffer.h"
#define BEGIN_BATCH(dwords, relocs) \
- (intel_batchbuffer_check(i915->batch, dwords, relocs))
+ (i915_winsys_batchbuffer_check(i915->batch, dwords, relocs))
#define OUT_BATCH(dword) \
- intel_batchbuffer_dword(i915->batch, dword)
+ i915_winsys_batchbuffer_dword(i915->batch, dword)
#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 { \
- intel_batchbuffer_flush(i915->batch, fence); \
+ i915_winsys_batchbuffer_flush(i915->batch, fence); \
i915->hardware_dirty = ~0; \
} while (0)
diff --git a/src/gallium/drivers/i915/intel_batchbuffer.h b/src/gallium/drivers/i915/i915_batchbuffer.h
index db12dfd2ac2..27ccaa6b1fa 100644
--- a/src/gallium/drivers/i915/intel_batchbuffer.h
+++ b/src/gallium/drivers/i915/i915_batchbuffer.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* 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
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,34 +22,34 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
-#ifndef INTEL_BATCH_H
-#define INTEL_BATCH_H
+#ifndef I915_BATCHBUFFER_H
+#define I915_BATCHBUFFER_H
-#include "intel_winsys.h"
+#include "i915_winsys.h"
static INLINE boolean
-intel_batchbuffer_check(struct intel_batchbuffer *batch,
- size_t dwords,
- size_t relocs)
+i915_winsys_batchbuffer_check(struct i915_winsys_batchbuffer *batch,
+ size_t dwords,
+ size_t relocs)
{
return dwords * 4 <= batch->size - (batch->ptr - batch->map) &&
relocs <= (batch->max_relocs - batch->relocs);
}
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);
}
static INLINE void
-intel_batchbuffer_dword(struct intel_batchbuffer *batch,
- unsigned dword)
+i915_winsys_batchbuffer_dword(struct i915_winsys_batchbuffer *batch,
+ unsigned dword)
{
- if (intel_batchbuffer_space(batch) < 4)
+ if (i915_winsys_batchbuffer_space(batch) < 4)
return;
*(unsigned *)batch->ptr = dword;
@@ -57,11 +57,11 @@ intel_batchbuffer_dword(struct intel_batchbuffer *batch,
}
static INLINE void
-intel_batchbuffer_write(struct intel_batchbuffer *batch,
- void *data,
- size_t size)
+i915_winsys_batchbuffer_write(struct i915_winsys_batchbuffer *batch,
+ void *data,
+ size_t size)
{
- if (intel_batchbuffer_space(batch) < size)
+ if (i915_winsys_batchbuffer_space(batch) < size)
return;
memcpy(data, batch->ptr, size);
@@ -69,17 +69,17 @@ intel_batchbuffer_write(struct intel_batchbuffer *batch,
}
static INLINE int
-intel_batchbuffer_reloc(struct intel_batchbuffer *batch,
- struct intel_buffer *buffer,
- enum intel_buffer_usage usage,
- size_t offset)
+i915_winsys_batchbuffer_reloc(struct i915_winsys_batchbuffer *batch,
+ struct i915_winsys_buffer *buffer,
+ enum i915_winsys_buffer_usage usage,
+ size_t offset)
{
return batch->iws->batchbuffer_reloc(batch, buffer, usage, offset);
}
static INLINE void
-intel_batchbuffer_flush(struct intel_batchbuffer *batch,
- struct pipe_fence_handle **fence)
+i915_winsys_batchbuffer_flush(struct i915_winsys_batchbuffer *batch,
+ struct pipe_fence_handle **fence)
{
batch->iws->batchbuffer_flush(batch, fence);
}
diff --git a/src/gallium/drivers/i915/i915_blit.c b/src/gallium/drivers/i915/i915_blit.c
index 83dfc335288..533fa81219b 100644
--- a/src/gallium/drivers/i915/i915_blit.c
+++ b/src/gallium/drivers/i915/i915_blit.c
@@ -37,7 +37,7 @@ void
i915_fill_blit(struct i915_context *i915,
unsigned cpp,
unsigned short dst_pitch,
- struct intel_buffer *dst_buffer,
+ struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset,
short x, short y,
short w, short h,
@@ -77,7 +77,7 @@ i915_fill_blit(struct i915_context *i915,
OUT_BATCH(BR13);
OUT_BATCH((y << 16) | x);
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);
FLUSH_BATCH(NULL);
}
@@ -87,10 +87,10 @@ i915_copy_blit(struct i915_context *i915,
unsigned do_flip,
unsigned cpp,
unsigned short src_pitch,
- struct intel_buffer *src_buffer,
+ struct i915_winsys_buffer *src_buffer,
unsigned src_offset,
unsigned short dst_pitch,
- struct intel_buffer *dst_buffer,
+ struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset,
short src_x, short src_y,
short dst_x, short dst_y,
@@ -143,9 +143,9 @@ i915_copy_blit(struct i915_context *i915,
OUT_BATCH(BR13);
OUT_BATCH((dst_y << 16) | dst_x);
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(((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);
}
diff --git a/src/gallium/drivers/i915/i915_blit.h b/src/gallium/drivers/i915/i915_blit.h
index 8ce3220cfd9..db576ed4c90 100644
--- a/src/gallium/drivers/i915/i915_blit.h
+++ b/src/gallium/drivers/i915/i915_blit.h
@@ -34,10 +34,10 @@ extern void i915_copy_blit(struct i915_context *i915,
unsigned do_flip,
unsigned cpp,
unsigned short src_pitch,
- struct intel_buffer *src_buffer,
+ struct i915_winsys_buffer *src_buffer,
unsigned src_offset,
unsigned short dst_pitch,
- struct intel_buffer *dst_buffer,
+ struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset,
short srcx, short srcy,
short dstx, short dsty,
@@ -46,7 +46,7 @@ extern void i915_copy_blit(struct i915_context *i915,
extern void i915_fill_blit(struct i915_context *i915,
unsigned cpp,
unsigned short dst_pitch,
- struct intel_buffer *dst_buffer,
+ struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset,
short x, short y,
short w, short h, unsigned color);
diff --git a/src/gallium/drivers/i915/i915_buffer.c b/src/gallium/drivers/i915/i915_buffer.c
index 0f76a59e93a..1247de320d4 100644
--- a/src/gallium/drivers/i915/i915_buffer.c
+++ b/src/gallium/drivers/i915/i915_buffer.c
@@ -28,13 +28,13 @@
#include "i915_screen.h"
#include "i915_buffer.h"
-struct intel_buffer;
+struct i915_winsys_buffer;
struct i915_buffer
{
struct pipe_buffer base;
- struct intel_buffer *ibuf; /** hw buffer */
+ struct i915_winsys_buffer *ibuf; /** hw buffer */
void *data; /**< user and malloc data */
boolean own; /**< we own the data incase of malloc */
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index 5348f62ca74..8df4dce8653 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -38,9 +38,9 @@
#include "tgsi/tgsi_scan.h"
-struct intel_winsys;
-struct intel_buffer;
-struct intel_batchbuffer;
+struct i915_winsys;
+struct i915_winsys_buffer;
+struct i915_winsys_batchbuffer;
#define I915_TEX_UNITS 8
@@ -219,14 +219,14 @@ struct i915_texture {
/* The data is held here:
*/
- struct intel_buffer *buffer;
+ struct i915_winsys_buffer *buffer;
};
struct i915_context
{
struct pipe_context base;
- struct intel_winsys *iws;
+ struct i915_winsys *iws;
struct draw_context *draw;
@@ -257,10 +257,10 @@ struct i915_context
unsigned num_fragment_sampler_views;
unsigned num_vertex_buffers;
- struct intel_batchbuffer *batch;
+ struct i915_winsys_batchbuffer *batch;
/** Vertex buffer */
- struct intel_buffer *vbo;
+ struct i915_winsys_buffer *vbo;
size_t vbo_offset;
unsigned vbo_flushed;
diff --git a/src/gallium/drivers/i915/i915_debug.c b/src/gallium/drivers/i915/i915_debug.c
index 237654d26b2..663fac3055c 100644
--- a/src/gallium/drivers/i915/i915_debug.c
+++ b/src/gallium/drivers/i915/i915_debug.c
@@ -863,7 +863,7 @@ static boolean i915_debug_packet( struct debug_stream *stream )
void
-i915_dump_batchbuffer( struct intel_batchbuffer *batch )
+i915_dump_batchbuffer( struct i915_winsys_batchbuffer *batch )
{
struct debug_stream stream;
unsigned *start = (unsigned*)batch->map;
diff --git a/src/gallium/drivers/i915/i915_debug.h b/src/gallium/drivers/i915/i915_debug.h
index 8f7484797de..67b8d9c2f63 100644
--- a/src/gallium/drivers/i915/i915_debug.h
+++ b/src/gallium/drivers/i915/i915_debug.h
@@ -104,9 +104,9 @@ I915_DBG(
#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 );
diff --git a/src/gallium/drivers/i915/i915_prim_vbuf.c b/src/gallium/drivers/i915/i915_prim_vbuf.c
index cad4109ee6b..df9e68af4fc 100644
--- a/src/gallium/drivers/i915/i915_prim_vbuf.c
+++ b/src/gallium/drivers/i915/i915_prim_vbuf.c
@@ -76,7 +76,7 @@ struct i915_vbuf_render {
unsigned fallback;
/* 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_alloc_size; /**< minimum buffer size to allocate */
size_t vbo_offset;
@@ -141,7 +141,7 @@ static void
i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
{
struct i915_context *i915 = i915_render->i915;
- struct intel_winsys *iws = i915->iws;
+ struct i915_winsys *iws = i915->iws;
if (i915_render->vbo) {
#ifdef VBUF_USE_FIFO
@@ -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) {
i915_render->pool_not_used = TRUE;
i915_render->vbo = iws->buffer_create(iws, i915_render->vbo_size, 64,
- INTEL_NEW_VERTEX);
+ I915_NEW_VERTEX);
} else {
i915_render->pool_not_used = FALSE;
@@ -185,7 +185,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
}
#else
i915_render->vbo = iws->buffer_create(iws, i915_render->vbo_size,
- 64, INTEL_NEW_VERTEX);
+ 64, I915_NEW_VERTEX);
#endif
}
@@ -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_context *i915 = i915_render->i915;
- struct intel_winsys *iws = i915->iws;
+ struct i915_winsys *iws = i915->iws;
if (i915->vbo_flushed)
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,
{
struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
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));
#ifdef VBUF_MAP_BUFFER
@@ -621,7 +621,7 @@ static struct vbuf_render *
i915_vbuf_render_create(struct i915_context *i915)
{
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;
i915_render->i915 = i915;
@@ -662,7 +662,7 @@ i915_vbuf_render_create(struct i915_context *i915)
for (i = 0; i < 6; i++)
u_fifo_add(i915_render->pool_fifo,
iws->buffer_create(iws, i915_render->pool_buffer_size, 64,
- INTEL_NEW_VERTEX));
+ I915_NEW_VERTEX));
#else
(void)i;
(void)iws;
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 48a39edad20..53ef6e50f6c 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -35,7 +35,7 @@
#include "i915_screen.h"
#include "i915_buffer.h"
#include "i915_texture.h"
-#include "intel_winsys.h"
+#include "i915_winsys.h"
/*
@@ -260,7 +260,7 @@ i915_destroy_screen(struct pipe_screen *screen)
* Create a new i915_screen object
*/
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);
diff --git a/src/gallium/drivers/i915/i915_screen.h b/src/gallium/drivers/i915/i915_screen.h
index 5126485caa7..7f9e02fc0f6 100644
--- a/src/gallium/drivers/i915/i915_screen.h
+++ b/src/gallium/drivers/i915/i915_screen.h
@@ -32,7 +32,7 @@
#include "pipe/p_screen.h"
-struct intel_winsys;
+struct i915_winsys;
/**
@@ -42,7 +42,7 @@ struct i915_screen
{
struct pipe_screen base;
- struct intel_winsys *iws;
+ struct i915_winsys *iws;
boolean is_i945;
uint pci_id;
diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c
index d79c1ca0b2c..04a3924aaf7 100644
--- a/src/gallium/drivers/i915/i915_state_emit.c
+++ b/src/gallium/drivers/i915/i915_state_emit.c
@@ -182,7 +182,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
if(i915->vbo)
OUT_RELOC(i915->vbo,
- INTEL_USAGE_VERTEX,
+ I915_USAGE_VERTEX,
i915->current.immediate[I915_IMMEDIATE_S0]);
else
/* FIXME: we should not do this */
@@ -226,7 +226,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
ctile);
OUT_RELOC(tex->buffer,
- INTEL_USAGE_RENDER,
+ I915_USAGE_RENDER,
cbuf_surface->offset);
}
@@ -250,7 +250,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
ztile);
OUT_RELOC(tex->buffer,
- INTEL_USAGE_RENDER,
+ I915_USAGE_RENDER,
depth_surface->offset);
}
@@ -291,13 +291,13 @@ i915_emit_hardware_state(struct i915_context *i915 )
for (unit = 0; unit < I915_TEX_UNITS; unit++) {
if (enabled & (1 << unit)) {
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;
assert(buf);
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][1]); /* MS4 */
}
diff --git a/src/gallium/drivers/i915/i915_state_immediate.c b/src/gallium/drivers/i915/i915_state_immediate.c
index d2c6f151434..8cec699285c 100644
--- a/src/gallium/drivers/i915/i915_state_immediate.c
+++ b/src/gallium/drivers/i915/i915_state_immediate.c
@@ -52,11 +52,11 @@ static void upload_S0S1(struct i915_context *i915)
{
unsigned LIS0, LIS1;
- /* INTEL_NEW_VBO */
+ /* I915_NEW_VBO */
/* TODO: re-use vertex buffers here? */
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;
@@ -65,7 +65,7 @@ static void upload_S0S1(struct i915_context *i915)
(vertex_size << 16));
}
- /* INTEL_NEW_VBO */
+ /* I915_NEW_VBO */
/* TODO: use a vertex generation number to track vbo changes */
if (1 ||
i915->current.immediate[I915_IMMEDIATE_S0] != LIS0 ||
diff --git a/src/gallium/drivers/i915/i915_texture.c b/src/gallium/drivers/i915/i915_texture.c
index b252fb5330c..8c405c2443e 100644
--- a/src/gallium/drivers/i915/i915_texture.c
+++ b/src/gallium/drivers/i915/i915_texture.c
@@ -41,7 +41,7 @@
#include "i915_context.h"
#include "i915_texture.h"
#include "i915_screen.h"
-#include "intel_winsys.h"
+#include "i915_winsys.h"
/*
@@ -162,7 +162,7 @@ i915_scanout_layout(struct i915_texture *tex)
if (pt->width0 >= 240) {
tex->stride = power_of_two(util_format_get_stride(pt->format, pt->width0));
tex->total_nblocksy = align(util_format_get_nblocksy(pt->format, pt->height0), 8);
- tex->hw_tiled = INTEL_TILE_X;
+ tex->hw_tiled = I915_TILE_X;
} else if (pt->width0 == 64 && pt->height0 == 64) {
tex->stride = power_of_two(util_format_get_stride(pt->format, pt->width0));
tex->total_nblocksy = align(util_format_get_nblocksy(pt->format, pt->height0), 8);
@@ -200,7 +200,7 @@ i915_display_target_layout(struct i915_texture *tex)
tex->stride = power_of_two(util_format_get_stride(pt->format, pt->width0));
tex->total_nblocksy = align(util_format_get_nblocksy(pt->format, pt->height0), 8);
- tex->hw_tiled = INTEL_TILE_X;
+ tex->hw_tiled = I915_TILE_X;
debug_printf("%s size: %d,%d,%d offset %d,%d (0x%x)\n", __FUNCTION__,
pt->width0, pt->height0, util_format_get_blocksize(pt->format),
@@ -617,7 +617,7 @@ i915_texture_create(struct pipe_screen *screen,
const struct pipe_texture *templat)
{
struct i915_screen *is = i915_screen(screen);
- struct intel_winsys *iws = is->iws;
+ struct i915_winsys *iws = is->iws;
struct i915_texture *tex = CALLOC_STRUCT(i915_texture);
size_t tex_size;
unsigned buf_usage = 0;
@@ -643,9 +643,9 @@ i915_texture_create(struct pipe_screen *screen,
/* for scanouts and cursors, cursors arn't scanouts */
if (templat->tex_usage & PIPE_TEXTURE_USAGE_SCANOUT && templat->width0 != 64)
- buf_usage = INTEL_NEW_SCANOUT;
+ buf_usage = I915_NEW_SCANOUT;
else
- buf_usage = INTEL_NEW_TEXTURE;
+ buf_usage = I915_NEW_TEXTURE;
tex->buffer = iws->buffer_create(iws, tex_size, 64, buf_usage);
if (!tex->buffer)
@@ -653,7 +653,7 @@ i915_texture_create(struct pipe_screen *screen,
/* setup any hw fences */
if (tex->hw_tiled) {
- assert(tex->sw_tiled == INTEL_TILE_NONE);
+ assert(tex->sw_tiled == I915_TILE_NONE);
iws->buffer_set_fence_reg(iws, tex->buffer, tex->stride, tex->hw_tiled);
}
@@ -679,8 +679,8 @@ i915_texture_from_handle(struct pipe_screen * screen,
{
struct i915_screen *is = i915_screen(screen);
struct i915_texture *tex;
- struct intel_winsys *iws = is->iws;
- struct intel_buffer *buffer;
+ struct i915_winsys *iws = is->iws;
+ struct i915_winsys_buffer *buffer;
unsigned stride;
assert(screen);
@@ -719,7 +719,7 @@ i915_texture_get_handle(struct pipe_screen * screen,
{
struct i915_screen *is = i915_screen(screen);
struct i915_texture *tex = (struct i915_texture *)texture;
- struct intel_winsys *iws = is->iws;
+ struct i915_winsys *iws = is->iws;
return iws->buffer_get_handle(iws, tex->buffer, whandle, tex->stride);
}
@@ -729,7 +729,7 @@ static void
i915_texture_destroy(struct pipe_texture *pt)
{
struct i915_texture *tex = (struct i915_texture *)pt;
- struct intel_winsys *iws = i915_screen(pt->screen)->iws;
+ struct i915_winsys *iws = i915_screen(pt->screen)->iws;
uint i;
/*
@@ -841,7 +841,7 @@ i915_transfer_map(struct pipe_context *pipe,
struct pipe_transfer *transfer)
{
struct i915_texture *tex = (struct i915_texture *)transfer->texture;
- struct intel_winsys *iws = i915_screen(tex->base.screen)->iws;
+ struct i915_winsys *iws = i915_screen(tex->base.screen)->iws;
char *map;
boolean write = FALSE;
enum pipe_format format = tex->base.format;
@@ -863,7 +863,7 @@ i915_transfer_unmap(struct pipe_context *pipe,
struct pipe_transfer *transfer)
{
struct i915_texture *tex = (struct i915_texture *)transfer->texture;
- struct intel_winsys *iws = i915_screen(tex->base.screen)->iws;
+ struct i915_winsys *iws = i915_screen(tex->base.screen)->iws;
iws->buffer_unmap(iws, tex->buffer);
}
diff --git a/src/gallium/drivers/i915/intel_winsys.h b/src/gallium/drivers/i915/i915_winsys.h
index 00fd0c1efea..246e95b00d6 100644
--- a/src/gallium/drivers/i915/intel_winsys.h
+++ b/src/gallium/drivers/i915/i915_winsys.h
@@ -23,46 +23,46 @@
*
**************************************************************************/
-#ifndef INTEL_WINSYS_H
-#define INTEL_WINSYS_H
+#ifndef I915_WINSYS_H
+#define I915_WINSYS_H
#include "pipe/p_compiler.h"
-struct intel_winsys;
-struct intel_buffer;
-struct intel_batchbuffer;
+struct i915_winsys;
+struct i915_winsys_buffer;
+struct i915_winsys_batchbuffer;
struct pipe_texture;
struct pipe_fence_handle;
struct winsys_handle;
-enum intel_buffer_usage
+enum i915_winsys_buffer_usage
{
/* use on textures */
- INTEL_USAGE_RENDER = 0x01,
- INTEL_USAGE_SAMPLER = 0x02,
- INTEL_USAGE_2D_TARGET = 0x04,
- INTEL_USAGE_2D_SOURCE = 0x08,
+ I915_USAGE_RENDER = 0x01,
+ I915_USAGE_SAMPLER = 0x02,
+ I915_USAGE_2D_TARGET = 0x04,
+ I915_USAGE_2D_SOURCE = 0x08,
/* use on vertex */
- INTEL_USAGE_VERTEX = 0x10
+ I915_USAGE_VERTEX = 0x10
};
-enum intel_buffer_type
+enum i915_winsys_buffer_type
{
- INTEL_NEW_TEXTURE,
- INTEL_NEW_SCANOUT, /**< a texture used for scanning out from */
- INTEL_NEW_VERTEX
+ I915_NEW_TEXTURE,
+ I915_NEW_SCANOUT, /**< a texture used for scanning out from */
+ I915_NEW_VERTEX
};
-enum intel_buffer_tile
+enum i915_winsys_buffer_tile
{
- INTEL_TILE_NONE,
- INTEL_TILE_X,
- INTEL_TILE_Y
+ I915_TILE_NONE,
+ I915_TILE_X,
+ I915_TILE_Y
};
-struct intel_batchbuffer {
+struct i915_winsys_batchbuffer {
- struct intel_winsys *iws;
+ struct i915_winsys *iws;
/**
* Values exported to speed up the writing the batchbuffer,
@@ -79,7 +79,7 @@ struct intel_batchbuffer {
/*@}*/
};
-struct intel_winsys {
+struct i915_winsys {
/**
* Batchbuffer functions.
@@ -88,7 +88,8 @@ struct intel_winsys {
/**
* Create a new batchbuffer.
*/
- struct intel_batchbuffer *(*batchbuffer_create)(struct intel_winsys *iws);
+ struct i915_winsys_batchbuffer *
+ (*batchbuffer_create)(struct i915_winsys *iws);
/**
* Emit a relocation to a buffer.
@@ -100,21 +101,21 @@ struct intel_winsys {
* @offset add this to the reloc buffers address
* @target buffer where to write the address, null for batchbuffer.
*/
- int (*batchbuffer_reloc)(struct intel_batchbuffer *batch,
- struct intel_buffer *reloc,
- enum intel_buffer_usage usage,
+ int (*batchbuffer_reloc)(struct i915_winsys_batchbuffer *batch,
+ struct i915_winsys_buffer *reloc,
+ enum i915_winsys_buffer_usage usage,
unsigned offset);
/**
* Flush a bufferbatch.
*/
- void (*batchbuffer_flush)(struct intel_batchbuffer *batch,
+ void (*batchbuffer_flush)(struct i915_winsys_batchbuffer *batch,
struct pipe_fence_handle **fence);
/**
* Destroy a batchbuffer.
*/
- void (*batchbuffer_destroy)(struct intel_batchbuffer *batch);
+ void (*batchbuffer_destroy)(struct i915_winsys_batchbuffer *batch);
/*@}*/
@@ -125,9 +126,10 @@ struct intel_winsys {
/**
* Create a buffer.
*/
- struct intel_buffer *(*buffer_create)(struct intel_winsys *iws,
- unsigned size, unsigned alignment,
- enum intel_buffer_type type);
+ struct i915_winsys_buffer *
+ (*buffer_create)(struct i915_winsys *iws,
+ unsigned size, unsigned alignment,
+ enum i915_winsys_buffer_type type);
/**
* Creates a buffer from a handle.
@@ -135,16 +137,17 @@ struct intel_winsys {
* Also provides the stride information needed for the
* texture via the stride argument.
*/
- struct intel_buffer *(*buffer_from_handle)(struct intel_winsys *iws,
- struct winsys_handle *whandle,
- unsigned *stride);
+ struct i915_winsys_buffer *
+ (*buffer_from_handle)(struct i915_winsys *iws,
+ struct winsys_handle *whandle,
+ unsigned *stride);
/**
* Used to implement pipe_screen::texture_get_handle.
* The winsys might need the stride information.
*/
- boolean (*buffer_get_handle)(struct intel_winsys *iws,
- struct intel_buffer *buffer,
+ boolean (*buffer_get_handle)(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer,
struct winsys_handle *whandle,
unsigned stride);
@@ -152,37 +155,37 @@ struct intel_winsys {
* Fence a buffer with a fence reg.
* Not to be confused with pipe_fence_handle.
*/
- int (*buffer_set_fence_reg)(struct intel_winsys *iws,
- struct intel_buffer *buffer,
+ int (*buffer_set_fence_reg)(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer,
unsigned stride,
- enum intel_buffer_tile tile);
+ enum i915_winsys_buffer_tile tile);
/**
* Map a buffer.
*/
- void *(*buffer_map)(struct intel_winsys *iws,
- struct intel_buffer *buffer,
+ void *(*buffer_map)(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer,
boolean write);
/**
* Unmap a buffer.
*/
- void (*buffer_unmap)(struct intel_winsys *iws,
- struct intel_buffer *buffer);
+ void (*buffer_unmap)(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer);
/**
* Write to a buffer.
*
* Arguments follows pipe_buffer_write.
*/
- int (*buffer_write)(struct intel_winsys *iws,
- struct intel_buffer *dst,
+ int (*buffer_write)(struct i915_winsys *iws,
+ struct i915_winsys_buffer *dst,
size_t offset,
size_t size,
const void *data);
- void (*buffer_destroy)(struct intel_winsys *iws,
- struct intel_buffer *buffer);
+ void (*buffer_destroy)(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer);
/*@}*/
@@ -193,20 +196,20 @@ struct intel_winsys {
/**
* Reference fence and set ptr to fence.
*/
- void (*fence_reference)(struct intel_winsys *iws,
+ void (*fence_reference)(struct i915_winsys *iws,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *fence);
/**
* Check if a fence has finished.
*/
- int (*fence_signalled)(struct intel_winsys *iws,
+ int (*fence_signalled)(struct i915_winsys *iws,
struct pipe_fence_handle *fence);
/**
* Wait on a fence to finish.
*/
- int (*fence_finish)(struct intel_winsys *iws,
+ int (*fence_finish)(struct i915_winsys *iws,
struct pipe_fence_handle *fence);
/*@}*/
@@ -214,14 +217,14 @@ struct intel_winsys {
/**
* Destroy the winsys.
*/
- void (*destroy)(struct intel_winsys *iws);
+ void (*destroy)(struct i915_winsys *iws);
};
/**
* Create i915 pipe_screen.
*/
-struct pipe_screen *i915_create_screen(struct intel_winsys *iws, unsigned pci_id);
+struct pipe_screen *i915_create_screen(struct i915_winsys *iws, unsigned pci_id);
#endif