From: Stephane Marchesin Date: Sun, 3 Dec 2006 09:08:26 +0000 (+0000) Subject: Merge the pciid work. Use lock step versioning with the drm. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d88d895e5a642cffaaf6b654b27686f2eac901d2;p=mesa.git Merge the pciid work. Use lock step versioning with the drm. --- diff --git a/src/mesa/drivers/dri/nouveau/nouveau_card.c b/src/mesa/drivers/dri/nouveau/nouveau_card.c index 4a5d5eb9d7c..a0628389bf7 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_card.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_card.c @@ -1,48 +1,18 @@ #include "nouveau_card.h" #include "nouveau_reg.h" - -static nouveau_card nouveau_card_list[]={ -//{0x0010, "Riva 128", ????, NV_03, 0}, -{0x0020, "TNT/TNT2", NV04_DX6_MULTITEX_TRIANGLE, NV_04, 0}, -{0x00A0, "TNT2", NV04_DX6_MULTITEX_TRIANGLE, NV_04, 0}, -{0x0100, "GeForce", NV10_TCL_PRIMITIVE_3D, NV_10, 0}, -{0x0110, "GeForce 2 MX", NV15_TCL_PRIMITIVE_3D|0x1100, NV_10, 0}, -{0x01A0, "NForce", NV15_TCL_PRIMITIVE_3D|0x1100, NV_10, 0}, -{0x0150, "GeForce 2", NV15_TCL_PRIMITIVE_3D, NV_10, 0}, -{0x0170, "GeForce 4 MX", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, -{0x0180, "GeForce 4 MX", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, -{0x01F0, "NForce 2", NV15_TCL_PRIMITIVE_3D|0x1700, NV_10, NV_HAS_LMA}, -{0x0200, "GeForce 3", NV20_TCL_PRIMITIVE_3D|0x2000, NV_20, NV_HAS_LMA}, -{0x0250, "GeForce 4 Ti", NV20_TCL_PRIMITIVE_3D|0x2500, NV_20, NV_HAS_LMA}, -{0x0280, "GeForce 4 Ti", NV20_TCL_PRIMITIVE_3D|0x2500, NV_20, NV_HAS_LMA}, -{0x0320, "GeForce FX 5200/5500", NV30_TCL_PRIMITIVE_3D|0x3400, NV_30, NV_HAS_LMA}, -{0x0310, "GeForce FX 5600", NV30_TCL_PRIMITIVE_3D|0x3000, NV_30, NV_HAS_LMA}, -{0x0340, "GeForce FX 5700", NV30_TCL_PRIMITIVE_3D|0x3500, NV_30, NV_HAS_LMA}, -{0x0300, "GeForce FX 5800", NV30_TCL_PRIMITIVE_3D|0x3000, NV_30, NV_HAS_LMA}, -{0x0330, "GeForce FX 5900", NV30_TCL_PRIMITIVE_3D|0x3500, NV_30, NV_HAS_LMA}, -{0x0240, "GeForce 6100", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, -{0x0160, "GeForce 6200", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, -{0x0220, "GeForce 6200", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, -{0x0140, "GeForce 6200/6600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x0040, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x00C0, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x0210, "GeForce 6800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x01D0, "GeForce 7200/7300/7400", NV30_TCL_PRIMITIVE_3D|0x4400, NV_40, NV_HAS_LMA}, -{0x0390, "GeForce 7300/7600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x02E0, "GeForce 7300/7600", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x0090, "GeForce 7800", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -{0x0290, "GeForce 7900", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -/* catchall */ -{0x0000, "Unknown card", NV30_TCL_PRIMITIVE_3D|0x4000, NV_40, NV_HAS_LMA}, -}; +#include "nouveau_drm.h" +// FIXME hack for now +#define NV15_TCL_PRIMITIVE_3D 0x0096 +#define NV17_TCL_PRIMITIVE_3D 0x0099 +#include "nouveau_card_list.h" nouveau_card* nouveau_card_lookup(uint32_t device_id) { int i; for(i=0;iDriverCtx)) -/* Flags for what context state needs to be updated: */ -#define NOUVEAU_NEW_ALPHA 0x0001 -#define NOUVEAU_NEW_DEPTH 0x0002 -#define NOUVEAU_NEW_FOG 0x0004 -#define NOUVEAU_NEW_CLIP 0x0008 -#define NOUVEAU_NEW_CULL 0x0010 -#define NOUVEAU_NEW_MASKS 0x0020 -#define NOUVEAU_NEW_RENDER_NOT 0x0040 -#define NOUVEAU_NEW_WINDOW 0x0080 -#define NOUVEAU_NEW_CONTEXT 0x0100 -#define NOUVEAU_NEW_ALL 0x01ff - /* Flags for software fallback cases: */ #define NOUVEAU_FALLBACK_TEXTURE 0x0001 #define NOUVEAU_FALLBACK_DRAW_BUFFER 0x0002 diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c index 9fac6a48dfc..0b745e1e740 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c @@ -90,7 +90,8 @@ void nouveauWaitForIdleLocked(nouveauContextPtr nmesa) case NV_20: case NV_30: case NV_40: - case G_70: + case NV_44: + case NV_50: default: status=NV_READ(NV04_STATUS); break; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 44b9f356d15..51993cf5565 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -60,7 +60,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define OUT_RINGp(ptr,sz) do { \ uint32_t* p=(uint32_t*)(ptr); \ -int i; printf("OUT_RINGp: (size 0x%x dwords)\n",sz); for(i=0;ipatch) + return NULL; + psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL, ddx_version, dri_version, drm_version, frame_buffer, pSAREA, fd, diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c index 97ea1ee547a..63da8420b29 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -173,10 +173,11 @@ nouveauShaderInitFuncs(GLcontext * ctx) NV30FPInitShaderFuncs(&nmesa->FPfunc); break; case NV_40: - case G_70: + case NV_44: NV40VPInitShaderFuncs(&nmesa->VPfunc); NV40FPInitShaderFuncs(&nmesa->FPfunc); break; + case NV_50: default: return; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 1445ee74497..88a8c9ed59c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -168,7 +168,7 @@ void nouveauDDInitState(nouveauContextPtr nmesa) break; case NV_30: case NV_40: - case G_70: + case NV_50: nv30InitStateFuncs(&nmesa->glCtx->Driver); break; default: