summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/drm
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-03-21 21:34:57 +0100
committerMarek Olšák <[email protected]>2010-03-21 21:54:06 +0100
commit33d2349119ada410dbfbaa667fc7aef8b60d1a6f (patch)
treeac8216a71e0eab472efdb14c8f785dce9cbcd8b6 /src/gallium/winsys/drm
parentd0d3abd360a0d98302841e62ab9acdebea2ca8c2 (diff)
r300g: cleanup tiling flags propagation
Diffstat (limited to 'src/gallium/winsys/drm')
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_buffer.h5
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c9
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_r300.c4
3 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.h b/src/gallium/winsys/drm/radeon/core/radeon_buffer.h
index 3d14c861dfa..218a3763018 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.h
+++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.h
@@ -72,7 +72,10 @@ void radeon_drm_bufmgr_write_reloc(struct pb_buffer *_buf,
struct pb_buffer *radeon_drm_bufmgr_create_buffer_from_handle(struct pb_manager *_mgr,
uint32_t handle);
-void radeon_drm_bufmgr_set_tiling(struct pb_buffer *_buf, boolean microtiled, boolean macrotiled, uint32_t pitch);
+void radeon_drm_bufmgr_set_tiling(struct pb_buffer *_buf,
+ enum r300_buffer_tiling microtiled,
+ enum r300_buffer_tiling macrotiled,
+ uint32_t pitch);
void radeon_drm_bufmgr_flush_maps(struct pb_manager *_mgr);
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c
index a8a7c45a96f..0a86acc2284 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c
@@ -306,13 +306,16 @@ boolean radeon_drm_bufmgr_get_handle(struct pb_buffer *_buf,
}
-void radeon_drm_bufmgr_set_tiling(struct pb_buffer *_buf, boolean microtiled, boolean macrotiled, uint32_t pitch)
+void radeon_drm_bufmgr_set_tiling(struct pb_buffer *_buf,
+ enum r300_buffer_tiling microtiled,
+ enum r300_buffer_tiling macrotiled,
+ uint32_t pitch)
{
struct radeon_drm_buffer *buf = get_drm_buffer(_buf);
uint32_t flags = 0, old_flags, old_pitch;
- if (microtiled)
+ if (microtiled == R300_BUFFER_TILED)
flags |= RADEON_BO_FLAGS_MICRO_TILE;
- if (macrotiled)
+ if (macrotiled == R300_BUFFER_TILED)
flags |= RADEON_BO_FLAGS_MACRO_TILE;
radeon_bo_get_tiling(buf->bo, &old_flags, &old_pitch);
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_r300.c b/src/gallium/winsys/drm/radeon/core/radeon_r300.c
index 62d66d31dc1..0c0fee1586c 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_r300.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_r300.c
@@ -65,8 +65,8 @@ static void radeon_r300_winsys_buffer_destroy(struct r300_winsys_buffer *buf)
static void radeon_r300_winsys_buffer_set_tiling(struct r300_winsys_screen *rws,
struct r300_winsys_buffer *buf,
uint32_t pitch,
- boolean microtiled,
- boolean macrotiled)
+ enum r300_buffer_tiling microtiled,
+ enum r300_buffer_tiling macrotiled)
{
struct pb_buffer *_buf = radeon_pb_buffer(buf);
radeon_drm_bufmgr_set_tiling(_buf, microtiled, macrotiled, pitch);