summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-30 15:35:58 +0000
committerKeith Whitwell <[email protected]>2009-11-30 15:37:27 +0000
commit6781f624af8b06061673f3fd6f19ffb6a56c3e8c (patch)
treed186b60c377446ab3233379af5341330323fe499 /src/gallium/winsys
parent1fd3a2773b83c6b893b220a4e449f34e73adfe0b (diff)
i965g: pass backbuffer tiling information to driver
The gem winsys gets this information, needs to pass it on.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/drm/i965/gem/i965_drm_api.c10
-rw-r--r--src/gallium/winsys/drm/i965/gem/i965_drm_winsys.h8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_api.c b/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
index 5172b5410b4..fc9678d2b62 100644
--- a/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
+++ b/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
@@ -42,7 +42,7 @@ i965_libdrm_buffer_from_handle(struct i965_libdrm_winsys *idws,
const char* name, unsigned handle)
{
struct i965_libdrm_buffer *buf = CALLOC_STRUCT(i965_libdrm_buffer);
- uint32_t tile = 0, swizzle = 0;
+ uint32_t swizzle = 0;
if (BRW_DUMP)
debug_printf("%s\n", __FUNCTION__);
@@ -60,8 +60,8 @@ i965_libdrm_buffer_from_handle(struct i965_libdrm_winsys *idws,
if (!buf->bo)
goto err;
- drm_intel_bo_get_tiling(buf->bo, &tile, &swizzle);
- if (tile != 0)
+ drm_intel_bo_get_tiling(buf->bo, &buf->tiling, &swizzle);
+ if (buf->tiling != 0)
buf->map_gtt = TRUE;
return buf;
@@ -100,7 +100,9 @@ i965_libdrm_texture_from_shared_handle(struct drm_api *api,
if (!buffer)
return NULL;
- return brw_texture_blanket_winsys_buffer(screen, template, pitch, &buffer->base);
+ return brw_texture_blanket_winsys_buffer(screen, template, pitch,
+ buffer->tiling,
+ &buffer->base);
}
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_winsys.h b/src/gallium/winsys/drm/i965/gem/i965_drm_winsys.h
index 235eaf68fa2..c6a7d4a8c51 100644
--- a/src/gallium/winsys/drm/i965/gem/i965_drm_winsys.h
+++ b/src/gallium/winsys/drm/i965/gem/i965_drm_winsys.h
@@ -46,14 +46,12 @@ struct i965_libdrm_buffer {
void *ptr;
unsigned map_count;
- boolean map_gtt;
+ unsigned data_type; /* valid while mapped */
+ unsigned tiling;
+ boolean map_gtt;
boolean flinked;
unsigned flink;
-
- unsigned data_type; /* valid while mapped */
-
- unsigned cheesy_refcount;
};
static INLINE struct i965_libdrm_buffer *