mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
r100/r200/r300/r300: only enable accelerated pixel ops with kms
fixes fdo bug 27043
This commit is contained in:
parent
475ab3b5af
commit
d1ca1599f0
10 changed files with 30 additions and 22 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Reference in a new issue