mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
radeon: fix up span function setting
This commit is contained in:
parent
22443d5cc0
commit
ffde891a03
3 changed files with 14 additions and 5 deletions
|
|
@ -180,7 +180,14 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
|
|||
}
|
||||
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;
|
||||
|
|
@ -313,8 +320,6 @@ radeon_create_renderbuffer(GLenum format, __DRIdrawablePrivate *driDrawPriv)
|
|||
rrb->base.AllocStorage = radeon_alloc_window_storage;
|
||||
rrb->base.GetPointer = radeon_get_pointer;
|
||||
|
||||
radeonSetSpanFunctions(rrb);
|
||||
|
||||
rrb->bo = NULL;
|
||||
return &rrb->base;
|
||||
}
|
||||
|
|
@ -338,7 +343,6 @@ radeon_new_renderbuffer(GLcontext * ctx, GLuint name)
|
|||
return &rrb->base;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
radeon_bind_framebuffer(GLcontext * ctx, GLenum target,
|
||||
struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#define DBG 0
|
||||
|
||||
static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb);
|
||||
|
||||
static GLubyte *radeon_ptr32(const struct radeon_renderbuffer * rrb,
|
||||
GLint x, GLint y)
|
||||
{
|
||||
|
|
@ -366,6 +368,8 @@ static void map_buffer(struct gl_renderbuffer *rb, GLboolean write)
|
|||
__FUNCTION__, r);
|
||||
}
|
||||
}
|
||||
|
||||
radeonSetSpanFunctions(rrb);
|
||||
}
|
||||
|
||||
static void unmap_buffer(struct gl_renderbuffer *rb)
|
||||
|
|
@ -375,6 +379,8 @@ 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)
|
||||
|
|
@ -446,7 +452,7 @@ void radeonInitSpanFuncs(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);
|
||||
|
|
|
|||
|
|
@ -44,5 +44,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
extern void radeonInitSpanFuncs(GLcontext * ctx);
|
||||
|
||||
extern void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue