diff options
author | Michel Dänzer <[email protected]> | 2009-02-05 19:41:18 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2009-02-05 19:41:18 +0100 |
commit | 4617981ec72f7985941bee4b03c534d97ff96bc6 (patch) | |
tree | c3c8fb33499227cf4e3e905b3c04ff6599666663 /src/gallium/include/pipe/p_state.h | |
parent | e0c3b4970da052308bf7b4e5cbe9186a4b8321db (diff) |
gallium: No longer allow CPU mapping surfaces directly.
Instead, a new pipe_transfer object has to be created and mapped for
transferring data between the CPU and a texture. This gives the driver more
flexibility for textures in address spaces that aren't CPU accessible.
This is a first pass; softpipe/xlib builds and runs glxgears, but it only shows
a black window. Looks like something's off related to the Z buffer, so the
depth test always fails.
Diffstat (limited to 'src/gallium/include/pipe/p_state.h')
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index dd0dfac238d..34141ff2424 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -281,10 +281,6 @@ struct pipe_surface unsigned clear_value; /**< XXX may be temporary */ unsigned width; /**< logical width in pixels */ unsigned height; /**< logical height in pixels */ - struct pipe_format_block block; - unsigned nblocksx; /**< allocated width in blocks */ - unsigned nblocksy; /**< allocated height in blocks */ - unsigned stride; /**< stride in bytes between rows of blocks */ unsigned layout; /**< PIPE_SURFACE_LAYOUT_x */ unsigned offset; /**< offset from start of buffer, in bytes */ unsigned refcount; @@ -298,6 +294,30 @@ struct pipe_surface /** + * Transfer object. For data transfer to/from a texture. + */ +struct pipe_transfer +{ + enum pipe_format format; /**< PIPE_FORMAT_x */ + unsigned x; /**< x offset from start of texture image */ + unsigned y; /**< y offset from start of texture image */ + unsigned width; /**< logical width in pixels */ + unsigned height; /**< logical height in pixels */ + struct pipe_format_block block; + unsigned nblocksx; /**< allocated width in blocks */ + unsigned nblocksy; /**< allocated height in blocks */ + unsigned stride; /**< stride in bytes between rows of blocks */ + unsigned refcount; + unsigned usage; /**< PIPE_TRANSFER_* */ + + struct pipe_texture *texture; /**< texture to transfer to/from */ + unsigned face; + unsigned level; + unsigned zslice; +}; + + +/** * Texture object. */ struct pipe_texture |