X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fr600%2Fr600_resource.h;h=13fce002df50e2af8ce3f81d64b69cba63d61c0c;hb=da98bb6fc105e1a2f688a1713ca9e50f0ac8fbed;hp=a53ecb8d37d25755e588d490e6ee154dd2c26858;hpb=d334d591a71c41d6a1eb4f2ea6cdabedc425e42f;p=mesa.git diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h index a53ecb8d37d..13fce002df5 100644 --- a/src/gallium/drivers/r600/r600_resource.h +++ b/src/gallium/drivers/r600/r600_resource.h @@ -23,20 +23,22 @@ #ifndef R600_RESOURCE_H #define R600_RESOURCE_H -#include "util/u_transfer.h" -#include "util/u_vbuf.h" +#include "r600.h" /* flag to indicate a resource is to be used as a transfer so should not be tiled */ #define R600_RESOURCE_FLAG_TRANSFER PIPE_RESOURCE_FLAG_DRV_PRIV -/* Texture transfer. */ struct r600_transfer { - /* Base class. */ struct pipe_transfer transfer; - /* Buffer transfer. */ - struct pipe_transfer *buffer_transfer; + struct r600_resource *staging; unsigned offset; - struct pipe_resource *staging_texture; +}; + +struct compute_memory_item; + +struct r600_resource_global { + struct r600_resource base; + struct compute_memory_item *chunk; }; struct r600_resource_texture { @@ -70,6 +72,7 @@ struct r600_surface { unsigned aligned_height; }; +void r600_resource_destroy(struct pipe_screen *screen, struct pipe_resource *res); void r600_init_screen_resource_functions(struct pipe_screen *screen); /* r600_texture */ @@ -84,7 +87,10 @@ static INLINE struct r600_resource *r600_resource(struct pipe_resource *r) return (struct r600_resource*)r; } -int r600_texture_depth_flush(struct pipe_context *ctx, struct pipe_resource *texture, boolean just_create); +void r600_init_flushed_depth_texture(struct pipe_context *ctx, + struct pipe_resource *texture); +void r600_texture_depth_flush(struct pipe_context *ctx, + struct pipe_resource *texture); /* r600_texture.c texture transfer functions. */ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx, @@ -99,10 +105,4 @@ void* r600_texture_transfer_map(struct pipe_context *ctx, void r600_texture_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer* transfer); -struct r600_context; - -void r600_upload_const_buffer(struct r600_context *rctx, struct r600_resource **rbuffer, uint32_t *offset); - -uint64_t r600_resource_va(struct pipe_screen *screen, struct pipe_resource *resource); - #endif