diff options
author | Marek Olšák <[email protected]> | 2013-03-03 14:33:00 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-03-11 13:43:36 +0100 |
commit | 2c339f801516d4f6201e8bd4cd0fe0033f36046a (patch) | |
tree | f7e3916160ce6aa834893be0bc9db81fee5118d0 /src/gallium/drivers/r600/r600_resource.h | |
parent | ec7d775790bef929b15e4c82d68ccaaf92c9f6b7 (diff) |
r600g: remove r600.h, move the stuff elsewhere (mostly to r600_pipe.h)
Reviewed-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_resource.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_resource.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h index 25d0be4cac9..d07ff9e1e04 100644 --- a/src/gallium/drivers/r600/r600_resource.h +++ b/src/gallium/drivers/r600/r600_resource.h @@ -23,13 +23,37 @@ #ifndef R600_RESOURCE_H #define R600_RESOURCE_H -#include "r600.h" +#include "../../winsys/radeon/drm/radeon_winsys.h" +#include "util/u_range.h" + +struct r600_screen; /* 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 #define R600_RESOURCE_FLAG_FLUSHED_DEPTH (PIPE_RESOURCE_FLAG_DRV_PRIV << 1) #define R600_RESOURCE_FLAG_FORCE_TILING (PIPE_RESOURCE_FLAG_DRV_PRIV << 2) +struct r600_resource { + struct u_resource b; + + /* Winsys objects. */ + struct pb_buffer *buf; + struct radeon_winsys_cs_handle *cs_buf; + + /* Resource state. */ + unsigned domains; + + /* The buffer range which is initialized (with a write transfer, + * streamout, DMA, or as a random access target). The rest of + * the buffer is considered invalid and can be mapped unsynchronized. + * + * This allows unsychronized mapping of a buffer range which hasn't + * been used yet. It's for applications which forget to use + * the unsynchronized map flag and expect the driver to figure it out. + */ + struct util_range valid_buffer_range; +}; + struct r600_transfer { struct pipe_transfer transfer; struct r600_resource *staging; |