mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 01:20:22 +01:00
A bit of r300 cleanup.
This commit is contained in:
parent
e9b08e7373
commit
4aaaecbfa6
4 changed files with 14 additions and 12 deletions
|
|
@ -41,12 +41,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
|||
|
||||
r300->winsys = amd_winsys;
|
||||
r300->context.winsys = winsys;
|
||||
if (screen) {
|
||||
r300->context.screen = screen;
|
||||
} else {
|
||||
/* XXX second arg should be pciid, find a way to get it from winsys */
|
||||
r300->context.screen = r300_create_screen(winsys, 0x0);
|
||||
}
|
||||
r300->context.screen = screen;
|
||||
|
||||
r300->context.destroy = r300_destroy_context;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
#ifndef R300_CONTEXT_H
|
||||
#define R300_CONTEXT_H
|
||||
|
||||
#include "draw/draw_context.h"
|
||||
#include "pipe/p_context.h"
|
||||
|
||||
#include "r300_surface.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
struct r300_context {
|
||||
/* Parent class */
|
||||
|
|
@ -47,4 +47,11 @@ static struct r300_context* r300_context(struct pipe_context* context) {
|
|||
return (struct r300_context*)context;
|
||||
}
|
||||
|
||||
/* Context initialization. */
|
||||
void r300_init_surface_functions(struct r300_context* r300);
|
||||
|
||||
struct pipe_context* r300_create_context(struct pipe_screen* screen,
|
||||
struct pipe_winsys* winsys,
|
||||
struct amd_winsys* amd_winsys);
|
||||
|
||||
#endif /* R300_CONTEXT_H */
|
||||
|
|
@ -31,6 +31,4 @@
|
|||
#include "r300_blit.h"
|
||||
#include "r300_context.h"
|
||||
|
||||
void r300_init_surface_functions(struct r300_context* r300);
|
||||
|
||||
#endif /* R300_SURFACE_H */
|
||||
|
|
|
|||
|
|
@ -243,8 +243,10 @@ GLboolean amd_context_create(const __GLcontextModes *visual,
|
|||
}
|
||||
|
||||
if (GL_TRUE) {
|
||||
/* XXX "NULL" is a struct pipe_screen* just in case we ever need it... */
|
||||
pipe = r300_create_context(NULL, amd_context->pipe_winsys,
|
||||
amd_context->pipe_screen = r300_create_screen(amd_context->pipe_winsys,
|
||||
0x0);
|
||||
pipe = r300_create_context(amd_context->pipe_screen,
|
||||
amd_context->pipe_winsys,
|
||||
(struct amd_pipe_winsys*)amd_context->pipe_winsys);
|
||||
} else {
|
||||
pipe = amd_create_softpipe(amd_context);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue