}
else {
/* TODO Alloc a BO */
-
+ uint32_t size = width * height * cpp;
+
+ rrb->bo = radeon_bo_open(radeon->radeonScreen->bom,
+ 0,
+ size,
+ 0,
+ RADEON_GEM_DOMAIN_VRAM,
+ 0);
// rrb->bo = radeon_bo_open();
rb->Width = width;
rb->Height = height;
rrb->base.AllocStorage = radeon_alloc_window_storage;
rrb->base.GetPointer = radeon_get_pointer;
- radeonSetSpanFunctions(rrb);
-
rrb->bo = NULL;
return &rrb->base;
}
return &rrb->base;
}
-
static void
radeon_bind_framebuffer(GLcontext * ctx, GLenum target,
struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
#define DBG 0
+static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb);
+
static GLubyte *radeon_ptr32(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
__FUNCTION__, r);
}
}
+
+ radeonSetSpanFunctions(rrb);
}
static void unmap_buffer(struct gl_renderbuffer *rb)
if (rrb->bo) {
radeon_bo_unmap(rrb->bo);
}
+ rb->GetRow = NULL;
+ rb->PutRow = NULL;
}
static void radeonSpanRenderStart(GLcontext * ctx)
/**
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
-void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb)
+static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb)
{
if (rrb->base.InternalFormat == GL_RGB5) {
radeonInitPointers_RGB565(&rrb->base);
extern void radeonInitSpanFuncs(GLcontext * ctx);
-extern void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb);
#endif