mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
swrast: new swrast_renderbuffer type
This will let us move the swrast-specific fields out of gl_renderbuffer.
(cherry picked from commit 34988272d9)
This commit is contained in:
parent
73ed8cec4a
commit
a36cc604cf
1 changed files with 25 additions and 0 deletions
|
|
@ -167,6 +167,31 @@ swrast_texture_image_const(const struct gl_texture_image *img)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Subclass of gl_renderbuffer with extra fields needed for software
|
||||
* rendering.
|
||||
*/
|
||||
struct swrast_renderbuffer
|
||||
{
|
||||
struct gl_renderbuffer Base;
|
||||
|
||||
GLubyte *Buffer; /**< The malloc'd memory for buffer */
|
||||
|
||||
/** These fields are only valid while buffer is mapped for rendering */
|
||||
GLubyte *Map;
|
||||
GLint RowStride; /**< in bytes */
|
||||
};
|
||||
|
||||
|
||||
/** cast wrapper */
|
||||
static inline struct swrast_renderbuffer *
|
||||
swrast_renderbuffer(struct gl_renderbuffer *img)
|
||||
{
|
||||
return (struct swrast_renderbuffer *) img;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \struct SWcontext
|
||||
* \brief Per-context state that's private to the software rasterizer module.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue