docs/news.html | 2 src/glx/x11/glxext.c | 2 src/mesa/drivers/dri/r300/r300_ioctl.c | 15 ++-- src/mesa/drivers/dri/r300/r300_render.c | 8 ++ src/mesa/drivers/dri/r300/r300_state.c | 15 ++-- src/mesa/drivers/dri/radeon/radeon_chipset.h | 3 src/mesa/drivers/dri/radeon/radeon_screen.c | 5 + src/mesa/shader/program.c | 4 - src/mesa/state_tracker/st_atom_scissor.c | 13 ++- src/mesa/state_tracker/st_extensions.c | 91 +++++++++++++++++++++++++++ 10 files changed, 136 insertions(+), 22 deletions(-)
New commits: commit 8ba378d9698be4fe24585beb10cadb95746f2a94 Author: José Fonseca <jfons...@vmware.com> Date: Tue May 4 10:09:49 2010 +0100 mesa/st: Fill in native program limits. In the lack of more fine grained capabilities in Gallium, assume that if the pipe driver supports GLSL then native limits match Mesa software limits. (cherry picked from commit 40a90cd11234a09c2477f5c9984dd6d9fac3f52c) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 54d7c61..5c827a2 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -67,6 +67,7 @@ void st_init_limits(struct st_context *st) { struct pipe_screen *screen = st->pipe->screen; struct gl_constants *c = &st->ctx->Const; + struct gl_program_constants *pc; c->MaxTextureLevels = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS), @@ -124,6 +125,96 @@ void st_init_limits(struct st_context *st) /* XXX separate query for early function return? */ st->ctx->Shader.EmitContReturn = screen->get_param(screen, PIPE_CAP_TGSI_CONT_SUPPORTED); + + if (screen->get_param(screen, PIPE_CAP_GLSL)) { + /* + * In the lack of more fine grained capabilities, if the pipe driver supports + * GLSL then assume native limits match Mesa software limits. + */ + + pc = &c->FragmentProgram; + pc->MaxNativeInstructions = pc->MaxInstructions; + pc->MaxNativeAluInstructions = pc->MaxAluInstructions; + pc->MaxNativeTexInstructions = pc->MaxTexInstructions; + pc->MaxNativeTexIndirections = pc->MaxTexIndirections; + pc->MaxNativeAttribs = pc->MaxAttribs; + pc->MaxNativeTemps = pc->MaxTemps; + pc->MaxNativeAddressRegs = pc->MaxAddressRegs; + pc->MaxNativeParameters = pc->MaxParameters; + + pc = &c->VertexProgram; + pc->MaxNativeInstructions = pc->MaxInstructions; + pc->MaxNativeAluInstructions = pc->MaxAluInstructions; + pc->MaxNativeTexInstructions = pc->MaxTexInstructions; + pc->MaxNativeTexIndirections = pc->MaxTexIndirections; + pc->MaxNativeAttribs = pc->MaxAttribs; + pc->MaxNativeTemps = pc->MaxTemps; + pc->MaxNativeAddressRegs = pc->MaxAddressRegs; + pc->MaxNativeParameters = pc->MaxParameters; + } else if (screen->get_param(screen, PIPE_CAP_SM3)) { + /* + * Assume the hardware meets the minimum requirements + * for Shader Model 3. + * + * See also: + * - http://msdn.microsoft.com/en-us/library/bb172920(VS.85).aspx + * - http://msdn.microsoft.com/en-us/library/bb172963(VS.85).aspx + */ + + pc = &c->FragmentProgram; + pc->MaxNativeInstructions = 512; /* D3DMIN30SHADERINSTRUCTIONS */ + pc->MaxNativeAluInstructions = pc->MaxNativeInstructions; + pc->MaxNativeTexInstructions = pc->MaxNativeInstructions; + pc->MaxNativeTexIndirections = pc->MaxNativeTexInstructions; + pc->MaxNativeAttribs = 10; + pc->MaxNativeTemps = 32; + pc->MaxNativeAddressRegs = 1; /* aL */ + pc->MaxNativeParameters = 224; + + pc = &c->VertexProgram; + pc->MaxNativeInstructions = 512; /* D3DMIN30SHADERINSTRUCTIONS */ + pc->MaxNativeAluInstructions = pc->MaxNativeInstructions; + pc->MaxNativeTexInstructions = pc->MaxNativeInstructions; + pc->MaxNativeTexIndirections = pc->MaxNativeTexInstructions; + pc->MaxNativeAttribs = 16; + pc->MaxNativeTemps = 32; + pc->MaxNativeAddressRegs = 2; /* a0 and aL */ + pc->MaxNativeParameters = 256; + } else { + /* + * Assume the hardware meets the minimum requirements + * for Shader Model 2. + * + * See also: + * - http://msdn.microsoft.com/en-us/library/bb172918(VS.85).aspx + * - http://msdn.microsoft.com/en-us/library/bb172961(VS.85).aspx + */ + + pc = &c->FragmentProgram; + pc->MaxNativeInstructions = 96; /* D3DPS20_MIN_NUMINSTRUCTIONSLOTS */ + pc->MaxNativeAluInstructions = 64; + pc->MaxNativeTexInstructions = 32; + pc->MaxNativeTexIndirections = pc->MaxNativeTexInstructions; + pc->MaxNativeAttribs = 10; /* 2 color + 8 texture coord */ + pc->MaxNativeTemps = 12; /* D3DPS20_MIN_NUMTEMPS */ + pc->MaxNativeAddressRegs = 0; + pc->MaxNativeParameters = 16; + + pc = &c->VertexProgram; + pc->MaxNativeInstructions = 256; + pc->MaxNativeAluInstructions = 256; + pc->MaxNativeTexInstructions = 0; + pc->MaxNativeTexIndirections = 0; + pc->MaxNativeAttribs = 16; + pc->MaxNativeTemps = 12; /* D3DVS20_MIN_NUMTEMPS */ + pc->MaxNativeAddressRegs = 2; /* a0 and aL */ + pc->MaxNativeParameters = 256; + } + + if (!screen->get_param(screen, PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS)) { + c->VertexProgram.MaxNativeTexInstructions = 0; + c->VertexProgram.MaxNativeTexIndirections = 0; + } } commit 942ec8722d4d903820a5c9b0720f9aff0f938888 Author: Ian Romanick <ian.d.roman...@intel.com> Date: Fri Apr 23 11:53:50 2010 -0700 Fix __glXInitializeVisualConfigFromTags's handling of unrecognized fbconfig __glXInitializeVisualConfigFromTags doesn't skip the payload of unrecognized tags. Instead, it treats the value as if it were the next tag, which can happen if the server's GLX extension is not Mesa's. For example, this falls down when NVIDIA sends a GLX_FLOAT_COMPONENTS_NV = 0 pair, causing __glXInitializeVisualConfigFromTags to bail out early. Signed-off-by: Aaron Plattner <aplatt...@nvidia.com> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index 5633a3e..bdc6e31 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -442,6 +442,8 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, i = count; break; default: + /* Ignore the unrecognized tag's value */ + bp++; break; } } commit 45affda4bf056ac07a1db2c2d973ad51d9135ea7 Author: Tormod Volden <debian.tor...@gmail.com> Date: Thu Apr 22 21:52:15 2010 +0200 radeon: 9800 SE has only one quadpipe Although these cards have 2 pipelines on the silicon only the first passed the QA and the other should be disabled. http://www.digital-daily.com/video/ati-radeon9800se/ http://www.rojakpot.com/showarticle.aspx?artno=101&pgno=1 Signed-off-by: Tormod Volden <debian.tor...@gmail.com> diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index a711af8..0d29547 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -1138,6 +1138,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) /* pipe overrides */ switch (dri_priv->deviceID) { case PCI_CHIP_R300_AD: /* 9500 with 1 quadpipe verified by: Reid Linnemann <lr...@cs.okstate.edu> */ + case PCI_CHIP_R350_AH: /* 9800 SE only have 1 quadpipe */ case PCI_CHIP_RV410_5E4C: /* RV410 SE only have 1 quadpipe */ case PCI_CHIP_RV410_5E4F: /* RV410 SE only have 1 quadpipe */ screen->num_gb_pipes = 1; @@ -1345,6 +1346,7 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv) /* pipe overrides */ switch (device_id) { case PCI_CHIP_R300_AD: /* 9500 with 1 quadpipe verified by: Reid Linnemann <lr...@cs.okstate.edu> */ + case PCI_CHIP_R350_AH: /* 9800 SE only have 1 quadpipe */ case PCI_CHIP_RV410_5E4C: /* RV410 SE only have 1 quadpipe */ case PCI_CHIP_RV410_5E4F: /* RV410 SE only have 1 quadpipe */ screen->num_gb_pipes = 1; commit 593f7cc315082c1b8da207477fb6b7051c5afd58 Author: Alex Deucher <alexdeuc...@gmail.com> Date: Thu Apr 22 02:16:41 2010 -0400 r300: fix vertex unit setup RV3xx is 2, RV560,RV570 is 8 Noticed by Tormod Volden. diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index bb34efe..369a6e1 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -532,20 +532,21 @@ static void r300EmitClearState(GLcontext * ctx) (5 << R300_VF_MAX_VTX_NUM_SHIFT)); } - if (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV515) - vap_cntl |= (2 << R300_PVS_NUM_FPUS_SHIFT); - else if ((r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) || - (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) || - (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570)) + if ((r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R300) || + (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R350)) + vap_cntl |= (4 << R300_PVS_NUM_FPUS_SHIFT); + else if (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) vap_cntl |= (5 << R300_PVS_NUM_FPUS_SHIFT); else if ((r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV410) || (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R420)) vap_cntl |= (6 << R300_PVS_NUM_FPUS_SHIFT); else if ((r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R520) || - (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580)) + (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580) || + (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) || + (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570)) vap_cntl |= (8 << R300_PVS_NUM_FPUS_SHIFT); else - vap_cntl |= (4 << R300_PVS_NUM_FPUS_SHIFT); + vap_cntl |= (2 << R300_PVS_NUM_FPUS_SHIFT); R300_STATECHANGE(r300, vap_cntl); diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index a1f2590..4387756 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1659,20 +1659,21 @@ void r300VapCntl(r300ContextPtr rmesa, GLuint input_count, (5 << R300_PVS_NUM_CNTLRS_SHIFT) | (5 << R300_VF_MAX_VTX_NUM_SHIFT)); - if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV515) - rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (2 << R300_PVS_NUM_FPUS_SHIFT); - else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570)) + if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R300) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R350)) + rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (4 << R300_PVS_NUM_FPUS_SHIFT); + else if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (5 << R300_PVS_NUM_FPUS_SHIFT); else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV410) || (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R420)) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (6 << R300_PVS_NUM_FPUS_SHIFT); else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R520) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580)) + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570)) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (8 << R300_PVS_NUM_FPUS_SHIFT); else - rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (4 << R300_PVS_NUM_FPUS_SHIFT); + rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (2 << R300_PVS_NUM_FPUS_SHIFT); } commit 6d18fd675628440a326bf4c3482937f36d56f8bd Author: Brian Paul <bri...@vmware.com> Date: Mon Apr 19 10:13:40 2010 -0600 st/mesa: invert scissor rect depending on FB orientation Fixes fd.o bug 27715 (cherry picked from commit c060265bdb953f0c9d73e60f08c53a2e3b1a1176) diff --git a/src/mesa/state_tracker/st_atom_scissor.c b/src/mesa/state_tracker/st_atom_scissor.c index 5e0c51c..56b1383 100644 --- a/src/mesa/state_tracker/st_atom_scissor.c +++ b/src/mesa/state_tracker/st_atom_scissor.c @@ -72,12 +72,15 @@ update_scissor( struct st_context *st ) scissor.minx = scissor.miny = scissor.maxx = scissor.maxy = 0; } - /* Now invert Y. Pipe drivers use the convention Y=0=top for surfaces + /* Now invert Y if needed. + * Gallium drivers use the convention Y=0=top for surfaces. */ - miny = fb->Height - scissor.maxy; - maxy = fb->Height - scissor.miny; - scissor.miny = miny; - scissor.maxy = maxy; + if (st_fb_orientation(fb) == Y_0_TOP) { + miny = fb->Height - scissor.maxy; + maxy = fb->Height - scissor.miny; + scissor.miny = miny; + scissor.maxy = maxy; + } if (memcmp(&scissor, &st->state.scissor, sizeof(scissor)) != 0) { /* state has changed */ commit 51d4d0a12e296b5a96a62bf47c98e9bd0756fc82 Author: Alex Deucher <alexdeuc...@gmail.com> Date: Fri Apr 9 20:20:42 2010 -0400 r600: add new r7xx pci ids diff --git a/src/mesa/drivers/dri/radeon/radeon_chipset.h b/src/mesa/drivers/dri/radeon/radeon_chipset.h index f17a305..98732c8 100644 --- a/src/mesa/drivers/dri/radeon/radeon_chipset.h +++ b/src/mesa/drivers/dri/radeon/radeon_chipset.h @@ -357,6 +357,7 @@ #define PCI_CHIP_RV770_9456 0x9456 #define PCI_CHIP_RV770_945A 0x945A #define PCI_CHIP_RV770_945B 0x945B +#define PCI_CHIP_RV770_945E 0x945E #define PCI_CHIP_RV790_9460 0x9460 #define PCI_CHIP_RV790_9462 0x9462 #define PCI_CHIP_RV770_946A 0x946A @@ -368,6 +369,7 @@ #define PCI_CHIP_RV730_9487 0x9487 #define PCI_CHIP_RV730_9488 0x9488 #define PCI_CHIP_RV730_9489 0x9489 +#define PCI_CHIP_RV730_948A 0x948A #define PCI_CHIP_RV730_948F 0x948F #define PCI_CHIP_RV730_9490 0x9490 #define PCI_CHIP_RV730_9491 0x9491 @@ -386,6 +388,7 @@ #define PCI_CHIP_RV710_9553 0x9553 #define PCI_CHIP_RV710_9555 0x9555 #define PCI_CHIP_RV710_9557 0x9557 +#define PCI_CHIP_RV710_955F 0x955F #define PCI_CHIP_RV740_94A0 0x94A0 #define PCI_CHIP_RV740_94A1 0x94A1 diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 9eb19b2..a711af8 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -848,6 +848,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id) case PCI_CHIP_RV770_9456: case PCI_CHIP_RV770_945A: case PCI_CHIP_RV770_945B: + case PCI_CHIP_RV770_945E: case PCI_CHIP_RV790_9460: case PCI_CHIP_RV790_9462: case PCI_CHIP_RV770_946A: @@ -862,6 +863,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id) case PCI_CHIP_RV730_9487: case PCI_CHIP_RV730_9488: case PCI_CHIP_RV730_9489: + case PCI_CHIP_RV730_948A: case PCI_CHIP_RV730_948F: case PCI_CHIP_RV730_9490: case PCI_CHIP_RV730_9491: @@ -883,6 +885,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id) case PCI_CHIP_RV710_9553: case PCI_CHIP_RV710_9555: case PCI_CHIP_RV710_9557: + case PCI_CHIP_RV710_955F: screen->chip_family = CHIP_FAMILY_RV710; screen->chip_flags = RADEON_CHIPSET_TCL; break; commit a5489649593427e47b039ad0d4a98cbb4e547f69 Author: Maciej Cencora <m.cenc...@gmail.com> Date: Fri Apr 9 21:14:15 2010 +0200 r300: set proper vertex index limits also in non indexed mode Fixes #27521, broken menus in UT2004 and broken water refraction in Sauerbraten. diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index e3e6285..9f3256c 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -386,6 +386,14 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim) WARN_ONCE("Fixme: can't handle spliting prim %d\n", prim); return; } + + if (rmesa->radeon.radeonScreen->kernel_mm) { + BEGIN_BATCH_NO_AUTOSTATE(2); + OUT_BATCH_REGSEQ(R300_VAP_VF_MAX_VTX_INDX, 1); + OUT_BATCH(rmesa->radeon.tcl.aos[0].count); + END_BATCH(); + } + r300_emit_scissor(rmesa->radeon.glCtx); while (num_verts > 0) { int nr; commit 08b98fac6243ff2f0c26dedc374d7cefff51fd38 Author: Brian Paul <bri...@vmware.com> Date: Fri Apr 9 10:12:02 2010 -0600 mesa: fix instruction indexing bugs We were looping over instructions but only looking at the 0th instruction's opcode. Fixes fd.o bug 27566. (cherry picked from commit b22a00bff4aadd390dd8af6b5b05bd2833ec7f85) diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index ef0c276..89cb441 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -623,7 +623,7 @@ replace_registers(struct prog_instruction *inst, GLuint numInst, GLuint i, j; for (i = 0; i < numInst; i++) { /* src regs */ - for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) { + for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) { if (inst[i].SrcReg[j].File == oldFile && inst[i].SrcReg[j].Index == oldIndex) { inst[i].SrcReg[j].File = newFile; @@ -650,7 +650,7 @@ adjust_param_indexes(struct prog_instruction *inst, GLuint numInst, { GLuint i, j; for (i = 0; i < numInst; i++) { - for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) { + for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) { GLuint f = inst[i].SrcReg[j].File; if (f == PROGRAM_CONSTANT || f == PROGRAM_UNIFORM || commit 65c337e29be884680e380b34b7542dca93824e00 Author: Jeremy Huddleston <jerem...@apple.com> Date: Thu Apr 1 18:14:04 2010 -0700 Revert accidental commits from the xquartz tree This reverts commit 5726f2f1b8c613cf1b4a282684f4acd880ca0716. This reverts commit 2d5c596ca45b03605294f56367e8126b9e27e15a. This reverts commit 48ea93eb88e9fde246734490523cd6cd54244407. This reverts commit 3e6d5aedf0e1edbc6b38a54a8fa87ad4d228d3d0. This reverts commit cfb4f95bd5be6d5621c98be5e891e455eb40915c. This reverts commit d57aa45dac3026b27e2da530e98cf50bdd0b9eab. diff --git a/configs/darwin b/configs/darwin index e43bd68..336b54e 100644 --- a/configs/darwin +++ b/configs/darwin @@ -13,10 +13,7 @@ CC = gcc CXX = g++ PIC_FLAGS = -fPIC DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \ - -DGLX_ALIAS_UNSUPPORTED \ - -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL - -# -DGLX_INDIRECT_RENDERING \ + -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING # -D_GNU_SOURCE - for src/mesa/main ... # -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11 @@ -52,7 +49,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm # omit glw lib for now: -SRC_DIRS = glx/x11/apple mesa gallium glu glut/glx glew +SRC_DIRS = glx/x11 mesa gallium glu glut/glx glew GLU_DIRS = sgi DRIVER_DIRS = osmesa #DRIVER_DIRS = dri diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile index 8544a4e..86d84d4 100644 --- a/src/glx/x11/Makefile +++ b/src/glx/x11/Makefile @@ -93,7 +93,7 @@ install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) # Remove .o and backup files clean: - -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) + -rm -f $(TOP)/$(LIB_DIR)/libGL.so* -rm -f *.o *~ -rm -f depend depend.bak diff --git a/src/glx/x11/XF86dri.c b/src/glx/x11/XF86dri.c index 2e548d6..90a5dd8 100644 --- a/src/glx/x11/XF86dri.c +++ b/src/glx/x11/XF86dri.c @@ -36,7 +36,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* THIS IS NOT AN X CONSORTIUM STANDARD */ -#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) +#ifdef GLX_DIRECT_RENDERING #define NEED_REPLIES #include <X11/Xlibint.h> diff --git a/src/glx/x11/apple/.gitignore b/src/glx/x11/apple/.gitignore deleted file mode 100644 index 3cc2d13..0000000 --- a/src/glx/x11/apple/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -apple_xgl_api.[hc] -exports.list -stage.[1234] - diff --git a/src/glx/x11/apple/GL_aliases b/src/glx/x11/apple/GL_aliases deleted file mode 100644 index 8de2238..0000000 --- a/src/glx/x11/apple/GL_aliases +++ /dev/null @@ -1,10 +0,0 @@ -#GL_EXT_texture_object -alias AreTexturesResidentEXT AreTexturesResident -alias BindTextureEXT BindTexture -alias DeleteTexturesEXT DeleteTextures -alias GenTexturesEXT GenTextures -alias IsTextureEXT IsTexture -alias PrioritizeTexturesEXT PrioritizeTextures - -# Due to type conflicts, we handle this differently -#alias TexImage3DEXT TexImage3D diff --git a/src/glx/x11/apple/GL_extensions b/src/glx/x11/apple/GL_extensions deleted file mode 100644 index 073666c..0000000 --- a/src/glx/x11/apple/GL_extensions +++ /dev/null @@ -1,106 +0,0 @@ -extension ARB_transpose_matrix -extension ARB_vertex_program -extension ARB_vertex_blend -extension ARB_window_pos -extension ARB_shader_objects -extension ARB_vertex_shader -extension ARB_shading_language_100 -extension ARB_imaging -extension ARB_point_parameters -extension ARB_texture_env_crossbar -extension ARB_texture_border_clamp -extension ARB_multitexture -extension ARB_texture_env_add -extension ARB_texture_cube_map -extension ARB_texture_env_dot3 -extension ARB_multisample -extension ARB_texture_env_combine -extension ARB_texture_compression -extension ARB_texture_mirrored_repeat -extension ARB_shadow -extension ARB_depth_texture -extension ARB_shadow_ambient -extension ARB_fragment_program -extension ARB_fragment_program_shadow -extension ARB_fragment_shader -extension ARB_occlusion_query -extension ARB_point_sprite -extension ARB_texture_non_power_of_two -extension ARB_vertex_buffer_object -extension ARB_pixel_buffer_object -extension ARB_draw_buffers -extension ARB_shader_texture_lod -extension ARB_texture_rectangle -extension ARB_texture_float -extension ARB_half_float_pixel - -extension EXT_multi_draw_arrays -extension EXT_clip_volume_hint -extension EXT_rescale_normal -extension EXT_draw_range_elements -extension EXT_fog_coord -extension EXT_gpu_program_parameters -extension EXT_geometry_shader4 - -#The gl.spec has the wrong arguments for GetTransformFeedbackVaryingEXT -#extension EXT_transform_feedback -extension EXT_compiled_vertex_array -extension EXT_framebuffer_object -extension EXT_framebuffer_blit -extension EXT_framebuffer_multisample -extension EXT_texture_rectangle -extension EXT_texture_env_add -extension EXT_blend_color -extension EXT_blend_minmax -extension EXT_blend_subtract -extension EXT_texture_lod_bias -extension EXT_abgr -extension EXT_bgra -extension EXT_stencil_wrap -extension EXT_texture_filter_anisotropic -extension EXT_separate_specular_color -extension EXT_secondary_color -extension EXT_blend_func_separate -extension EXT_shadow_funcs -extension EXT_stencil_two_side -extension EXT_texture_compression_s3tc -extension EXT_texture_compression_dxt1 -extension EXT_texture_sRGB -extension EXT_blend_equation_separate -extension EXT_texture_mirror_clamp -extension EXT_packed_depth_stencil - -extension APPLE_client_storage -extension APPLE_specular_vector -extension APPLE_transform_hint -extension APPLE_packed_pixels -#The gl.spec has different argument types for this: -#extension APPLE_fence -extension APPLE_vertex_array_object -extension APPLE_vertex_program_evaluators -extension APPLE_element_array -extension APPLE_flush_render -extension APPLE_aux_depth_stencil -extension APPLE_flush_buffer_range -extension APPLE_ycbcr_422 -#The gl.spec has different argument types for this: -#extension APPLE_vertex_array_range -extension APPLE_texture_range -extension APPLE_float_pixels -extension APPLE_pixel_buffer -extension APPLE_object_purgeable - -#The OpenGL framework has moved this to the core OpenGL, and eliminated EXT_convolution listing. -#extension EXT_convolution - -#Leopard supports these according to nm. -#Applications should use the GL_EXTENSIONS list to determine capabilities. -extension EXT_paletted_texture -extension APPLE_fence -extension NV_vertex_program4 -extension EXT_draw_buffers2 -extension EXT_gpu_shader4 -extension ATI_pn_triangles -extension NV_register_combiners -extension EXT_depth_bounds_test - diff --git a/src/glx/x11/apple/GL_noop b/src/glx/x11/apple/GL_noop deleted file mode 100644 index 2581be1..0000000 --- a/src/glx/x11/apple/GL_noop +++ /dev/null @@ -1,15 +0,0 @@ -#These are for compatibility with the old libGL. -noop SGI_color_table -noop EXT_convolution -noop EXT_cull_vertex -noop NV_fence -noop SGIS_detail_texture -noop SGIX_fragment_lighting -noop SGIX_flush_raster -noop EXT_vertex_array -noop SGIX_instruments -noop EXT_histogram -noop NV_vertex_program -noop PGI_misc_hints -noop SGIS_multisample -noop EXT_multisample diff --git a/src/glx/x11/apple/GL_promoted b/src/glx/x11/apple/GL_promoted deleted file mode 100644 index a16dc6a..0000000 --- a/src/glx/x11/apple/GL_promoted +++ /dev/null @@ -1,4 +0,0 @@ -promoted MESA_window_pos -promoted ARB_window_pos -promoted EXT_copy_texture -promoted ARB_vertex_program diff --git a/src/glx/x11/apple/Makefile b/src/glx/x11/apple/Makefile deleted file mode 100644 index 45e94ce..0000000 --- a/src/glx/x11/apple/Makefile +++ /dev/null @@ -1,129 +0,0 @@ -TOP = ../../../.. - -include $(TOP)/configs/current - -#CC=gcc -#GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS) -#GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module - -TCLSH=tclsh8.5 -MKDIR=mkdir -INSTALL=install -LN=ln -RM=rm - -#INCLUDE=-I. -Iinclude -I.. -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include - -#COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c - -#The directory with the final binaries. -BUILD_DIR=builds - -all: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) - -SOURCES = \ - apple_cgl.c \ - apple_glx.c \ - apple_glx_context.c \ - apple_glx_drawable.c \ - apple_glx_pbuffer.c \ - apple_glx_pixmap.c \ - apple_glx_surface.c \ - apple_visual.c \ - apple_xgl_api.c \ - apple_xgl_api_additional.c \ - apple_xgl_api_read.c \ - apple_xgl_api_stereo.c \ - apple_xgl_api_viewport.c \ - appledri.c \ - ../clientattrib.c \ - ../compsize.c \ - ../glcontextmodes.c \ - glx_empty.c \ - glx_error.c \ - ../glx_pbuffer.c \ - ../glx_query.c \ - ../glxcmds.c \ - ../glxcurrent.c \ - ../glxext.c \ - ../glxextensions.c \ - glxreply.c \ - ../pixel.c \ - ../xfont.c - -include $(TOP)/src/mesa/sources.mak - -LDFLAGS += -lXplugin -framework ApplicationServices -framework CoreFoundation - -MESA_GLAPI_ASM_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_ASM_SOURCES)) -MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES)) -MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS)) - -OBJECTS = $(SOURCES:.c=.o) # $(MESA_GLAPI_OBJECTS) - -INCLUDES = -I. -Iinclude -I..\ - -I$(TOP)/include \ - -I$(TOP)/include/GL/internal \ - -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/glapi \ - $(LIBDRM_CFLAGS) \ - $(DRI2PROTO_CFLAGS) \ - $(X11_INCLUDES) - -##### RULES ##### - -$(OBJECTS) : apple_xgl_api.h - -apple_xgl_api.c : apple_xgl_api.h - -apple_xgl_api.h : gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl - $(TCLSH) gen_code.tcl - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@ - -##### TARGETS ##### - -default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) - -# Make libGL -$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile - $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ - -major 1 -minor 2 $(MKLIB_OPTIONS) \ - -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \ - $(GL_LIB_DEPS) $(OBJECTS) - -depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile - rm -f depend - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \ - $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find $(TOP)/include` - -install_headers: include/GL/gl.h - $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL - $(INSTALL) -m 644 include/GL/gl.h $(DESTDIR)$(INSTALL_DIR)/include/GL - -install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) - $(MAKE) -C $(TOP)/src/mesa install-libgl - -install: install_libraries - -# Remove .o and backup files -clean: - -rm -f *.o *.a *~ - -rm -f *.c~ *.h~ - -rm -f apple_xgl_api.h apple_xgl_api.c - -rm -f *.dylib - -rm -f include/GL/gl.h - -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) - -rm -f *.o *~ - -rm -f depend depend.bak - --include depend diff --git a/src/glx/x11/apple/OVERALL_DESIGN b/src/glx/x11/apple/OVERALL_DESIGN deleted file mode 100644 index c394b21..0000000 --- a/src/glx/x11/apple/OVERALL_DESIGN +++ /dev/null @@ -1,18 +0,0 @@ -A lot of the code is automatically generated. - -The following are generated based on specs/gl.spec and specs/enum.spec (from OpenGL.org): - -apple_xgl_api.h -apple_xgl_api.c -exports.list -include/GL/gl.h -include/GL/glext.h (includes the OpenGL framework glext.h) - -The gen_code.tcl script is what executes the various gen_*.tcl scripts to produce those. - -You will need Tcl 8.5 for the gen_code.tcl script. - -The tests/ directory contains some tests that are built in testbuilds. - -The tests built in testbuilds don't require installation of the library. - diff --git a/src/glx/x11/apple/README_UPDATING b/src/glx/x11/apple/README_UPDATING deleted file mode 100644 index 7b1bbe0..0000000 --- a/src/glx/x11/apple/README_UPDATING +++ /dev/null @@ -1,8 +0,0 @@ -The design of most of this code is such that we extend the GLX structures -with a void * named apple. - -The GLX functions that need to do Apple-specific things are passed -&s->apple in order to initialize the private structures. - -Thus when updating, just run a diff against glxext.c or glxcmds.c, and -manually merge from there as needed. diff --git a/src/glx/x11/apple/RELEASE_NOTES b/src/glx/x11/apple/RELEASE_NOTES deleted file mode 100644 index c5c603e..0000000 --- a/src/glx/x11/apple/RELEASE_NOTES +++ /dev/null @@ -1,71 +0,0 @@ -AppleSGLX Release Notes - -o OpenGL Support - -AppleSGLX supports the same version of OpenGL as Leopard (OpenGL 2.1). -Many extensions from the OpenGL framework are now builtin. - -This adds support for GLSL, and a variety of other features. - -o Thread Support - -Thread support has been improved since the libGL in XQuartz 2.3.2.1. - -o GLX 1.4 Support - -The GLX 1.3 and 1.4 functions should all work with a few exceptions -as outlined in this document. - -o glXMakeContextCurrent (a GLX 1.3 feature) - -glXMakeContextCurrent should work with the readable drawable. The -OpenGL functions: glReadPixels, glCopyPixels, and glCopyColorTable, -should use the readable drawable if it's different than the rendering -drawable. - -o glXGetProcAddress (a GLX 1.4 feature and ARB extension) - -glXGetProcAddress should work and allow getting the address of any -extension functions you may need from the X11 libGL, or OpenGL framework -libGL. Previous versions of the X11 libGL didn't allow getting the newer -OpenGL framework addresses. - -o GLXPixmaps - -New support for GLXPixmaps works well with mixed X11 and OpenGL drawing -operations. You can create them using glXCreateGLXPixmap or -glXCreatePixmap. - -o GLXPbuffers - -Support for GLXPbuffers has been added. These are drawables that are -not possible to render to with X11, which is allowed by the spec. -A GLXPbuffer will never generate a clobber event, however -glXSelectEvent and glXGetSelectedEvent should operate normally. - -Clobber events are not generated due to low-level architectural -differences. The contents of your pbuffers will not be clobbered. - -o Shared Contexts - -Due to basic low-level architectural differences the usage of shared -contexts requires a similar visual or GLXFBConfig be used in the -creation of a shared context. It's best if you specify the same -visual. This is due to a CGL design difference, and not something -that is easily worked around. UPDATE: some changes made seem to -help resolve this issue in many cases, so you may be able to use a -shared context without this restriction. - - -o Indirect - -The X server supports indirect fairly well, so OpenGL applications -can be run remotely and displayed by XQuartz. This means you can run -applications from a remote host on an XQuartz X server. - -AppleSGLX does not support indirect rendering. Any indirect context -created will appear to glXIsDirect as an indirect context, but it -does not actually support indirect rendering to a remote X server. - -AppleSGLX supports GLXPixmaps and GLXPbuffers with direct and indirect -contexts, though they are all direct contexts by definition (see above). diff --git a/src/glx/x11/apple/TODO b/src/glx/x11/apple/TODO deleted file mode 100644 index 4a063fe..0000000 --- a/src/glx/x11/apple/TODO +++ /dev/null @@ -1,26 +0,0 @@ -Test shared contexts! - -Go over every glxcmd in glxcmds.c and make sure we have them working. -Verify the XError behavior of GLXPixmap support functions. - -Test GLXPixmap support with various pixmap depths. - -Test GLXPixmap support with invalid pixmaps (to stress the protocol code). - --- Feb 10, 2009 - -Test glXCopyContext. - --- Dec 12 2008 - -TEST glXCopyContext needs some work and additional code in apple_glx.c. - ----- - -Make sure we report the proper list of GLX extensions available. Apple direct may not support some -that Mesa does, and vice-versa. - -Modify create_destroy_context and create a new test called create_destroy_context_thread_race. -Where 2 threads are doing the same sort of path of create and destroy. The locking should protect -us there, but we need to verify nothing goes wrong. - diff --git a/src/glx/x11/apple/apple_cgl.c b/src/glx/x11/apple/apple_cgl.c deleted file mode 100644 index 737d757..0000000 --- a/src/glx/x11/apple/apple_cgl.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright (c) 2008 Apple Inc. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. -*/ - -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <dlfcn.h> - -#include "apple_cgl.h" -#include "apple_glx.h" - -#ifndef OPENGL_FRAMEWORK_PATH -#define OPENGL_FRAMEWORK_PATH "/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL" -#endif - -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1of8tr-0004e7...@alioth.debian.org