Browse Source

r100/r200/r300/r300: only enable accelerated pixel ops with kms

fixes fdo bug 27043
tags/mesa-7.9-rc1
Alex Deucher 16 years ago
parent
commit
d1ca1599f0

+ 1
- 1
src/mesa/drivers/dri/r200/r200_context.c View File

@@ -324,7 +324,7 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
_mesa_init_driver_functions(&functions);
r200InitDriverFuncs(&functions);
r200InitIoctlFuncs(&functions);
r200InitStateFuncs(&functions);
r200InitStateFuncs(&rmesa->radeon, &functions);
r200InitTextureFuncs(&rmesa->radeon, &functions);
r200InitShaderFuncs(&functions);
radeonInitQueryObjFunctions(&functions);

+ 7
- 4
src/mesa/drivers/dri/r200/r200_state.c View File

@@ -2488,16 +2488,19 @@ static void r200PolygonStipple( GLcontext *ctx, const GLubyte *mask )
}
/* Initialize the driver's state functions.
*/
void r200InitStateFuncs( struct dd_function_table *functions )
void r200InitStateFuncs( radeonContextPtr radeon, struct dd_function_table *functions )
{
functions->UpdateState = r200InvalidateState;
functions->LightingSpaceChange = r200LightingSpaceChange;

functions->DrawBuffer = radeonDrawBuffer;
functions->ReadBuffer = radeonReadBuffer;
functions->CopyPixels = _mesa_meta_CopyPixels;
functions->DrawPixels = _mesa_meta_DrawPixels;
functions->ReadPixels = radeonReadPixels;

if (radeon->radeonScreen->kernel_mm) {
functions->CopyPixels = _mesa_meta_CopyPixels;
functions->DrawPixels = _mesa_meta_DrawPixels;
functions->ReadPixels = radeonReadPixels;
}

functions->AlphaFunc = r200AlphaFunc;
functions->BlendColor = r200BlendColor;

+ 1
- 1
src/mesa/drivers/dri/r200/r200_state.h View File

@@ -38,7 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_context.h"

extern void r200InitState( r200ContextPtr rmesa );
extern void r200InitStateFuncs( struct dd_function_table *functions );
extern void r200InitStateFuncs( radeonContextPtr radeon, struct dd_function_table *functions );
extern void r200InitTnlFuncs( GLcontext *ctx );

extern void r200UpdateMaterial( GLcontext *ctx );

+ 1
- 1
src/mesa/drivers/dri/r300/r300_context.c View File

@@ -500,7 +500,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,

_mesa_init_driver_functions(&functions);
r300InitIoctlFuncs(&functions);
r300InitStateFuncs(&functions);
r300InitStateFuncs(&r300->radeon, &functions);
r300InitTextureFuncs(&r300->radeon, &functions);
r300InitShaderFuncs(&functions);
radeonInitQueryObjFunctions(&functions);

+ 6
- 4
src/mesa/drivers/dri/r300/r300_state.c View File

@@ -2354,7 +2354,7 @@ static void r300RenderMode(GLcontext * ctx, GLenum mode)
/**
* Initialize driver's state callback functions
*/
void r300InitStateFuncs(struct dd_function_table *functions)
void r300InitStateFuncs(radeonContextPtr radeon, struct dd_function_table *functions)
{

functions->UpdateState = r300InvalidateState;
@@ -2396,9 +2396,11 @@ void r300InitStateFuncs(struct dd_function_table *functions)
functions->DrawBuffer = radeonDrawBuffer;
functions->ReadBuffer = radeonReadBuffer;

functions->CopyPixels = _mesa_meta_CopyPixels;
functions->DrawPixels = _mesa_meta_DrawPixels;
functions->ReadPixels = radeonReadPixels;
if (radeon->radeonScreen->kernel_mm) {
functions->CopyPixels = _mesa_meta_CopyPixels;
functions->DrawPixels = _mesa_meta_DrawPixels;
functions->ReadPixels = radeonReadPixels;
}
}

void r300InitShaderFunctions(r300ContextPtr r300)

+ 1
- 1
src/mesa/drivers/dri/r300/r300_state.h View File

@@ -55,7 +55,7 @@ void r300UpdateDrawBuffer (GLcontext * ctx);
void r300UpdateShaders (r300ContextPtr rmesa);
void r300UpdateShaderStates (r300ContextPtr rmesa);
void r300InitState (r300ContextPtr r300);
void r300InitStateFuncs (struct dd_function_table *functions);
void r300InitStateFuncs (radeonContextPtr radeon, struct dd_function_table *functions);
void r300VapCntl(r300ContextPtr rmesa, GLuint input_count, GLuint output_count, GLuint temp_count);
void r300SetupVAP(GLcontext *ctx, GLuint InputsRead, GLuint OutputsWritten);


+ 1
- 1
src/mesa/drivers/dri/r600/r600_context.c View File

@@ -384,7 +384,7 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual,
*/
_mesa_init_driver_functions(&functions);

r700InitStateFuncs(&functions);
r700InitStateFuncs(&r600->radeon, &functions);
r600InitTextureFuncs(&r600->radeon, &functions);
r700InitShaderFuncs(&functions);
radeonInitQueryObjFunctions(&functions);

+ 6
- 5
src/mesa/drivers/dri/r600/r700_state.c View File

@@ -1817,7 +1817,7 @@ void r700InitState(GLcontext * ctx) //-------------------

}

void r700InitStateFuncs(struct dd_function_table *functions) //-----------------
void r700InitStateFuncs(radeonContextPtr radeon, struct dd_function_table *functions)
{
functions->UpdateState = r700InvalidateState;
functions->AlphaFunc = r700AlphaFunc;
@@ -1861,9 +1861,10 @@ void r700InitStateFuncs(struct dd_function_table *functions) //-----------------
functions->DrawBuffer = radeonDrawBuffer;
functions->ReadBuffer = radeonReadBuffer;

functions->CopyPixels = _mesa_meta_CopyPixels;
functions->DrawPixels = _mesa_meta_DrawPixels;
functions->ReadPixels = radeonReadPixels;

if (radeon->radeonScreen->kernel_mm) {
functions->CopyPixels = _mesa_meta_CopyPixels;
functions->DrawPixels = _mesa_meta_DrawPixels;
functions->ReadPixels = radeonReadPixels;
}
}


+ 1
- 1
src/mesa/drivers/dri/r600/r700_state.h View File

@@ -40,7 +40,7 @@ extern void r700UpdateShaderStates(GLcontext * ctx);
extern void r700UpdateViewportOffset(GLcontext * ctx);

extern void r700InitState (GLcontext * ctx);
extern void r700InitStateFuncs (struct dd_function_table *functions);
extern void r700InitStateFuncs (radeonContextPtr radeon, struct dd_function_table *functions);

extern void r700SetScissor(context_t *context);


+ 5
- 3
src/mesa/drivers/dri/radeon/radeon_state.c View File

@@ -2249,9 +2249,11 @@ void radeonInitStateFuncs( GLcontext *ctx , GLboolean dri2 )

ctx->Driver.DrawBuffer = radeonDrawBuffer;
ctx->Driver.ReadBuffer = radeonReadBuffer;
ctx->Driver.CopyPixels = _mesa_meta_CopyPixels;
ctx->Driver.DrawPixels = _mesa_meta_DrawPixels;
ctx->Driver.ReadPixels = radeonReadPixels;
if (dri2) {
ctx->Driver.CopyPixels = _mesa_meta_CopyPixels;
ctx->Driver.DrawPixels = _mesa_meta_DrawPixels;
ctx->Driver.ReadPixels = radeonReadPixels;
}

ctx->Driver.AlphaFunc = radeonAlphaFunc;
ctx->Driver.BlendEquationSeparate = radeonBlendEquationSeparate;

Loading…
Cancel
Save