mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 00:00:25 +01:00
Lay ground work for cut-down radeon driver.
NOTE: commented out a couple of places where core mesa calls directly into
the swrast module.
This commit is contained in:
parent
695b197cb2
commit
2c2bcf8268
7 changed files with 41 additions and 23 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.1.2.7 2002/12/30 13:15:55 keithw Exp $
|
||||
# $Id: Makefile,v 1.1.2.8 2002/12/30 15:20:36 keithw Exp $
|
||||
|
||||
# Mesa 3-D graphics library
|
||||
# Version: 5.0
|
||||
|
|
@ -12,7 +12,8 @@ MESABUILDDIR = ../..
|
|||
INCLUDES = -I$(MESABUILDDIR) -I$(MESA)/include -I. -I../common \
|
||||
-I$(MESABUILDDIR)/miniglx -Iserver
|
||||
|
||||
CFLAGS = $(INCLUDES) -g -MD -DGLX_DIRECT_RENDERING
|
||||
DEFINES = -D_HAVE_SWRAST=1 -D_HAVE_SWTNL=1 -D_HAVE_SANITY=1
|
||||
CFLAGS = $(INCLUDES) $(DEFINES) -g -MD -DGLX_DIRECT_RENDERING
|
||||
|
||||
# The .a files for each mesa module required by this driver:
|
||||
#
|
||||
|
|
@ -87,4 +88,4 @@ include $(C_SOURCES:.c=.d)
|
|||
.SUFFIXES: .c .d
|
||||
|
||||
.c.d:
|
||||
$(CC) -M $(INCLUDES) $< > $@
|
||||
$(CC) -M $(INCLUDES) $(DEFINES) $< > $@
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ static int RADEONEngineRestore( struct MiniGLXDisplayRec *dpy,
|
|||
OUTREG(RADEON_AUX_SC_CNTL, 0);
|
||||
|
||||
/* RADEONWaitForIdleMMIO(dpy); */
|
||||
sleep(2);
|
||||
/* sleep(2); */
|
||||
}
|
||||
|
||||
/* Compute log base 2 of val */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: image.c,v 1.69 2002/10/24 23:57:21 brianp Exp $ */
|
||||
/* $Id: image.c,v 1.69.4.1 2002/12/30 15:20:35 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -938,11 +938,11 @@ _mesa_pack_float_rgba_span( GLcontext *ctx,
|
|||
}
|
||||
/* update histogram count */
|
||||
if (transferOps & IMAGE_HISTOGRAM_BIT) {
|
||||
_mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
|
||||
/* _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */
|
||||
}
|
||||
/* min/max here */
|
||||
if (transferOps & IMAGE_MIN_MAX_BIT) {
|
||||
_mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
|
||||
/* _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */
|
||||
if (ctx->MinMax.Sink) {
|
||||
UNDEFARRAY(rgbaCopy); /* mac 32k limitation */
|
||||
return;
|
||||
|
|
@ -2814,11 +2814,11 @@ _mesa_unpack_chan_color_span( GLcontext *ctx,
|
|||
}
|
||||
/* update histogram count */
|
||||
if (transferOps & IMAGE_HISTOGRAM_BIT) {
|
||||
_mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
|
||||
/* _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */
|
||||
}
|
||||
/* min/max here */
|
||||
if (transferOps & IMAGE_MIN_MAX_BIT) {
|
||||
_mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
|
||||
/* _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3091,11 +3091,11 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
|
|||
}
|
||||
/* update histogram count */
|
||||
if (transferOps & IMAGE_HISTOGRAM_BIT) {
|
||||
_mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
|
||||
/* _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */
|
||||
}
|
||||
/* min/max here */
|
||||
if (transferOps & IMAGE_MIN_MAX_BIT) {
|
||||
_mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
|
||||
/* _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: swrast.h,v 1.33 2002/11/13 16:47:18 brianp Exp $ */
|
||||
/* $Id: swrast.h,v 1.32.4.1 2002/12/30 15:20:37 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 5.1
|
||||
* Version: 4.1
|
||||
*
|
||||
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
|
||||
*
|
||||
|
|
@ -34,6 +34,10 @@
|
|||
#ifndef SWRAST_H
|
||||
#define SWRAST_H
|
||||
|
||||
#if !_HAVE_SWRAST
|
||||
#error "_HAVE_SWRAST not set"
|
||||
#endif
|
||||
|
||||
#include "mtypes.h"
|
||||
|
||||
/**
|
||||
|
|
@ -458,8 +462,6 @@ struct swrast_device_driver {
|
|||
void (*WriteMonoRGBASpan)( const GLcontext *ctx, GLuint n, GLint x, GLint y,
|
||||
const GLchan color[4], const GLubyte mask[] );
|
||||
/* Write a horizontal run of RGBA pixels all with the same color.
|
||||
* If mask is NULL, draw all pixels.
|
||||
* If mask is not null, only draw pixel [i] when mask [i] is true.
|
||||
*/
|
||||
|
||||
void (*WriteRGBAPixels)( const GLcontext *ctx,
|
||||
|
|
@ -481,16 +483,12 @@ struct swrast_device_driver {
|
|||
/* Write a horizontal run of CI pixels. One function is for 32bpp
|
||||
* indexes and the other for 8bpp pixels (the common case). You mus
|
||||
* implement both for color index mode.
|
||||
* If mask is NULL, draw all pixels.
|
||||
* If mask is not null, only draw pixel [i] when mask [i] is true.
|
||||
*/
|
||||
|
||||
void (*WriteMonoCISpan)( const GLcontext *ctx, GLuint n, GLint x, GLint y,
|
||||
GLuint colorIndex, const GLubyte mask[] );
|
||||
/* Write a horizontal run of color index pixels using the color index
|
||||
* last specified by the Index() function.
|
||||
* If mask is NULL, draw all pixels.
|
||||
* If mask is not null, only draw pixel [i] when mask [i] is true.
|
||||
*/
|
||||
|
||||
void (*WriteCI32Pixels)( const GLcontext *ctx,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: t_context.h,v 1.43 2002/10/09 19:45:53 brianp Exp $ */
|
||||
/* $Id: t_context.h,v 1.43.6.1 2002/12/30 15:20:38 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -40,6 +40,9 @@
|
|||
#include "math/m_vector.h"
|
||||
#include "math/m_xform.h"
|
||||
|
||||
#if !_HAVE_SWTNL
|
||||
#error "_HAVE_SWTNL not set"
|
||||
#endif
|
||||
|
||||
#define MAX_PIPELINE_STAGES 30
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: tnl.h,v 1.10 2002/10/29 20:29:04 brianp Exp $ */
|
||||
/* $Id: tnl.h,v 1.10.4.1 2002/12/30 15:20:38 keithw Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -30,6 +30,10 @@
|
|||
#ifndef _TNL_H
|
||||
#define _TNL_H
|
||||
|
||||
#if !_HAVE_SWTNL
|
||||
#error "_HAVE_SWTNL not set"
|
||||
#endif
|
||||
|
||||
#include "mtypes.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: miniglx.c,v 1.1.4.26 2002/12/30 13:15:56 keithw Exp $ */
|
||||
/* $Id: miniglx.c,v 1.1.4.27 2002/12/30 15:20:37 keithw Exp $ */
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -579,7 +579,19 @@ InitializeScreenConfigs(int *numConfigs, __GLXvisualConfig **configs)
|
|||
int __read_config_file( Display *dpy )
|
||||
{
|
||||
const char *dev = getenv("MINIGLX_DRIVER");
|
||||
if (dev && strcmp(dev, "radeon") == 0) {
|
||||
if (dev && strcmp(dev, "es") == 0) {
|
||||
dpy->fbdevDevice = "/dev/fb0";
|
||||
dpy->clientDriverName = "radeon_es.so";
|
||||
dpy->drmModuleName = "radeon";
|
||||
dpy->pciBus = 1;
|
||||
dpy->pciDevice = 0;
|
||||
dpy->pciFunc = 0;
|
||||
dpy->chipset = 0x5144; /* radeon qd */
|
||||
dpy->pciBusID = malloc(64);
|
||||
sprintf((char *)dpy->pciBusID, "PCI:%d:%d:%d",
|
||||
dpy->pciBus, dpy->pciDevice, dpy->pciFunc);
|
||||
}
|
||||
else if (dev && strcmp(dev, "radeon") == 0) {
|
||||
dpy->fbdevDevice = "/dev/fb0";
|
||||
dpy->clientDriverName = "radeon_dri.so";
|
||||
dpy->drmModuleName = "radeon";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue