diff options
author | Marek Olšák <[email protected]> | 2010-12-23 19:40:54 +1000 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-02-11 01:07:25 +0100 |
commit | 6ccab620a0e7364ab6c0d902b3ddf58ee988f7fa (patch) | |
tree | 6228427e261efd6187915ab651b78f99d3ff7dd1 /src/gallium/drivers/r300/r300_state.c | |
parent | c0beaf6e6d5764531a4cb21d0d0a9a1fd09affee (diff) |
r300g: import the last bits of libdrm and cleanup the whole thing
Based on Dave's branch.
The majority of this commit is a cleanup, mainly renaming things.
There wasn't much code to import, just ioctl calls.
Also done:
- implemented unsynchronized bo_map (important optimization!)
- radeon_bo_is_referenced_by_cs is no longer a refcount hack
- dropped the libdrm_radeon dependency
I'm surprised that this has resulted in less code in the end.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index f0b4ad57bfc..2ec96003795 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -616,7 +616,8 @@ static void r300_set_stencil_ref(struct pipe_context* pipe, } static void r300_tex_set_tiling_flags(struct r300_context *r300, - struct r300_resource *tex, unsigned level) + struct r300_resource *tex, + unsigned level) { /* Check if the macrotile flag needs to be changed. * Skip changing the flags otherwise. */ @@ -624,11 +625,10 @@ static void r300_tex_set_tiling_flags(struct r300_context *r300, tex->tex.macrotile[level]) { /* Tiling determines how DRM treats the buffer data. * We must flush CS when changing it if the buffer is referenced. */ - if (r300->rws->cs_is_buffer_referenced(r300->cs, - tex->cs_buf, R300_REF_CS)) + if (r300->rws->cs_is_buffer_referenced(r300->cs, tex->cs_buf)) r300->context.flush(&r300->context, 0, NULL); - r300->rws->buffer_set_tiling(r300->rws, tex->buf, + r300->rws->buffer_set_tiling(tex->buf, tex->tex.microtile, tex->tex.macrotile[level], tex->tex.stride_in_bytes[0]); |