#include "glheader.h"
#include "imports.h"
#include "context.h"
#include "fbobject.h"
#include "mtypes.h"
#include "depthstencil.h"
#include "renderbuffer.h"
Functions | |
| static void * | nop_get_pointer (GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) |
| Adaptor/wrappers for GL_DEPTH_STENCIL renderbuffers. | |
| static void | delete_wrapper (struct gl_renderbuffer *rb) |
| Delete a depth or stencil wrapper renderbuffer. | |
| static GLboolean | alloc_wrapper_storage (GLcontext *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height) |
| Realloc storage for wrapper. | |
| static void | get_row_z24 (GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, GLint x, GLint y, void *values) |
| static void | get_values_z24 (GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, const GLint x[], const GLint y[], void *values) |
| static void | put_row_z24 (GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) |
| static void | put_mono_row_z24 (GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) |
| static void | put_values_z24 (GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) |
| static void | put_mono_values_z24 (GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) |
| struct gl_renderbuffer * | _mesa_new_z24_renderbuffer_wrapper (GLcontext *ctx, struct gl_renderbuffer *dsrb) |
| Wrap the given GL_DEPTH_STENCIL renderbuffer so that it acts like a depth renderbuffer. | |
| static void | get_row_s8 (GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, GLint x, GLint y, void *values) |
| static void | get_values_s8 (GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, const GLint x[], const GLint y[], void *values) |
| static void | put_row_s8 (GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) |
| static void | put_mono_row_s8 (GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) |
| static void | put_values_s8 (GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) |
| static void | put_mono_values_s8 (GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) |
| struct gl_renderbuffer * | _mesa_new_s8_renderbuffer_wrapper (GLcontext *ctx, struct gl_renderbuffer *dsrb) |
| Wrap the given GL_DEPTH_STENCIL renderbuffer so that it acts like a stencil renderbuffer. | |
| void | _mesa_extract_stencil (GLcontext *ctx, struct gl_renderbuffer *dsRb, struct gl_renderbuffer *stencilRb) |
| The following functions are useful for hardware drivers that only implement combined depth/stencil buffers. | |
| void | _mesa_insert_stencil (GLcontext *ctx, struct gl_renderbuffer *dsRb, struct gl_renderbuffer *stencilRb) |
| Copy stencil values from a stencil renderbuffer into a combined depth/stencil renderbuffer. | |
| void | _mesa_promote_stencil (GLcontext *ctx, struct gl_renderbuffer *stencilRb) |
| Convert the stencil buffer from 8bpp to 32bpp depth/stencil. | |
| void _mesa_extract_stencil | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | dsRb, | |||
| struct gl_renderbuffer * | stencilRb | |||
| ) |
The following functions are useful for hardware drivers that only implement combined depth/stencil buffers.
The GL_EXT_framebuffer_object extension allows indepedent depth and stencil buffers to be used in any combination. Therefore, we sometimes have to merge separate depth and stencil renderbuffers into a single depth+stencil renderbuffer. And sometimes we have to split combined depth+stencil renderbuffers into separate renderbuffers. Extract stencil values from the combined depth/stencil renderbuffer, storing the values into a separate stencil renderbuffer.
| dsRb | the source depth/stencil renderbuffer | |
| stencilRb | the destination stencil renderbuffer (either 8-bit or 32-bit) |
| void _mesa_insert_stencil | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | dsRb, | |||
| struct gl_renderbuffer * | stencilRb | |||
| ) |
Copy stencil values from a stencil renderbuffer into a combined depth/stencil renderbuffer.
| dsRb | the destination depth/stencil renderbuffer | |
| stencilRb | the source stencil buffer (either 8-bit or 32-bit) |
| struct gl_renderbuffer* _mesa_new_s8_renderbuffer_wrapper | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | dsrb | |||
| ) | [read] |
Wrap the given GL_DEPTH_STENCIL renderbuffer so that it acts like a stencil renderbuffer.
| struct gl_renderbuffer* _mesa_new_z24_renderbuffer_wrapper | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | dsrb | |||
| ) | [read] |
Wrap the given GL_DEPTH_STENCIL renderbuffer so that it acts like a depth renderbuffer.
| void _mesa_promote_stencil | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | stencilRb | |||
| ) |
Convert the stencil buffer from 8bpp to 32bpp depth/stencil.
| stencilRb | the stencil renderbuffer to promote |
| static GLboolean alloc_wrapper_storage | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | rb, | |||
| GLenum | internalFormat, | |||
| GLuint | width, | |||
| GLuint | height | |||
| ) | [static] |
Realloc storage for wrapper.
| static void delete_wrapper | ( | struct gl_renderbuffer * | rb | ) | [static] |
Delete a depth or stencil wrapper renderbuffer.
| static void get_row_s8 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | s8rb, | |||
| GLuint | count, | |||
| GLint | x, | |||
| GLint | y, | |||
| void * | values | |||
| ) | [static] |
| static void get_row_z24 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | z24rb, | |||
| GLuint | count, | |||
| GLint | x, | |||
| GLint | y, | |||
| void * | values | |||
| ) | [static] |
| static void get_values_s8 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | s8rb, | |||
| GLuint | count, | |||
| const GLint | x[], | |||
| const GLint | y[], | |||
| void * | values | |||
| ) | [static] |
| static void get_values_z24 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | z24rb, | |||
| GLuint | count, | |||
| const GLint | x[], | |||
| const GLint | y[], | |||
| void * | values | |||
| ) | [static] |
| static void* nop_get_pointer | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | rb, | |||
| GLint | x, | |||
| GLint | y | |||
| ) | [static] |
Adaptor/wrappers for GL_DEPTH_STENCIL renderbuffers.
The problem with a GL_DEPTH_STENCIL renderbuffer is that sometimes we want to treat it as a stencil buffer, other times we want to treat it as a depth/z buffer and still other times when we want to treat it as a combined Z+stencil buffer! That implies we need three different sets of Get/Put functions.
We solve this by wrapping the Z24_S8 renderbuffer with depth and stencil adaptors, each with the right kind of depth/stencil Get/Put functions.
| static void put_mono_row_s8 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | s8rb, | |||
| GLuint | count, | |||
| GLint | x, | |||
| GLint | y, | |||
| const void * | value, | |||
| const GLubyte * | mask | |||
| ) | [static] |
| static void put_mono_row_z24 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | z24rb, | |||
| GLuint | count, | |||
| GLint | x, | |||
| GLint | y, | |||
| const void * | value, | |||
| const GLubyte * | mask | |||
| ) | [static] |
| static void put_mono_values_s8 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | s8rb, | |||
| GLuint | count, | |||
| const GLint | x[], | |||
| const GLint | y[], | |||
| const void * | value, | |||
| const GLubyte * | mask | |||
| ) | [static] |
| static void put_mono_values_z24 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | z24rb, | |||
| GLuint | count, | |||
| const GLint | x[], | |||
| const GLint | y[], | |||
| const void * | value, | |||
| const GLubyte * | mask | |||
| ) | [static] |
| static void put_row_s8 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | s8rb, | |||
| GLuint | count, | |||
| GLint | x, | |||
| GLint | y, | |||
| const void * | values, | |||
| const GLubyte * | mask | |||
| ) | [static] |
| static void put_row_z24 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | z24rb, | |||
| GLuint | count, | |||
| GLint | x, | |||
| GLint | y, | |||
| const void * | values, | |||
| const GLubyte * | mask | |||
| ) | [static] |
| static void put_values_s8 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | s8rb, | |||
| GLuint | count, | |||
| const GLint | x[], | |||
| const GLint | y[], | |||
| const void * | values, | |||
| const GLubyte * | mask | |||
| ) | [static] |
| static void put_values_z24 | ( | GLcontext * | ctx, | |
| struct gl_renderbuffer * | z24rb, | |||
| GLuint | count, | |||
| const GLint | x[], | |||
| const GLint | y[], | |||
| const void * | values, | |||
| const GLubyte * | mask | |||
| ) | [static] |
1.5.4