#include "state.h"
#include "mtypes.h"
+#include "state_tracker/st_cb_fbo.h"
void GLAPIENTRY
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
- ctx->Driver.MapRenderbuffer(ctx, accRb, x, y, width, height,
- GL_MAP_WRITE_BIT, &accMap, &accRowStride,
- ctx->DrawBuffer->FlipY);
+ st_MapRenderbuffer(ctx, accRb, x, y, width, height,
+ GL_MAP_WRITE_BIT, &accMap, &accRowStride,
+ ctx->DrawBuffer->FlipY);
if (!accMap) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glAccum");
_mesa_warning(ctx, "unexpected accum buffer type");
}
- ctx->Driver.UnmapRenderbuffer(ctx, accRb);
+ st_UnmapRenderbuffer(ctx, accRb);
}
assert(accRb);
- ctx->Driver.MapRenderbuffer(ctx, accRb, xpos, ypos, width, height,
- GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
- &accMap, &accRowStride,
- ctx->DrawBuffer->FlipY);
+ st_MapRenderbuffer(ctx, accRb, xpos, ypos, width, height,
+ GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
+ &accMap, &accRowStride,
+ ctx->DrawBuffer->FlipY);
if (!accMap) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glAccum");
/* other types someday? */
}
- ctx->Driver.UnmapRenderbuffer(ctx, accRb);
+ st_UnmapRenderbuffer(ctx, accRb);
}
mappingFlags |= GL_MAP_READ_BIT;
/* Map accum buffer */
- ctx->Driver.MapRenderbuffer(ctx, accRb, xpos, ypos, width, height,
- mappingFlags, &accMap, &accRowStride,
- ctx->DrawBuffer->FlipY);
+ st_MapRenderbuffer(ctx, accRb, xpos, ypos, width, height,
+ mappingFlags, &accMap, &accRowStride,
+ ctx->DrawBuffer->FlipY);
if (!accMap) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glAccum");
return;
}
/* Map color buffer */
- ctx->Driver.MapRenderbuffer(ctx, colorRb, xpos, ypos, width, height,
- GL_MAP_READ_BIT,
- &colorMap, &colorRowStride,
- ctx->DrawBuffer->FlipY);
+ st_MapRenderbuffer(ctx, colorRb, xpos, ypos, width, height,
+ GL_MAP_READ_BIT,
+ &colorMap, &colorRowStride,
+ ctx->DrawBuffer->FlipY);
if (!colorMap) {
- ctx->Driver.UnmapRenderbuffer(ctx, accRb);
+ st_UnmapRenderbuffer(ctx, accRb);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glAccum");
return;
}
/* other types someday? */
}
- ctx->Driver.UnmapRenderbuffer(ctx, accRb);
- ctx->Driver.UnmapRenderbuffer(ctx, colorRb);
+ st_UnmapRenderbuffer(ctx, accRb);
+ st_UnmapRenderbuffer(ctx, colorRb);
}
GLuint buffer;
/* Map accum buffer */
- ctx->Driver.MapRenderbuffer(ctx, accRb, xpos, ypos, width, height,
+ st_MapRenderbuffer(ctx, accRb, xpos, ypos, width, height,
GL_MAP_READ_BIT,
&accMap, &accRowStride, fb->FlipY);
if (!accMap) {
mappingFlags |= GL_MAP_READ_BIT;
/* Map color buffer */
- ctx->Driver.MapRenderbuffer(ctx, colorRb, xpos, ypos, width, height,
+ st_MapRenderbuffer(ctx, colorRb, xpos, ypos, width, height,
mappingFlags, &colorMap, &colorRowStride,
fb->FlipY);
if (!colorMap) {
/* other types someday? */
}
- ctx->Driver.UnmapRenderbuffer(ctx, colorRb);
+ st_UnmapRenderbuffer(ctx, colorRb);
}
- ctx->Driver.UnmapRenderbuffer(ctx, accRb);
+ st_UnmapRenderbuffer(ctx, accRb);
}
#include "util/bitscan.h"
#include "util/u_math.h"
+#include "state_tracker/st_cb_fbo.h"
#define BAD_MASK ~0u
/* Call device driver function only if fb is the bound draw buffer */
if (fb == ctx->DrawBuffer) {
- if (ctx->Driver.DrawBufferAllocate)
- ctx->Driver.DrawBufferAllocate(ctx);
+ st_DrawBufferAllocate(ctx);
}
}
* may not be valid.
*/
if (fb == ctx->DrawBuffer) {
- if (ctx->Driver.DrawBufferAllocate)
- ctx->Driver.DrawBufferAllocate(ctx);
+ st_DrawBufferAllocate(ctx);
}
}
/* Call the device driver function only if fb is the bound read buffer */
if (fb == ctx->ReadBuffer) {
- if (ctx->Driver.ReadBuffer)
- ctx->Driver.ReadBuffer(ctx, buffer);
+ st_ReadBuffer(ctx, buffer);
}
}
struct gl_texture_object *texObj,
struct gl_texture_object *origTexObj);
- /**
- * Map a renderbuffer into user space.
- * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
- * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
- */
- void (*MapRenderbuffer)(struct gl_context *ctx,
- struct gl_renderbuffer *rb,
- GLuint x, GLuint y, GLuint w, GLuint h,
- GLbitfield mode,
- GLubyte **mapOut, GLint *rowStrideOut,
- bool flip_y);
-
- void (*UnmapRenderbuffer)(struct gl_context *ctx,
- struct gl_renderbuffer *rb);
-
/*@}*/
* May add more functions like these to the device driver in the future.
*/
/*@{*/
- /** Used to allocated any buffers with on-demand creation */
- void (*DrawBufferAllocate)(struct gl_context *ctx);
- /* Specifies the current buffer for reading */
- void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
/** Set texture parameter (callee gets param value from the texObj) */
void (*TexParameter)(struct gl_context *ctx,
struct gl_texture_object *texObj, GLenum pname);
/**
* \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
*/
- /*@{*/
- struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
- GLuint name);
- void (*RenderTexture)(struct gl_context *ctx,
- struct gl_framebuffer *fb,
- struct gl_renderbuffer_attachment *att);
- void (*FinishRenderTexture)(struct gl_context *ctx,
- struct gl_renderbuffer *rb);
- void (*ValidateFramebuffer)(struct gl_context *ctx,
- struct gl_framebuffer *fb);
- /*@}*/
void (*BlitFramebuffer)(struct gl_context *ctx,
struct gl_framebuffer *readFb,
struct gl_framebuffer *drawFb,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
- void (*DiscardFramebuffer)(struct gl_context *ctx, struct gl_framebuffer *fb,
- struct gl_renderbuffer_attachment *att);
/**
* \name Functions for GL_ARB_sample_locations
void (*GetProgrammableSampleCaps)(struct gl_context *ctx,
const struct gl_framebuffer *fb,
GLuint *bits, GLuint *width, GLuint *height);
- void (*EvaluateDepthValues)(struct gl_context *ctx);
/*@}*/
#include "teximage.h"
#include "texobj.h"
-
+#include "state_tracker/st_cb_fbo.h"
/**
* Notes:
*
struct gl_renderbuffer *rb = att->Renderbuffer;
/* tell driver that we're done rendering to this texture. */
- if (rb && rb->NeedsFinishRenderTexture)
- ctx->Driver.FinishRenderTexture(ctx, rb);
+ if (rb)
+ st_finish_render_texture(ctx, rb);
if (att->Type == GL_TEXTURE) {
assert(att->Texture);
rb = att->Renderbuffer;
if (!rb) {
- rb = ctx->Driver.NewRenderbuffer(ctx, ~0);
+ rb = st_new_renderbuffer(ctx, ~0);
if (!rb) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glFramebufferTexture()");
return;
* for clarity compared to user renderbuffers.
*/
rb->AllocStorage = NULL;
-
- rb->NeedsFinishRenderTexture = ctx->Driver.FinishRenderTexture != NULL;
}
if (!texImage)
rb->TexImage = texImage;
if (driver_RenderTexture_is_safe(att))
- ctx->Driver.RenderTexture(ctx, fb, att);
+ st_render_texture(ctx, fb, att);
}
/**
{
struct gl_renderbuffer *rb = att->Renderbuffer;
- if (rb && rb->NeedsFinishRenderTexture)
- ctx->Driver.FinishRenderTexture(ctx, rb);
+ if (rb)
+ st_finish_render_texture(ctx, rb);
if (att->Texture == texObj) {
/* re-attaching same texture */
* Drivers will most likely set the status to GL_FRAMEBUFFER_UNSUPPORTED
* if anything.
*/
- if (ctx->Driver.ValidateFramebuffer) {
- ctx->Driver.ValidateFramebuffer(ctx, fb);
- if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- fbo_incomplete(ctx, "driver marked FBO as incomplete", -1);
- return;
- }
+ st_validate_framebuffer(ctx, fb);
+ if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ fbo_incomplete(ctx, "driver marked FBO as incomplete", -1);
+ return;
}
/*
struct gl_renderbuffer *newRb;
/* create new renderbuffer object */
- newRb = ctx->Driver.NewRenderbuffer(ctx, renderbuffer);
+ newRb = st_new_renderbuffer(ctx, renderbuffer);
if (!newRb) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
return NULL;
check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
{
GLuint i;
- assert(ctx->Driver.RenderTexture);
if (_mesa_is_winsys_fbo(fb))
return; /* can't render to texture with winsys framebuffers */
struct gl_renderbuffer_attachment *att = fb->Attachment + i;
if (att->Texture && att->Renderbuffer->TexImage
&& driver_RenderTexture_is_safe(att)) {
- ctx->Driver.RenderTexture(ctx, fb, att);
+ st_render_texture(ctx, fb, att);
}
}
}
static void
check_end_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
{
- /* Skip if we know NeedsFinishRenderTexture won't be set. */
if (_mesa_is_winsys_fbo(fb))
return;
- if (ctx->Driver.FinishRenderTexture) {
- GLuint i;
- for (i = 0; i < BUFFER_COUNT; i++) {
- struct gl_renderbuffer_attachment *att = fb->Attachment + i;
- struct gl_renderbuffer *rb = att->Renderbuffer;
- if (rb && rb->NeedsFinishRenderTexture) {
- ctx->Driver.FinishRenderTexture(ctx, rb);
- }
+ GLuint i;
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ struct gl_renderbuffer_attachment *att = fb->Attachment + i;
+ struct gl_renderbuffer *rb = att->Renderbuffer;
+ if (rb) {
+ st_finish_render_texture(ctx, rb);
}
}
}
discard_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLsizei numAttachments, const GLenum *attachments)
{
- if (!ctx->Driver.DiscardFramebuffer)
- return;
-
for (int i = 0; i < numAttachments; i++) {
struct gl_renderbuffer_attachment *att =
get_fb_attachment(ctx, fb, attachments[i]);
/* If we're asked to invalidate just depth or just stencil, but the
* attachment is packed depth/stencil, then we can only use
- * Driver.DiscardFramebuffer if the attachments list includes both depth
+ * DiscardFramebuffer if the attachments list includes both depth
* and stencil and they both point at the same renderbuffer.
*/
if ((attachments[i] == GL_DEPTH_ATTACHMENT ||
continue;
}
- ctx->Driver.DiscardFramebuffer(ctx, fb, att);
+ st_discard_framebuffer(ctx, fb, att);
}
}
return;
}
- if (ctx->Driver.EvaluateDepthValues)
- ctx->Driver.EvaluateDepthValues(ctx);
+ st_EvaluateDepthValues(ctx);
}
#include "state.h"
#include "util/u_memory.h"
-
+#include "state_tracker/st_cb_fbo.h"
/**
* Compute/set the _DepthMax field for the given framebuffer.
/* Call device driver function if fb is the bound draw buffer. */
if (fb == ctx->DrawBuffer) {
- if (ctx->Driver.DrawBufferAllocate)
- ctx->Driver.DrawBufferAllocate(ctx);
+ st_DrawBufferAllocate(ctx);
}
}
else {
GLuint Depth;
GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */
- /**
- * True for renderbuffers that wrap textures, giving the driver a chance to
- * flush render caches through the FinishRenderTexture hook.
- *
- * Drivers may also set this on renderbuffers other than those generated by
- * glFramebufferTexture(), though it means FinishRenderTexture() would be
- * called without a rb->TexImage.
- */
- GLboolean NeedsFinishRenderTexture;
GLubyte NumSamples; /**< zero means not multisampled */
GLubyte NumStorageSamples; /**< for AMD_framebuffer_multisample_advanced */
GLenum16 InternalFormat; /**< The user-specified format */
#include "format_utils.h"
#include "pixeltransfer.h"
+#include "state_tracker/st_cb_fbo.h"
/**
* Return true if the conversion L=R+G+B is needed.
dst = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
format, type, 0, 0);
- ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
- &map, &stride, ctx->ReadBuffer->FlipY);
+ st_MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
+ &map, &stride, ctx->ReadBuffer->FlipY);
if (!map) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return GL_TRUE; /* don't bother trying the slow path */
}
}
- ctx->Driver.UnmapRenderbuffer(ctx, rb);
+ st_UnmapRenderbuffer(ctx, rb);
return GL_TRUE;
}
if (_mesa_get_format_datatype(rb->Format) != GL_UNSIGNED_NORMALIZED)
return GL_FALSE;
- ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
- &map, &stride, fb->FlipY);
+ st_MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
+ &map, &stride, fb->FlipY);
if (!map) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
map += stride;
dst += dstStride;
}
- ctx->Driver.UnmapRenderbuffer(ctx, rb);
+ st_UnmapRenderbuffer(ctx, rb);
return GL_TRUE;
}
dst = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
GL_DEPTH_COMPONENT, type, 0, 0);
- ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
- &map, &stride, fb->FlipY);
+ st_MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
+ &map, &stride, fb->FlipY);
if (!map) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return;
free(depthValues);
- ctx->Driver.UnmapRenderbuffer(ctx, rb);
+ st_UnmapRenderbuffer(ctx, rb);
}
if (!rb)
return;
- ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
- &map, &stride, fb->FlipY);
+ st_MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
+ &map, &stride, fb->FlipY);
if (!map) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return;
free(stencil);
- ctx->Driver.UnmapRenderbuffer(ctx, rb);
+ st_UnmapRenderbuffer(ctx, rb);
}
/*
format, type, 0, 0);
/* Map the source render buffer */
- ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
- &map, &rb_stride, fb->FlipY);
+ st_MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
+ &map, &rb_stride, fb->FlipY);
if (!map) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return;
}
done_unmap:
- ctx->Driver.UnmapRenderbuffer(ctx, rb);
+ st_UnmapRenderbuffer(ctx, rb);
}
/**
rb->Format != MESA_FORMAT_Z24_UNORM_S8_UINT)
return GL_FALSE;
- ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
- &map, &stride, fb->FlipY);
+ st_MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT,
+ &map, &stride, fb->FlipY);
if (!map) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return GL_TRUE; /* don't bother trying the slow path */
dst += dstStride;
}
- ctx->Driver.UnmapRenderbuffer(ctx, rb);
+ st_UnmapRenderbuffer(ctx, rb);
return GL_TRUE;
}
if (_mesa_get_format_datatype(depthRb->Format) != GL_UNSIGNED_NORMALIZED)
return GL_FALSE;
- ctx->Driver.MapRenderbuffer(ctx, depthRb, x, y, width, height,
- GL_MAP_READ_BIT, &depthMap, &depthStride, fb->FlipY);
+ st_MapRenderbuffer(ctx, depthRb, x, y, width, height,
+ GL_MAP_READ_BIT, &depthMap, &depthStride, fb->FlipY);
if (!depthMap) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return GL_TRUE; /* don't bother trying the slow path */
}
- ctx->Driver.MapRenderbuffer(ctx, stencilRb, x, y, width, height,
- GL_MAP_READ_BIT, &stencilMap, &stencilStride, fb->FlipY);
+ st_MapRenderbuffer(ctx, stencilRb, x, y, width, height,
+ GL_MAP_READ_BIT, &stencilMap, &stencilStride, fb->FlipY);
if (!stencilMap) {
- ctx->Driver.UnmapRenderbuffer(ctx, depthRb);
+ st_UnmapRenderbuffer(ctx, depthRb);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return GL_TRUE; /* don't bother trying the slow path */
}
free(stencilVals);
- ctx->Driver.UnmapRenderbuffer(ctx, depthRb);
- ctx->Driver.UnmapRenderbuffer(ctx, stencilRb);
+ st_UnmapRenderbuffer(ctx, depthRb);
+ st_UnmapRenderbuffer(ctx, stencilRb);
return GL_TRUE;
}
/* The depth and stencil buffers might be separate, or a single buffer.
* If one buffer, only map it once.
*/
- ctx->Driver.MapRenderbuffer(ctx, depthRb, x, y, width, height,
- GL_MAP_READ_BIT, &depthMap, &depthStride, fb->FlipY);
+ st_MapRenderbuffer(ctx, depthRb, x, y, width, height,
+ GL_MAP_READ_BIT, &depthMap, &depthStride, fb->FlipY);
if (!depthMap) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return;
}
if (stencilRb != depthRb) {
- ctx->Driver.MapRenderbuffer(ctx, stencilRb, x, y, width, height,
- GL_MAP_READ_BIT, &stencilMap,
- &stencilStride, fb->FlipY);
+ st_MapRenderbuffer(ctx, stencilRb, x, y, width, height,
+ GL_MAP_READ_BIT, &stencilMap,
+ &stencilStride, fb->FlipY);
if (!stencilMap) {
- ctx->Driver.UnmapRenderbuffer(ctx, depthRb);
+ st_UnmapRenderbuffer(ctx, depthRb);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels");
return;
}
free(stencilVals);
free(depthVals);
- ctx->Driver.UnmapRenderbuffer(ctx, depthRb);
+ st_UnmapRenderbuffer(ctx, depthRb);
if (stencilRb != depthRb) {
- ctx->Driver.UnmapRenderbuffer(ctx, stencilRb);
+ st_UnmapRenderbuffer(ctx, stencilRb);
}
}
/**
* Called via ctx->Driver.NewRenderbuffer()
*/
-static struct gl_renderbuffer *
+struct gl_renderbuffer *
st_new_renderbuffer(struct gl_context *ctx, GLuint name)
{
struct st_renderbuffer *strb = ST_CALLOC_STRUCT(st_renderbuffer);
/**
* Called by ctx->Driver.RenderTexture
*/
-static void
+void
st_render_texture(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
/**
* Called via ctx->Driver.FinishRenderTexture.
*/
-static void
+void
st_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
struct st_context *st = st_context(ctx);
*
* For Gallium we only supports combined Z+stencil, not separate buffers.
*/
-static void
+void
st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
struct st_context *st = st_context(ctx);
/**
* Called by ctx->Driver.DiscardFramebuffer
*/
-static void
+void
st_discard_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
{
* that buffer. Note, this is only for window system buffers, not user-
* created FBOs.
*/
-static void
+void
st_DrawBufferAllocate(struct gl_context *ctx)
{
struct st_context *st = st_context(ctx);
* Called via glReadBuffer. As with st_DrawBufferAllocate, we use this
* function to check if we need to allocate a renderbuffer on demand.
*/
-static void
+void
st_ReadBuffer(struct gl_context *ctx, GLenum buffer)
{
struct st_context *st = st_context(ctx);
/**
* Called via ctx->Driver.MapRenderbuffer.
*/
-static void
+void
st_MapRenderbuffer(struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint x, GLuint y, GLuint w, GLuint h,
/**
* Called via ctx->Driver.UnmapRenderbuffer.
*/
-static void
+void
st_UnmapRenderbuffer(struct gl_context *ctx,
struct gl_renderbuffer *rb)
{
/**
* Called via ctx->Driver.EvaluateDepthValues.
*/
-static void
+void
st_EvaluateDepthValues(struct gl_context *ctx)
{
struct st_context *st = st_context(ctx);
st->pipe->evaluate_depth_buffer(st->pipe);
}
-
-
-void
-st_init_fbo_functions(struct dd_function_table *functions)
-{
- functions->NewRenderbuffer = st_new_renderbuffer;
- functions->RenderTexture = st_render_texture;
- functions->FinishRenderTexture = st_finish_render_texture;
- functions->ValidateFramebuffer = st_validate_framebuffer;
- functions->DiscardFramebuffer = st_discard_framebuffer;
-
- functions->DrawBufferAllocate = st_DrawBufferAllocate;
- functions->ReadBuffer = st_ReadBuffer;
-
- functions->MapRenderbuffer = st_MapRenderbuffer;
- functions->UnmapRenderbuffer = st_UnmapRenderbuffer;
- functions->EvaluateDepthValues = st_EvaluateDepthValues;
-}
struct st_renderbuffer *strb);
extern void
-st_init_fbo_functions(struct dd_function_table *functions);
-
-extern void
st_regen_renderbuffer_surface(struct st_context *st,
struct st_renderbuffer *strb);
+struct gl_renderbuffer *st_new_renderbuffer(struct gl_context *ctx, GLuint name);
+void st_render_texture(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ struct gl_renderbuffer_attachment *att);
+void st_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer *rb);
+void st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb);
+void st_discard_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
+ struct gl_renderbuffer_attachment *att);
+void st_DrawBufferAllocate(struct gl_context *ctx);
+void st_ReadBuffer(struct gl_context *ctx, GLenum buffer);
+
+void st_MapRenderbuffer(struct gl_context *ctx,
+ struct gl_renderbuffer *rb,
+ GLuint x, GLuint y, GLuint w, GLuint h,
+ GLbitfield mode,
+ GLubyte **mapOut, GLint *rowStrideOut,
+ bool flip_y);
+void st_UnmapRenderbuffer(struct gl_context *ctx,
+ struct gl_renderbuffer *rb);
+void st_EvaluateDepthValues(struct gl_context *ctx);
#endif /* ST_CB_FBO_H */
#include "st_cb_rasterpos.h"
#include "st_cb_drawtex.h"
#include "st_cb_eglimage.h"
-#include "st_cb_fbo.h"
#include "st_cb_feedback.h"
#include "st_cb_msaa.h"
#include "st_cb_perfmon.h"
st_init_eglimage_functions(functions, has_egl_image_validate);
- st_init_fbo_functions(functions);
st_init_msaa_functions(functions);
st_init_program_functions(functions);
st_init_readpixels_functions(functions);