From 4c7001462607e6e99e474d6271dd481d3f8f201c Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Thu, 2 Dec 2010 04:33:43 +0100 Subject: gallium: support for array textures and related changes resources have a array_size parameter now. get_tex_surface and tex_surface_destroy have been renamed to create_surface and surface_destroy and moved to context, similar to sampler views (and create_surface now uses a template just like create_sampler_view). Surfaces now really should only be used for rendering. In particular they shouldn't be used as some kind of 2d abstraction for sharing a texture. offset/layout fields don't make sense any longer and have been removed, width/height should go too. surfaces and sampler views now specify a layer range (for texture resources), layer is either array slice, depth slice or cube face. pipe_subresource is gone array slices (or cube faces) are now treated the same as depth slices in transfers etc. (that is, they use the z coord of the respective functions). Squashed commit of the following: commit a45bd509014743d21a532194d7b658a1aeb00cb7 Merge: 1aeca28 32e1e59 Author: Roland Scheidegger Date: Thu Dec 2 04:32:06 2010 +0100 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/drivers/i915/i915_resource_texture.c src/gallium/drivers/i915/i915_state_emit.c src/gallium/drivers/i915/i915_surface.c commit 1aeca287a827f29206078fa1204715a477072c08 Merge: 912f042 6f7c8c3 Author: Roland Scheidegger Date: Thu Dec 2 00:37:11 2010 +0100 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/state_trackers/vega/api_filters.c src/gallium/state_trackers/vega/api_images.c src/gallium/state_trackers/vega/mask.c src/gallium/state_trackers/vega/paint.c src/gallium/state_trackers/vega/renderer.c src/gallium/state_trackers/vega/st_inlines.h src/gallium/state_trackers/vega/vg_context.c src/gallium/state_trackers/vega/vg_manager.c commit 912f042e1d439de17b36be9a740358c876fcd144 Author: Roland Scheidegger Date: Wed Dec 1 03:01:55 2010 +0100 gallium: even more compile fixes after merge commit 6fc95a58866d2a291def333608ba9c10c3f07e82 Author: Roland Scheidegger Date: Wed Dec 1 00:22:26 2010 +0100 gallium: some fixes after merge commit a8d5ffaeb5397ffaa12fb422e4e7efdf0494c3e2 Merge: f7a202f 2da02e7 Author: Roland Scheidegger Date: Tue Nov 30 23:41:26 2010 +0100 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/drivers/i915/i915_state_emit.c src/gallium/state_trackers/vega/api_images.c src/gallium/state_trackers/vega/vg_context.c commit f7a202fde2aea2ec78ef58830f945a5e214e56ab Author: Roland Scheidegger Date: Wed Nov 24 19:19:32 2010 +0100 gallium: even more fixes/cleanups after merge commit 6895a7f969ed7f9fa8ceb788810df8dbcf04c4c9 Author: Roland Scheidegger Date: Wed Nov 24 03:07:36 2010 +0100 gallium: more compile fixes after merge commit af0501a5103b9756bc4d79167bd81051ad6e8670 Author: Roland Scheidegger Date: Tue Nov 23 19:24:45 2010 +0100 gallium: lots of compile fixes after merge commit 0332003c2feb60f2a20e9a40368180c4ecd33e6b Merge: 26c6346 b6b91fa Author: Roland Scheidegger Date: Tue Nov 23 17:02:26 2010 +0100 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/auxiliary/gallivm/lp_bld_sample.c src/gallium/auxiliary/util/u_blit.c src/gallium/auxiliary/util/u_blitter.c src/gallium/auxiliary/util/u_inlines.h src/gallium/auxiliary/util/u_surface.c src/gallium/auxiliary/util/u_surfaces.c src/gallium/docs/source/context.rst src/gallium/drivers/llvmpipe/lp_rast.c src/gallium/drivers/nv50/nv50_state_validate.c src/gallium/drivers/nvfx/nv04_surface_2d.c src/gallium/drivers/nvfx/nv04_surface_2d.h src/gallium/drivers/nvfx/nvfx_buffer.c src/gallium/drivers/nvfx/nvfx_miptree.c src/gallium/drivers/nvfx/nvfx_resource.c src/gallium/drivers/nvfx/nvfx_resource.h src/gallium/drivers/nvfx/nvfx_state_fb.c src/gallium/drivers/nvfx/nvfx_surface.c src/gallium/drivers/nvfx/nvfx_transfer.c src/gallium/drivers/r300/r300_state_derived.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/r600/r600_blit.c src/gallium/drivers/r600/r600_buffer.c src/gallium/drivers/r600/r600_context.h src/gallium/drivers/r600/r600_screen.c src/gallium/drivers/r600/r600_screen.h src/gallium/drivers/r600/r600_state.c src/gallium/drivers/r600/r600_texture.c src/gallium/include/pipe/p_defines.h src/gallium/state_trackers/egl/common/egl_g3d_api.c src/gallium/state_trackers/glx/xlib/xm_st.c src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c src/gallium/targets/libgl-gdi/libgl_gdi.c src/gallium/tests/graw/tri.c src/mesa/state_tracker/st_cb_blit.c src/mesa/state_tracker/st_cb_readpixels.c commit 26c6346b385929fba94775f33838d0cceaaf1127 Author: Roland Scheidegger Date: Mon Aug 2 19:37:21 2010 +0200 fix more merge breakage commit b30d87c6025eefe7f6979ffa8e369bbe755d5c1d Merge: 9461bf3 1f1928d Author: Roland Scheidegger Date: Mon Aug 2 19:15:38 2010 +0200 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/drivers/llvmpipe/lp_rast.c src/gallium/drivers/llvmpipe/lp_rast_priv.h src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_screen_buffer.c src/gallium/drivers/r300/r300_state_derived.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/r300/r300_texture.h src/gallium/drivers/r300/r300_transfer.c src/gallium/drivers/r600/r600_screen.c src/gallium/drivers/r600/r600_state.c src/gallium/drivers/r600/r600_texture.c src/gallium/drivers/r600/r600_texture.h src/gallium/state_trackers/dri/common/dri1_helper.c src/gallium/state_trackers/dri/sw/drisw.c src/gallium/state_trackers/xorg/xorg_exa.c commit 9461bf3cfb647d2301364ae29fc3084fff52862a Merge: 17492d7 0eaccb3 Author: Roland Scheidegger Date: Thu Jul 15 20:13:45 2010 +0200 Merge commit 'origin/master' into gallium-array-textures Conflicts: src/gallium/auxiliary/util/u_blitter.c src/gallium/drivers/llvmpipe/lp_rast.c src/gallium/drivers/llvmpipe/lp_surface.c src/gallium/drivers/r300/r300_render.c src/gallium/drivers/r300/r300_state.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/r300/r300_transfer.c src/gallium/tests/trivial/quad-tex.c commit 17492d705e7b7f607b71db045c3bf344cb6842b3 Author: Roland Scheidegger Date: Fri Jun 18 10:58:08 2010 +0100 gallium: rename element_offset/width fields in views to first/last_element This is much more consistent with the other fields used there (first/last level, first/last layer). Actually thinking about removing the ugly union/structs again and rename first/last_layer to something even more generic which could also be used for buffers (like first/last_member) without inducing headaches. commit 1b717a289299f942de834dcccafbab91361e20ab Author: Roland Scheidegger Date: Thu Jun 17 14:46:09 2010 +0100 gallium: remove PIPE_SURFACE_LAYOUT_LINEAR definition This was only used by the layout field of pipe_surface, but this driver internal stuff is gone so there's no need for this driver independent layout definition neither. commit 10cb644b31b3ef47e6c7b55e514ad24bb891fac4 Merge: 5691db9 c85971d Author: Roland Scheidegger Date: Thu Jun 17 12:20:41 2010 +0100 Merge commit 'origin/master' into gallium-array-textures Conflicts: src/gallium/docs/source/glossary.rst src/gallium/tests/graw/fs-test.c src/gallium/tests/graw/gs-test.c commit 5691db960ca3d525ce7d6c32d9c7a28f5e907f3b Author: Roland Scheidegger Date: Thu Jun 17 11:29:03 2010 +0100 st/wgl: fix interface changes bugs commit 2303ec32143d363b46e59e4b7c91b0ebd34a16b2 Author: Roland Scheidegger Date: Wed Jun 16 19:42:32 2010 +0100 gallium: adapt code to interface changes... commit dcae4f586f0d0885b72674a355e5d56d47afe77d Author: Roland Scheidegger Date: Wed Jun 16 19:42:05 2010 +0100 gallium: separate depth0 and array_size in the resource itself. These fields are still mutually exclusive (since no 3d array textures exist) but it ultimately seemed to error-prone to adapt all code accept the new meaning of depth0 (drivers stick that into hardware regs, calculate mipmap sizes etc.). And it isn't really cleaner anyway. So, array textures will have depth0 of 1, but instead use array_size, 3D textures will continue to use depth0 (and have array_size of 1). Cube maps also will use array_size to indicate their 6 faces, but since all drivers should just be fine by inferring this themselves from the fact it's a cube map as they always used to nothing should break. commit 621737a638d187d208712250fc19a91978fdea6b Author: Roland Scheidegger Date: Wed Jun 16 17:47:38 2010 +0100 gallium: adapt code to interface changes There are still usages of pipe_surface where pipe_resource should be used, which should eventually be fixed. commit 2d17f5efe166b2c3d51957c76294165ab30b8ae2 Author: Roland Scheidegger Date: Wed Jun 16 17:46:14 2010 +0100 gallium: more interface changes In particular to enable usage of buffers in views, and ability to use a different pipe_format in pipe_surface. Get rid of layout and offset parameter in pipe_surface - the former was not used in any (public) code anyway, and the latter should either be computed on-demand or driver can use subclass of pipe_surface. Also make create_surface() use a template to be more consistent with other functions. commit 71f885ee16aa5cf2742c44bfaf0dc5b8734b9901 Merge: 3232d11 8ad410d Author: Roland Scheidegger Date: Mon Jun 14 14:19:51 2010 +0100 Merge commit 'origin/master' into gallium-array-textures Conflicts: src/gallium/auxiliary/util/u_box.h src/gallium/drivers/nv50/nv50_surface.c src/gallium/drivers/nvfx/nvfx_surface.c src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/r300/r300_transfer.c src/gallium/drivers/r600/r600_blit.c src/gallium/drivers/r600/r600_screen.h src/gallium/include/pipe/p_state.h commit 3232d11fe3ebf7686286013c357b404714853984 Author: Roland Scheidegger Date: Mon Jun 14 11:40:04 2010 +0100 mesa/st: adapt to interface changes still need to fix pipe_surface sharing (as that is now per-context). Also broken is depth0 handling - half the code assumes this is also used for array textures (and hence by extension of that cube maps would have depth 6), half the code does not... commit f433b7f7f552720e5eade0b4078db94590ee85e1 Author: Roland Scheidegger Date: Mon Jun 14 11:35:52 2010 +0100 gallium: fix a couple of bugs in interface chnage fixes commit 818366b28ea18f514dc791646248ce6f08d9bbcf Author: Roland Scheidegger Date: Sat Jun 12 02:42:11 2010 +0200 targets: adapt to interface changes Yes even that needs adjustments... commit 66c511ab1682c9918e0200902039247793acb41e Author: Roland Scheidegger Date: Sat Jun 12 02:41:13 2010 +0200 tests: adapt to interface changes Everything needs to be fixed :-(. commit 6b494635d9dbdaa7605bc87b1ebf682b138c5808 Author: Roland Scheidegger Date: Sat Jun 12 02:39:50 2010 +0200 st: adapt non-rendering state trackers to interface changes might not be quite right in all places, but they really don't want to use pipe_surface. commit 00c4289a35d86e4fe85919ec32aa9f5ffe69d16d Author: Roland Scheidegger Date: Sat Jun 12 02:38:48 2010 +0200 winsys: adapt to interface changes commit 39d858554dc9ed5dbc795626fec3ef9deae552a0 Author: Roland Scheidegger Date: Sat Jun 12 02:26:54 2010 +0200 st/python: adapt to interface changes don't think that will work, sorry. commit 6e9336bc49b32139cec4e683857d0958000e15e3 Author: Roland Scheidegger Date: Sat Jun 12 02:26:07 2010 +0200 st/vega: adapt to interface changes commit e07f2ae9aaf8842757d5d50865f76f8276245e11 Author: Roland Scheidegger Date: Sat Jun 12 02:25:56 2010 +0200 st/xorg: adapt to interface changes commit 05531c10a74a4358103e30d3b38a5eceb25c947f Author: Roland Scheidegger Date: Sat Jun 12 02:24:53 2010 +0200 nv50: adapt to interface changes commit 97704f388d7042121c6d496ba8c003afa3ea2bf3 Author: Roland Scheidegger Date: Sat Jun 12 02:24:45 2010 +0200 nvfx: adapt to interface changes commit a8a9c93d703af6e8f5c12e1cea9ec665add1abe0 Author: Roland Scheidegger Date: Sat Jun 12 02:24:01 2010 +0200 i965g: adapt to interface changes commit 0dde209589872d20cc34ed0b237e3ed7ae0e2de3 Author: Roland Scheidegger Date: Sat Jun 12 02:22:38 2010 +0200 i915g: adapt to interface changes commit 5cac9beede69d12f5807ee1a247a4c864652799e Author: Roland Scheidegger Date: Sat Jun 12 02:20:58 2010 +0200 svga: adapt to interface changes resource_copy_region still looking fishy. Was not very suited to unified zslice/face approach... commit 08b5a6af4b963a3e4c75fc336bf6c0772dce5150 Author: Roland Scheidegger Date: Sat Jun 12 02:20:01 2010 +0200 rbug: adapt to interface changes Not sure if that won't need changes elsewhere? commit c9fd24b1f586bcef2e0a6e76b68e40fca3408964 Author: Roland Scheidegger Date: Sat Jun 12 02:19:31 2010 +0200 trace: adapt to interface changes commit ed84e010afc5635a1a47390b32247a266f65b8d1 Author: Roland Scheidegger Date: Sat Jun 12 02:19:21 2010 +0200 failover: adapt to interface changes commit a1d4b4a293da933276908e3393435ec4b43cf201 Author: Roland Scheidegger Date: Sat Jun 12 02:19:12 2010 +0200 identity: adapt to interface changes commit a8dd73e2c56c7d95ffcf174408f38f4f35fd2f4c Author: Roland Scheidegger Date: Sat Jun 12 02:18:55 2010 +0200 softpipe: adapt to interface changes commit a886085893e461e8473978e8206ec2312b7077ff Author: Roland Scheidegger Date: Sat Jun 12 02:18:44 2010 +0200 llvmpipe: adapt to interface changes commit 70523f6d567d8b7cfda682157556370fd3c43460 Author: Roland Scheidegger Date: Sat Jun 12 02:18:14 2010 +0200 r600g: adapt to interface changes commit 3f4bc72bd80994865eb9f6b8dfd11e2b97060d19 Author: Roland Scheidegger Date: Sat Jun 12 02:18:05 2010 +0200 r300g: adapt to interface changes commit 5d353b55ee14db0ac0515b5a3cf9389430832c19 Author: Roland Scheidegger Date: Sat Jun 12 02:17:37 2010 +0200 cell: adapt to interface changes not even compile tested commit cf5d03601322c2dcb12d7a9c2f1745e2b2a35eb4 Author: Roland Scheidegger Date: Sat Jun 12 02:14:59 2010 +0200 util: adapt to interface changes amazing how much code changes just due to some subtle interface changes? commit dc98d713c6937c0e177fc2caf23020402cc7ea7b Author: Roland Scheidegger Date: Sat Jun 12 02:12:40 2010 +0200 gallium: more interface fail, docs this also changes flush_frontbuffer to use a pipe_resource instead of a pipe_surface - pipe_surface is not meant to be (or at least no longer) an abstraction for standalone 2d images which get passed around. (This has also implications for the non-rendering state-trackers.) commit 08436d27ddd59857c22827c609b692aa0c407b7b Author: Roland Scheidegger Date: Thu Jun 10 17:42:52 2010 +0200 gallium: fix array texture interface changes bugs, docs commit 4a4d927609b62b4d7fb9dffa35158afe282f277b Author: Roland Scheidegger Date: Thu Jun 3 22:02:44 2010 +0200 gallium: interface changes for array textures and related cleanups This patch introduces array textures to gallium (note they are not immediately usable without the associated changes to the shader side). Also, this abandons pipe_subresource in favor of using level and layer parameters since the distinction between several faces (which was part of pipe_subresource for cube textures) and several z slices (which were not part of pipe_subresource but instead part of pipe_box where appropriate for 3d textures) is gone at the resource level. Textures, be it array, cube, or 3d, now use a "unified" set of parameters, there is no distinction between array members, cube faces, or 3d zslices. This is unlike d3d10, whose subresource index includes layer information for array textures, but which considers all z slices of a 3d texture to be part of the same subresource. In contrast to d3d10, OpenGL though reuses old 2d and 3d function entry points for 1d and 2d array textures, respectively, which also implies that for instance it is possible to specify all layers of a 2d array texture at once (note that this is not possible for cube maps, which use the 2d entry points, although it is possible for cube map arrays, which aren't supported yet in gallium). This should possibly make drivers a bit simpler, and also get rid of mutually exclusive parameters in some functions (as z and face were exclusive), one potential downside would be that 3d array textures could not easily be supported without reverting this, but those are nowhere to be seen. Also along with adjusting to new parameters, rename get_tex_surface / tex_surface_destroy to create_surface / surface_destroy and move them from screen to context, which reflects much better what those do (they are analogous to create_sampler_view / sampler_view_destroy). PIPE_CAP_ARRAY_TEXTURES is used to indicate if a driver supports all of this functionality (that is, both sampling from array texture as well as use a range of layers as a render target, with selecting the layer from the geometry shader). --- src/gallium/drivers/r300/r300_transfer.c | 54 ++++++++++++++------------------ 1 file changed, 23 insertions(+), 31 deletions(-) (limited to 'src/gallium/drivers/r300/r300_transfer.c') diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c index e9333b35ef..755aff8380 100644 --- a/src/gallium/drivers/r300/r300_transfer.c +++ b/src/gallium/drivers/r300/r300_transfer.c @@ -27,6 +27,7 @@ #include "util/u_memory.h" #include "util/u_format.h" +#include "util/u_box.h" struct r300_transfer { /* Parent class */ @@ -52,16 +53,10 @@ static void r300_copy_from_tiled_texture(struct pipe_context *ctx, { struct pipe_transfer *transfer = (struct pipe_transfer*)r300transfer; struct pipe_resource *tex = transfer->resource; - struct pipe_subresource subdst; - subdst.face = 0; - subdst.level = 0; - - ctx->resource_copy_region(ctx, &r300transfer->linear_texture->desc.b.b, subdst, - 0, 0, 0, - tex, transfer->sr, - transfer->box.x, transfer->box.y, transfer->box.z, - transfer->box.width, transfer->box.height); + ctx->resource_copy_region(ctx, &r300transfer->linear_texture->desc.b.b, 0, + 0, 0, 0, + tex, transfer->level, &transfer->box); } /* Copy a detiled texture to a tiled one. */ @@ -70,26 +65,22 @@ static void r300_copy_into_tiled_texture(struct pipe_context *ctx, { struct pipe_transfer *transfer = (struct pipe_transfer*)r300transfer; struct pipe_resource *tex = transfer->resource; - struct pipe_subresource subsrc; - - subsrc.face = 0; - subsrc.level = 0; + struct pipe_box src_box; + u_box_origin_2d(transfer->box.width, transfer->box.height, &src_box); - ctx->resource_copy_region(ctx, tex, transfer->sr, - transfer->box.x, transfer->box.y, transfer->box.z, - &r300transfer->linear_texture->desc.b.b, subsrc, - 0, 0, 0, - transfer->box.width, transfer->box.height); + ctx->resource_copy_region(ctx, tex, transfer->level, + transfer->box.x, transfer->box.y, transfer->box.z, + &r300transfer->linear_texture->desc.b.b, 0, &src_box); ctx->flush(ctx, 0, NULL); } struct pipe_transfer* r300_texture_get_transfer(struct pipe_context *ctx, - struct pipe_resource *texture, - struct pipe_subresource sr, - unsigned usage, - const struct pipe_box *box) + struct pipe_resource *texture, + unsigned level, + unsigned usage, + const struct pipe_box *box) { struct r300_context *r300 = r300_context(ctx); struct r300_texture *tex = r300_texture(texture); @@ -116,25 +107,27 @@ r300_texture_get_transfer(struct pipe_context *ctx, if (trans) { /* Initialize the transfer object. */ pipe_resource_reference(&trans->transfer.resource, texture); - trans->transfer.sr = sr; + trans->transfer.level = level; trans->transfer.usage = usage; trans->transfer.box = *box; /* If the texture is tiled, we must create a temporary detiled texture * for this transfer. * Also make write transfers pipelined. */ - if (tex->desc.microtile || tex->desc.macrotile[sr.level] || + if (tex->desc.microtile || tex->desc.macrotile[level] || ((referenced_hw & !(usage & PIPE_TRANSFER_READ)) && blittable)) { base.target = PIPE_TEXTURE_2D; base.format = texture->format; base.width0 = box->width; base.height0 = box->height; - base.depth0 = 0; + /* XXX: was depth0 = 0 */ + base.depth0 = 1; + base.array_size = 1; base.last_level = 0; base.nr_samples = 0; base.usage = PIPE_USAGE_DYNAMIC; base.bind = 0; - base.flags = R300_RESOURCE_FLAG_TRANSFER; + base.flags = R300_RESOURCE_FLAG_TRANSFER; /* For texture reading, the temporary (detiled) texture is used as * a render target when blitting from a tiled texture. */ @@ -164,7 +157,7 @@ r300_texture_get_transfer(struct pipe_context *ctx, if (!trans->linear_texture) { /* For linear textures, it's safe to fallback to * an unpipelined transfer. */ - if (!tex->desc.microtile && !tex->desc.macrotile[sr.level]) { + if (!tex->desc.microtile && !tex->desc.macrotile[level]) { goto unpipelined; } @@ -182,7 +175,7 @@ r300_texture_get_transfer(struct pipe_context *ctx, /* Set the stride. * * Even though we are using an internal texture for this, - * the transfer sr, box and usage parameters still reflect + * the transfer level, box and usage parameters still reflect * the arguments received to get_transfer. We just do the * right thing internally. */ @@ -202,9 +195,8 @@ r300_texture_get_transfer(struct pipe_context *ctx, unpipelined: /* Unpipelined transfer. */ - trans->transfer.stride = tex->desc.stride_in_bytes[sr.level]; - trans->offset = r300_texture_get_offset(&tex->desc, - sr.level, box->z, sr.face); + trans->transfer.stride = tex->desc.stride_in_bytes[level]; + trans->offset = r300_texture_get_offset(&tex->desc, level, box->z); if (referenced_cs) ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL); -- cgit v1.2.3 From 3ba8843307a909f35f2a04e6be6dcadd760ad82b Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 3 Dec 2010 02:48:11 +0100 Subject: r300g: use internal BO handle for add_buffer and write_reloc Small perf improvement in ipers. radeon_drm_get_cs_handle is exactly what this commit tries to avoid in every write_reloc. --- src/gallium/drivers/r300/r300_context.h | 3 ++ src/gallium/drivers/r300/r300_cs.h | 6 ++-- src/gallium/drivers/r300/r300_emit.c | 36 +++++++++++------------ src/gallium/drivers/r300/r300_query.c | 1 + src/gallium/drivers/r300/r300_screen_buffer.c | 7 ++++- src/gallium/drivers/r300/r300_screen_buffer.h | 7 ++--- src/gallium/drivers/r300/r300_state.c | 2 +- src/gallium/drivers/r300/r300_texture.c | 5 +++- src/gallium/drivers/r300/r300_transfer.c | 4 +-- src/gallium/drivers/r300/r300_winsys.h | 13 +++++--- src/gallium/winsys/radeon/drm/radeon_buffer.h | 10 +++++-- src/gallium/winsys/radeon/drm/radeon_drm_buffer.c | 31 ++++++++++++------- src/gallium/winsys/radeon/drm/radeon_r300.c | 1 + 13 files changed, 77 insertions(+), 49 deletions(-) (limited to 'src/gallium/drivers/r300/r300_transfer.c') diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 2b97e4f8e2..93c20a0a6a 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -282,6 +282,7 @@ struct r300_query { /* The buffer where query results are stored. */ struct r300_winsys_buffer *buffer; + struct r300_winsys_cs_buffer *cs_buffer; /* The size of the buffer. */ unsigned buffer_size; /* The domain of the buffer. */ @@ -313,6 +314,7 @@ struct r300_surface { /* Winsys buffer backing the texture. */ struct r300_winsys_buffer *buffer; + struct r300_winsys_cs_buffer *cs_buffer; enum r300_buffer_domain domain; @@ -396,6 +398,7 @@ struct r300_texture { /* Pipe buffer backing this texture. */ struct r300_winsys_buffer *buffer; + struct r300_winsys_cs_buffer *cs_buffer; /* Registers carrying texture format data. */ /* Only format-independent bits should be filled in. */ diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h index c194d6a1b0..ea29fc565b 100644 --- a/src/gallium/drivers/r300/r300_cs.h +++ b/src/gallium/drivers/r300/r300_cs.h @@ -115,17 +115,17 @@ #define OUT_CS_BUF_RELOC(bo, offset, rd, wd) do { \ assert(bo); \ - OUT_CS_RELOC(r300_buffer(bo)->buf, offset, rd, wd); \ + OUT_CS_RELOC(r300_buffer(bo)->cs_buf, offset, rd, wd); \ } while (0) #define OUT_CS_TEX_RELOC(tex, offset, rd, wd) do { \ assert(tex); \ - OUT_CS_RELOC(tex->buffer, offset, rd, wd); \ + OUT_CS_RELOC(tex->cs_buffer, offset, rd, wd); \ } while (0) #define OUT_CS_BUF_RELOC_NO_OFFSET(bo, rd, wd) do { \ assert(bo); \ - cs_winsys->cs_write_reloc(cs_copy, r300_buffer(bo)->buf, rd, wd); \ + cs_winsys->cs_write_reloc(cs_copy, r300_buffer(bo)->cs_buf, rd, wd); \ CS_DEBUG(cs_count -= 2;) \ } while (0) diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 3e6852b779..31c7b38adf 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -353,10 +353,10 @@ void r300_emit_aa_state(struct r300_context *r300, unsigned size, void *state) if (aa->dest) { OUT_CS_REG_SEQ(R300_RB3D_AARESOLVE_OFFSET, 1); - OUT_CS_RELOC(aa->dest->buffer, aa->dest->offset, 0, aa->dest->domain); + OUT_CS_RELOC(aa->dest->cs_buffer, aa->dest->offset, 0, aa->dest->domain); OUT_CS_REG_SEQ(R300_RB3D_AARESOLVE_PITCH, 1); - OUT_CS_RELOC(aa->dest->buffer, aa->dest->pitch, 0, aa->dest->domain); + OUT_CS_RELOC(aa->dest->cs_buffer, aa->dest->pitch, 0, aa->dest->domain); } OUT_CS_REG(R300_RB3D_AARESOLVE_CTL, aa->aaresolve_ctl); @@ -387,10 +387,10 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state) surf = r300_surface(fb->cbufs[i]); OUT_CS_REG_SEQ(R300_RB3D_COLOROFFSET0 + (4 * i), 1); - OUT_CS_RELOC(surf->buffer, surf->offset, 0, surf->domain); + OUT_CS_RELOC(surf->cs_buffer, surf->offset, 0, surf->domain); OUT_CS_REG_SEQ(R300_RB3D_COLORPITCH0 + (4 * i), 1); - OUT_CS_RELOC(surf->buffer, surf->pitch, 0, surf->domain); + OUT_CS_RELOC(surf->cs_buffer, surf->pitch, 0, surf->domain); } /* Set up the ZB part of the CBZB clear. */ @@ -400,10 +400,10 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state) OUT_CS_REG(R300_ZB_FORMAT, surf->cbzb_format); OUT_CS_REG_SEQ(R300_ZB_DEPTHOFFSET, 1); - OUT_CS_RELOC(surf->buffer, surf->cbzb_midpoint_offset, 0, surf->domain); + OUT_CS_RELOC(surf->cs_buffer, surf->cbzb_midpoint_offset, 0, surf->domain); OUT_CS_REG_SEQ(R300_ZB_DEPTHPITCH, 1); - OUT_CS_RELOC(surf->buffer, surf->cbzb_pitch, 0, surf->domain); + OUT_CS_RELOC(surf->cs_buffer, surf->cbzb_pitch, 0, surf->domain); DBG(r300, DBG_CBZB, "CBZB clearing cbuf %08x %08x\n", surf->cbzb_format, @@ -416,10 +416,10 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state) OUT_CS_REG(R300_ZB_FORMAT, surf->format); OUT_CS_REG_SEQ(R300_ZB_DEPTHOFFSET, 1); - OUT_CS_RELOC(surf->buffer, surf->offset, 0, surf->domain); + OUT_CS_RELOC(surf->cs_buffer, surf->offset, 0, surf->domain); OUT_CS_REG_SEQ(R300_ZB_DEPTHPITCH, 1); - OUT_CS_RELOC(surf->buffer, surf->pitch, 0, surf->domain); + OUT_CS_RELOC(surf->cs_buffer, surf->pitch, 0, surf->domain); if (can_hyperz) { uint32_t surf_pitch; @@ -559,7 +559,7 @@ static void r300_emit_query_end_frag_pipes(struct r300_context *r300, struct r300_query *query) { struct r300_capabilities* caps = &r300->screen->caps; - struct r300_winsys_buffer *buf = r300->query_current->buffer; + struct r300_winsys_cs_buffer *buf = r300->query_current->cs_buffer; CS_LOCALS(r300); assert(caps->num_frag_pipes); @@ -615,7 +615,7 @@ static void r300_emit_query_end_frag_pipes(struct r300_context *r300, static void rv530_emit_query_end_single_z(struct r300_context *r300, struct r300_query *query) { - struct r300_winsys_buffer *buf = r300->query_current->buffer; + struct r300_winsys_cs_buffer *buf = r300->query_current->cs_buffer; CS_LOCALS(r300); BEGIN_CS(8); @@ -629,7 +629,7 @@ static void rv530_emit_query_end_single_z(struct r300_context *r300, static void rv530_emit_query_end_double_z(struct r300_context *r300, struct r300_query *query) { - struct r300_winsys_buffer *buf = r300->query_current->buffer; + struct r300_winsys_cs_buffer *buf = r300->query_current->cs_buffer; CS_LOCALS(r300); BEGIN_CS(14); @@ -1188,14 +1188,14 @@ boolean r300_emit_buffer_validate(struct r300_context *r300, for (i = 0; i < fb->nr_cbufs; i++) { tex = r300_texture(fb->cbufs[i]->texture); assert(tex && tex->buffer && "cbuf is marked, but NULL!"); - r300->rws->cs_add_buffer(r300->cs, tex->buffer, 0, + r300->rws->cs_add_buffer(r300->cs, tex->cs_buffer, 0, r300_surface(fb->cbufs[i])->domain); } /* ...depth buffer... */ if (fb->zsbuf) { tex = r300_texture(fb->zsbuf->texture); assert(tex && tex->buffer && "zsbuf is marked, but NULL!"); - r300->rws->cs_add_buffer(r300->cs, tex->buffer, 0, + r300->rws->cs_add_buffer(r300->cs, tex->cs_buffer, 0, r300_surface(fb->zsbuf)->domain); } /* ...textures... */ @@ -1205,28 +1205,28 @@ boolean r300_emit_buffer_validate(struct r300_context *r300, } tex = r300_texture(texstate->sampler_views[i]->base.texture); - r300->rws->cs_add_buffer(r300->cs, tex->buffer, tex->domain, 0); + r300->rws->cs_add_buffer(r300->cs, tex->cs_buffer, tex->domain, 0); } /* ...occlusion query buffer... */ if (r300->query_current) - r300->rws->cs_add_buffer(r300->cs, r300->query_current->buffer, + r300->rws->cs_add_buffer(r300->cs, r300->query_current->cs_buffer, 0, r300->query_current->domain); /* ...vertex buffer for SWTCL path... */ if (r300->vbo) - r300->rws->cs_add_buffer(r300->cs, r300_buffer(r300->vbo)->buf, + r300->rws->cs_add_buffer(r300->cs, r300_buffer(r300->vbo)->cs_buf, r300_buffer(r300->vbo)->domain, 0); /* ...vertex buffers for HWTCL path... */ if (do_validate_vertex_buffers) { for (i = 0; i < r300->velems->count; i++) { pbuf = vbuf[velem[i].vertex_buffer_index].buffer; - r300->rws->cs_add_buffer(r300->cs, r300_buffer(pbuf)->buf, + r300->rws->cs_add_buffer(r300->cs, r300_buffer(pbuf)->cs_buf, r300_buffer(pbuf)->domain, 0); } } /* ...and index buffer for HWTCL path. */ if (index_buffer) - r300->rws->cs_add_buffer(r300->cs, r300_buffer(index_buffer)->buf, + r300->rws->cs_add_buffer(r300->cs, r300_buffer(index_buffer)->cs_buf, r300_buffer(index_buffer)->domain, 0); if (!r300->rws->cs_validate(r300->cs)) { diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index 5f34fcb274..59cd1e7f79 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -60,6 +60,7 @@ static struct pipe_query *r300_create_query(struct pipe_context *pipe, q->buffer = r300->rws->buffer_create(r300->rws, q->buffer_size, 4096, PIPE_BIND_CUSTOM, PIPE_USAGE_STREAM, q->domain); + q->cs_buffer = r300->rws->buffer_get_cs_handle(r300->rws, q->buffer); return (struct pipe_query*)q; } diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c index 98d36ad272..9b1ee9e068 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.c +++ b/src/gallium/drivers/r300/r300_screen_buffer.c @@ -43,7 +43,7 @@ unsigned r300_buffer_is_referenced(struct pipe_context *context, if (r300_buffer_is_user_buffer(buf)) return PIPE_UNREFERENCED; - if (r300->rws->cs_is_buffer_referenced(r300->cs, rbuf->buf, domain)) + if (r300->rws->cs_is_buffer_referenced(r300->cs, rbuf->cs_buf, domain)) return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; return PIPE_UNREFERENCED; @@ -206,6 +206,9 @@ r300_buffer_transfer_map( struct pipe_context *pipe, rbuf->b.b.bind, rbuf->b.b.usage, rbuf->domain); + rbuf->cs_buf = + r300screen->rws->buffer_get_cs_handle(r300screen->rws, + rbuf->buf); break; } } @@ -310,6 +313,8 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen, rbuf->b.b.width0, alignment, rbuf->b.b.bind, rbuf->b.b.usage, rbuf->domain); + rbuf->cs_buf = + r300screen->rws->buffer_get_cs_handle(r300screen->rws, rbuf->buf); if (!rbuf->buf) { util_slab_free(&r300screen->pool_buffers, rbuf); diff --git a/src/gallium/drivers/r300/r300_screen_buffer.h b/src/gallium/drivers/r300/r300_screen_buffer.h index cafa9f96f2..a184ead3a3 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.h +++ b/src/gallium/drivers/r300/r300_screen_buffer.h @@ -51,6 +51,7 @@ struct r300_buffer uint32_t magic; struct r300_winsys_buffer *buf; + struct r300_winsys_cs_buffer *cs_buf; enum r300_buffer_domain domain; @@ -86,11 +87,7 @@ unsigned r300_buffer_is_referenced(struct pipe_context *context, static INLINE struct r300_buffer *r300_buffer(struct pipe_resource *buffer) { - if (buffer) { - assert(((struct r300_buffer *)buffer)->magic == R300_BUFFER_MAGIC); - return (struct r300_buffer *)buffer; - } - return NULL; + return (struct r300_buffer *)buffer; } static INLINE boolean r300_buffer_is_user_buffer(struct pipe_resource *buffer) diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 0f563703c0..d4e2063558 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -626,7 +626,7 @@ static void r300_tex_set_tiling_flags(struct r300_context *r300, /* 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->buffer, R300_REF_CS)) + tex->cs_buffer, R300_REF_CS)) r300->context.flush(&r300->context, 0, NULL); r300->rws->buffer_set_tiling(r300->rws, tex->buffer, diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 4b7b3e0356..70fc5d96d8 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -675,7 +675,7 @@ static unsigned r300_texture_is_referenced(struct pipe_context *context, struct r300_texture *rtex = (struct r300_texture *)texture; if (r300->rws->cs_is_buffer_referenced(r300->cs, - rtex->buffer, R300_REF_CS)) + rtex->cs_buffer, R300_REF_CS)) return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; return PIPE_UNREFERENCED; @@ -777,6 +777,8 @@ r300_texture_create_object(struct r300_screen *rscreen, } } + tex->cs_buffer = rws->buffer_get_cs_handle(rws, tex->buffer); + rws->buffer_set_tiling(rws, tex->buffer, tex->desc.microtile, tex->desc.macrotile[0], tex->desc.stride_in_bytes[0]); @@ -876,6 +878,7 @@ struct pipe_surface* r300_create_surface(struct pipe_context * ctx, surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer; surface->buffer = tex->buffer; + surface->cs_buffer = tex->cs_buffer; /* Prefer VRAM if there are multiple domains to choose from. */ surface->domain = tex->domain; diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c index 755aff8380..3b95af79bc 100644 --- a/src/gallium/drivers/r300/r300_transfer.c +++ b/src/gallium/drivers/r300/r300_transfer.c @@ -90,13 +90,13 @@ r300_texture_get_transfer(struct pipe_context *ctx, referenced_cs = r300->rws->cs_is_buffer_referenced(r300->cs, - tex->buffer, R300_REF_CS); + tex->cs_buffer, R300_REF_CS); if (referenced_cs) { referenced_hw = TRUE; } else { referenced_hw = r300->rws->cs_is_buffer_referenced(r300->cs, - tex->buffer, R300_REF_HW); + tex->cs_buffer, R300_REF_HW); } blittable = ctx->screen->is_format_supported( diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index 4597332399..c45888dbf3 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -36,7 +36,8 @@ struct winsys_handle; struct r300_winsys_screen; -struct r300_winsys_buffer; +struct r300_winsys_buffer; /* for map/unmap etc. */ +struct r300_winsys_cs_buffer; /* for write_reloc etc. */ struct r300_winsys_cs { uint32_t *ptr; /* Pointer to the beginning of the CS. */ @@ -102,6 +103,10 @@ struct r300_winsys_screen { unsigned usage, enum r300_buffer_domain domain); + struct r300_winsys_cs_buffer *(*buffer_get_cs_handle)( + struct r300_winsys_screen *ws, + struct r300_winsys_buffer *buf); + /** * Reference a buffer object (assign with reference counting). * @@ -242,7 +247,7 @@ struct r300_winsys_screen { * of the R300_DOMAIN_* flags. */ void (*cs_add_buffer)(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_buffer_domain rd, enum r300_buffer_domain wd); @@ -263,7 +268,7 @@ struct r300_winsys_screen { * \param wd A write domain containing a bitmask of the R300_DOMAIN_* flags. */ void (*cs_write_reloc)(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_buffer_domain rd, enum r300_buffer_domain wd); @@ -303,7 +308,7 @@ struct r300_winsys_screen { * \param domain A bitmask of the R300_REF_* enums. */ boolean (*cs_is_buffer_referenced)(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_reference_domain domain); }; diff --git a/src/gallium/winsys/radeon/drm/radeon_buffer.h b/src/gallium/winsys/radeon/drm/radeon_buffer.h index a8137d85e8..59edbcadbc 100644 --- a/src/gallium/winsys/radeon/drm/radeon_buffer.h +++ b/src/gallium/winsys/radeon/drm/radeon_buffer.h @@ -63,12 +63,12 @@ struct pb_manager * radeon_drm_bufmgr_create(struct radeon_libdrm_winsys *rws); void radeon_drm_bufmgr_add_buffer(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_buffer_domain rd, enum r300_buffer_domain wd); void radeon_drm_bufmgr_write_reloc(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_buffer_domain rd, enum r300_buffer_domain wd); @@ -92,7 +92,7 @@ boolean radeon_drm_bufmgr_get_handle(struct pb_buffer *_buf, struct winsys_handle *whandle); boolean radeon_drm_bufmgr_is_buffer_referenced(struct r300_winsys_cs *cs, - struct r300_winsys_buffer *buf, + struct r300_winsys_cs_buffer *buf, enum r300_reference_domain domain); void radeon_drm_bufmgr_wait(struct r300_winsys_screen *ws, @@ -106,4 +106,8 @@ void *radeon_drm_buffer_map(struct r300_winsys_screen *ws, void radeon_drm_buffer_unmap(struct r300_winsys_screen *ws, struct r300_winsys_buffer *buf); +struct r300_winsys_cs_buffer *radeon_drm_get_cs_handle( + struct r300_winsys_screen *rws, + struct r300_winsys_buffer *_buf); + #endif diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c index 78723948d4..294d4fac7c 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c @@ -477,54 +477,63 @@ static uint32_t get_gem_domain(enum r300_buffer_domain domain) } void radeon_drm_bufmgr_add_buffer(struct r300_winsys_cs *rcs, - struct r300_winsys_buffer *_buf, + struct r300_winsys_cs_buffer *_buf, enum r300_buffer_domain rd, enum r300_buffer_domain wd) { struct radeon_libdrm_cs *cs = radeon_libdrm_cs(rcs); - struct radeon_drm_buffer *buf = get_drm_buffer(radeon_pb_buffer(_buf)); + struct radeon_bo *bo = (struct radeon_bo*)_buf; uint32_t gem_rd = get_gem_domain(rd); uint32_t gem_wd = get_gem_domain(wd); - radeon_cs_space_add_persistent_bo(cs->cs, buf->bo, gem_rd, gem_wd); + radeon_cs_space_add_persistent_bo(cs->cs, bo, gem_rd, gem_wd); } void radeon_drm_bufmgr_write_reloc(struct r300_winsys_cs *rcs, - struct r300_winsys_buffer *_buf, + struct r300_winsys_cs_buffer *_buf, enum r300_buffer_domain rd, enum r300_buffer_domain wd) { struct radeon_libdrm_cs *cs = radeon_libdrm_cs(rcs); - struct radeon_drm_buffer *buf = get_drm_buffer(radeon_pb_buffer(_buf)); + struct radeon_bo *bo = (struct radeon_bo*)_buf; int retval; uint32_t gem_rd = get_gem_domain(rd); uint32_t gem_wd = get_gem_domain(wd); cs->cs->cdw = cs->base.cdw; - retval = radeon_cs_write_reloc(cs->cs, buf->bo, gem_rd, gem_wd, 0); + retval = radeon_cs_write_reloc(cs->cs, bo, gem_rd, gem_wd, 0); cs->base.cdw = cs->cs->cdw; if (retval) { fprintf(stderr, "radeon: Relocation of %p (%d, %d, %d) failed!\n", - buf, gem_rd, gem_wd, 0); + bo, gem_rd, gem_wd, 0); } } +struct r300_winsys_cs_buffer *radeon_drm_get_cs_handle( + struct r300_winsys_screen *rws, + struct r300_winsys_buffer *_buf) +{ + /* return pure radeon_bo. */ + return (struct r300_winsys_cs_buffer*) + get_drm_buffer(radeon_pb_buffer(_buf))->bo; +} + boolean radeon_drm_bufmgr_is_buffer_referenced(struct r300_winsys_cs *rcs, - struct r300_winsys_buffer *_buf, + struct r300_winsys_cs_buffer *_buf, enum r300_reference_domain domain) { struct radeon_libdrm_cs *cs = radeon_libdrm_cs(rcs); - struct radeon_drm_buffer *buf = get_drm_buffer(radeon_pb_buffer(_buf)); + struct radeon_bo *bo = (struct radeon_bo*)_buf; uint32_t tmp; if (domain & R300_REF_CS) { - if (radeon_bo_is_referenced_by_cs(buf->bo, cs->cs)) { + if (radeon_bo_is_referenced_by_cs(bo, cs->cs)) { return TRUE; } } if (domain & R300_REF_HW) { - if (radeon_bo_is_busy(buf->bo, &tmp)) { + if (radeon_bo_is_busy(bo, &tmp)) { return TRUE; } } diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c index 3b3e2c2f28..412f3adca4 100644 --- a/src/gallium/winsys/radeon/drm/radeon_r300.c +++ b/src/gallium/winsys/radeon/drm/radeon_r300.c @@ -286,6 +286,7 @@ boolean radeon_setup_winsys(int fd, struct radeon_libdrm_winsys* ws) ws->base.get_value = radeon_get_value; ws->base.buffer_create = radeon_r300_winsys_buffer_create; + ws->base.buffer_get_cs_handle = radeon_drm_get_cs_handle; ws->base.buffer_set_tiling = radeon_drm_bufmgr_set_tiling; ws->base.buffer_get_tiling = radeon_drm_bufmgr_get_tiling; ws->base.buffer_map = radeon_drm_buffer_map; -- cgit v1.2.3