From 2b3ea2be906fbe0bf08f08f23ec39c0feb7a8f39 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 17 Nov 2009 15:53:27 -0700 Subject: docs: i965 clipping fix --- docs/relnotes-7.6.1.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes-7.6.1.html b/docs/relnotes-7.6.1.html index 9ee6babc9d8..7a809a0c41d 100644 --- a/docs/relnotes-7.6.1.html +++ b/docs/relnotes-7.6.1.html @@ -52,6 +52,7 @@ tbd it returns the actual compressed format chosen.
  • Fixed glBitmap bugs in Intel drivers.
  • Fixed a number of Microsoft Visual Studio compilation problems. +
  • Fixed clipping / provoking vertex bugs in i965 driver. -- cgit v1.2.3 From d449c07b8bfd1789b4f643b0eb0b1fac5314ebbe Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 Nov 2009 08:07:56 -0700 Subject: xorg/st: fixup builds against later dpms headers. (cherry picked from master, commit e9d6ab72be065becf7a077c33919d37faa8db92e) --- configure.ac | 5 +++++ src/gallium/state_trackers/xorg/xorg_crtc.c | 4 ++++ src/gallium/state_trackers/xorg/xorg_output.c | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index 5d11cf84527..85385452c04 100644 --- a/configure.ac +++ b/configure.ac @@ -1157,6 +1157,11 @@ yes) if test "$tracker" = egl && test "x$enable_egl" != xyes; then AC_MSG_ERROR([cannot build egl state tracker without EGL library]) fi + if test "$tracker" = xorg; then + PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], + HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71" + HAVE_XEXTPROTO_71="no") + fi done GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" ;; diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c index fe08bde9efc..67fe29a69da 100644 --- a/src/gallium/state_trackers/xorg/xorg_crtc.c +++ b/src/gallium/state_trackers/xorg/xorg_crtc.c @@ -42,8 +42,12 @@ #include "xorg_tracker.h" #include "xf86Modes.h" +#ifdef HAVE_XEXTPROTO_71 +#include +#else #define DPMS_SERVER #include +#endif #include "pipe/p_inlines.h" #include "util/u_rect.h" diff --git a/src/gallium/state_trackers/xorg/xorg_output.c b/src/gallium/state_trackers/xorg/xorg_output.c index 950af942f5b..26f45f8d645 100644 --- a/src/gallium/state_trackers/xorg/xorg_output.c +++ b/src/gallium/state_trackers/xorg/xorg_output.c @@ -42,8 +42,12 @@ #include #include +#ifdef HAVE_XEXTPROTO_71 +#include +#else #define DPMS_SERVER #include +#endif #include "X11/Xatom.h" -- cgit v1.2.3 From 027abddf4f47163276f55c2fa8f81408b652f072 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 Nov 2009 08:08:25 -0700 Subject: mesa: set version string to 7.6.1-rc1 --- src/mesa/main/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index f24e11cc513..3e9143979a9 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -32,7 +32,7 @@ #define MESA_MAJOR 7 #define MESA_MINOR 6 #define MESA_PATCH 1 -#define MESA_VERSION_STRING "7.6.1-devel" +#define MESA_VERSION_STRING "7.6.1-rc1" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3 From 13b5a624b1899c457279907d58046dfb3c95addc Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 18 Nov 2009 11:27:36 -0500 Subject: Revert "radeon: Fix legacy bo not to reuse dma buffers before refcount is 1." This reverts commit 284a7af274bc148f112bd0ebb40583923ee26b49. This breaks kde desktop effects. See fdo bug 24131 --- src/mesa/drivers/dri/radeon/radeon_dma.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c index c6edbae9a1b..c9a32c808be 100644 --- a/src/mesa/drivers/dri/radeon/radeon_dma.c +++ b/src/mesa/drivers/dri/radeon/radeon_dma.c @@ -207,6 +207,7 @@ again_alloc: counter on unused buffers for later freeing them from begin of list */ dma_bo = last_elem(&rmesa->dma.free); + assert(dma_bo->bo->cref == 1); remove_from_list(dma_bo); insert_at_head(&rmesa->dma.reserved, dma_bo); } @@ -306,10 +307,6 @@ static int radeon_bo_is_idle(struct radeon_bo* bo) WARN_ONCE("Your libdrm or kernel doesn't have support for busy query.\n" "This may cause small performance drop for you.\n"); } - /* Protect against bug in legacy bo handling that causes bos stay - * referenced even after they should be freed */ - if (bo->cref != 1) - return 0; return ret != -EBUSY; } @@ -346,9 +343,7 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa) foreach_s(dma_bo, temp, &rmesa->dma.wait) { if (dma_bo->expire_counter == time) { WARN_ONCE("Leaking dma buffer object!\n"); - /* force free of buffer so we don't realy start - * leaking stuff now*/ - while ((dma_bo->bo = radeon_bo_unref(dma_bo->bo))) {} + radeon_bo_unref(dma_bo->bo); remove_from_list(dma_bo); FREE(dma_bo); continue; -- cgit v1.2.3 From c5add6a46899b87b3f338288cf9744160cf7c464 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 18 Nov 2009 11:32:55 -0500 Subject: docs: Add note about r600 --- docs/relnotes-7.6.1.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes-7.6.1.html b/docs/relnotes-7.6.1.html index 7a809a0c41d..5615ed6e08d 100644 --- a/docs/relnotes-7.6.1.html +++ b/docs/relnotes-7.6.1.html @@ -34,6 +34,7 @@ tbd
    • Upgraded GL/glext.h to version 56, GL/glxext.h to version 25, GL/wglext.h to version 17 +
    • New 3D driver, r600, for Radeon R6xx, R7xx hardware
    -- cgit v1.2.3 From fe5c46546e740a16a13fe9e8aaa4b071bc13d70b Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 18 Nov 2009 11:51:20 -0500 Subject: r600: disable compressed texture support It's not implemented yet. fixes fdo bug 24047 --- src/mesa/drivers/dri/r600/r600_context.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index e0b77d43850..8dab57b4339 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -362,6 +362,7 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, (&r600->radeon.optionCache, "disable_stencil_two_side")) _mesa_disable_extension(ctx, "GL_EXT_stencil_two_side"); +#if 0 if (r600->radeon.glCtx->Mesa_DXTn && !driQueryOptionb(&r600->radeon.optionCache, "disable_s3tc")) { _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc"); @@ -371,6 +372,9 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, { _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc"); } +#else + _mesa_disable_extension(ctx, "GL_ARB_texture_compression"); +#endif radeon_fbo_init(&r600->radeon); radeonInitSpanFuncs( ctx ); -- cgit v1.2.3 From 3bcf2d49f3ce734820bf2f599345ac33a79aa735 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 19 Nov 2009 08:57:39 -0700 Subject: windows: remove old VC6 project files directory Very out of date, according to Karl Schultz. --- windows/VC6/progs/glut/glut.dsp | 333 ---------------------------------------- 1 file changed, 333 deletions(-) delete mode 100644 windows/VC6/progs/glut/glut.dsp diff --git a/windows/VC6/progs/glut/glut.dsp b/windows/VC6/progs/glut/glut.dsp deleted file mode 100644 index 0a67689d786..00000000000 --- a/windows/VC6/progs/glut/glut.dsp +++ /dev/null @@ -1,333 +0,0 @@ -# Microsoft Developer Studio Project File - Name="glut" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=glut - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "glut.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "glut.mak" CFG="glut - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "glut - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "glut - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "glut - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLUT_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_DLL" /D "_USRDLL" /D "GLUT_EXPORTS" /D "MESA" /D "BUILD_GL32" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 opengl32.lib glu32.lib winmm.lib msvcrt.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib /out:"Release/GLUT32.DLL" /libpath:"../../mesa/Release" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Release\GLUT32.LIB ..\..\..\..\lib copy Release\GLUT32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Release\GLUT32.DLL ..\..\..\..\progs\demos -# End Special Build Tool - -!ELSEIF "$(CFG)" == "glut - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLUT_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_DLL" /D "_USRDLL" /D "GLUT_EXPORTS" /D "MESA" /D "BUILD_GL32" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 winmm.lib msvcrtd.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib /out:"Debug/GLUT32.DLL" /pdbtype:sept /libpath:"../../mesa/Debug" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Debug\GLUT32.LIB ..\..\..\..\lib copy Debug\GLUT32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Debug\GLUT32.DLL ..\..\..\..\progs\demos -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "glut - Win32 Release" -# Name "glut - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_8x13.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_9x15.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_bitmap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_bwidth.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_cindex.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_cmap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_cursor.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_dials.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_dstr.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_event.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_ext.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_fcb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_fullscrn.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_gamemode.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_get.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_hel10.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_hel12.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_hel18.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_init.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_input.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_joy.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_key.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_keyctrl.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_keyup.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_mesa.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_modifier.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_mroman.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_overlay.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_roman.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_shapes.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_space.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_stroke.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_swap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_swidth.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_tablet.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_teapot.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_tr10.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_tr24.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_util.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_vidresize.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_warp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_win.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glut_winmisc.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\win32_glx.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\win32_menu.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\win32_util.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\win32_winproc.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\win32_x11.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glutbitmap.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glutint.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glutstroke.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\glutwin32.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\stroke.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\win32_glx.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\src\glut\glx\win32_x11.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project -- cgit v1.2.3 From cba614bd88a9fa54d5d0d7d4dc80e86eac79347e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 19 Nov 2009 09:00:14 -0700 Subject: mesa: omit VC6, VC7 project files from tarballs Only VC8 project file is known to work. --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d25c55c1501..8327943b084 100644 --- a/Makefile +++ b/Makefile @@ -433,8 +433,7 @@ DEMO_FILES = \ $(DIRECTORY)/progs/windml/Makefile.ugl \ $(DIRECTORY)/progs/windml/*.c \ $(DIRECTORY)/progs/windml/*.bmp \ - $(DIRECTORY)/progs/ggi/*.c \ - $(DIRECTORY)/windows/VC7/progs/progs.sln + $(DIRECTORY)/progs/ggi/*.c GLUT_FILES = \ $(DIRECTORY)/include/GL/glut.h \ @@ -457,9 +456,7 @@ GLUT_FILES = \ $(DIRECTORY)/src/glut/mini/glut.pc.in \ $(DIRECTORY)/src/glut/directfb/Makefile \ $(DIRECTORY)/src/glut/directfb/NOTES \ - $(DIRECTORY)/src/glut/directfb/*[ch] \ - $(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \ - $(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj + $(DIRECTORY)/src/glut/directfb/*[ch] DEPEND_FILES = \ $(TOP)/src/mesa/depend \ -- cgit v1.2.3 From 2a1505b42e30eeae20624bd24386198a8d867357 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 19 Nov 2009 09:01:48 -0700 Subject: docs: remove VC6/7 project file info --- docs/README.WIN32 | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/docs/README.WIN32 b/docs/README.WIN32 index 97e1ffb7a75..204b8e66041 100644 --- a/docs/README.WIN32 +++ b/docs/README.WIN32 @@ -27,12 +27,6 @@ using the SDK with Visual Studio Express can be found at http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/ -If you are stuck using VC6 or VC7, you may start with these project -files, but you may need to modify them to reflect changes in the -Mesa source code tree. If you sucessfully update the project files, -please submit them to the author of this document so that they may -be included in the next distribution. - The project files to build the core Mesa library, Windows Mesa drivers, OSMesa, and GLU are in the mesa directory. The project files to build GLUT and some demo programs are in the progs directory. @@ -106,23 +100,6 @@ should build all the demos. Build System Notes ----- ------ ----- -VC6 (not actively supported) ---- - -Visual Studio 6 does not recognize files with the .cc extension as C++ -language files, without a lot of unnatural tweaking. So, the VC6 -build process uses custom build steps to compile these files in the -GLU library. - -Two additional configurations are provided, Debug x86 and Release x86 -that activate the shader code compilation by defining SLANG_86. It is -unknown if and how this works. - -VC7 (not actively supported) ---- - -The above-mentioned .cc problem does not exist in this version. - VC8 --- -- cgit v1.2.3 From e16b59df42131452633742a03694bd5132a8895e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 19 Nov 2009 09:07:17 -0700 Subject: docs: update news file for 7.6.1 release --- docs/news.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/news.html b/docs/news.html index 93da56a5c33..2abec2e6354 100644 --- a/docs/news.html +++ b/docs/news.html @@ -10,6 +10,13 @@

    News

    +

    November XX, 2009

    +

    +Mesa 7.6.1 is released. This is a bug-fix +release fixing issues found in the 7.6 release. +

    + +

    September 28, 2009

    Mesa 7.6 is released. This is a new feature -- cgit v1.2.3 From 5117725fd0eee7dbd5708bdbbd066bc89c2d35a9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 19 Nov 2009 09:07:34 -0700 Subject: docs: removed VC6/7 project files --- docs/relnotes-7.6.1.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/relnotes-7.6.1.html b/docs/relnotes-7.6.1.html index 5615ed6e08d..14f9077d9ef 100644 --- a/docs/relnotes-7.6.1.html +++ b/docs/relnotes-7.6.1.html @@ -56,5 +56,11 @@ tbd

  • Fixed clipping / provoking vertex bugs in i965 driver. +

    Changes

    + + + -- cgit v1.2.3 From 4e6e2462ea1fb5b7fc24bb0e707a9cf6507c47c9 Mon Sep 17 00:00:00 2001 From: Tom Fogal Date: Thu, 19 Nov 2009 09:18:48 -0700 Subject: mesa: define 32bit byteswap for AIX. Fixes `xlib' driver build on AIX. Signed-off-by: Brian Paul --- src/mesa/main/compiler.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 9319505a75d..522295a9bfe 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -235,7 +235,12 @@ extern "C" { #elif defined(__APPLE__) #include #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) -#else /*__linux__ __APPLE__*/ +#elif defined(_AIX) +#define CPU_TO_LE32( x ) x = ((x & 0x000000ff) << 24) | \ + ((x & 0x0000ff00) << 8) | \ + ((x & 0x00ff0000) >> 8) | \ + ((x & 0xff000000) >> 24); +#else /*__linux__ */ #include #define CPU_TO_LE32( x ) bswap32( x ) #endif /*__linux__*/ -- cgit v1.2.3 From 8f24e863c3745b59e00978fbba306077629b5684 Mon Sep 17 00:00:00 2001 From: Tom Fogal Date: Wed, 18 Nov 2009 20:19:29 -0700 Subject: progs: Fix quoting issue with empty set of PROGRAM_DIRS. Quotes are important to make sure the argument to test -n really is the empty string, but that requires stringifying PROGRAM_DIRS. Signed-off-by: Brian Paul --- progs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progs/Makefile b/progs/Makefile index 3700707dfb1..d5852fa416c 100644 --- a/progs/Makefile +++ b/progs/Makefile @@ -4,7 +4,7 @@ TOP = .. include $(TOP)/configs/current -SUBDIRS = $(PROGRAM_DIRS) +SUBDIRS = "$(strip "$(PROGRAM_DIRS)")" default: message subdirs -- cgit v1.2.3 From 7593bcb6ec1362722bcf7c7323d7dce221c4b09b Mon Sep 17 00:00:00 2001 From: Tom Fogal Date: Thu, 19 Nov 2009 09:33:21 -0700 Subject: gl: added mangled glXGetProcAddressARB define Signed-off-by: Brian Paul --- include/GL/glx_mangle.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/GL/glx_mangle.h b/include/GL/glx_mangle.h index 4439a96b5d2..fa664a7f59e 100644 --- a/include/GL/glx_mangle.h +++ b/include/GL/glx_mangle.h @@ -76,6 +76,7 @@ /* GLX 1.4 */ #define glXGetProcAddress mglXGetProcAddress +#define glXGetProcAddressARB mglXGetProcAddressARB #endif -- cgit v1.2.3 From 3128d65fd7da9dc9b7a6823fae9d9b2ca33afca6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 19 Nov 2009 09:35:01 -0700 Subject: docs: document fixes for AIX --- docs/relnotes-7.6.1.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes-7.6.1.html b/docs/relnotes-7.6.1.html index 14f9077d9ef..3d19c6cb705 100644 --- a/docs/relnotes-7.6.1.html +++ b/docs/relnotes-7.6.1.html @@ -54,6 +54,7 @@ tbd
  • Fixed glBitmap bugs in Intel drivers.
  • Fixed a number of Microsoft Visual Studio compilation problems.
  • Fixed clipping / provoking vertex bugs in i965 driver. +
  • Assorted build fixes for AIX.

    Changes

    -- cgit v1.2.3 From 601edbef172f3106b9e4c0b96b24d8b5eea8d2a5 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Mon, 23 Nov 2009 19:33:59 +0100 Subject: Fix the DRI swrast driver for big endian platforms. Too bad I didn't realize earlier how easy this could be... Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22767 . --- docs/relnotes-7.6.1.html | 1 + src/mesa/drivers/dri/swrast/swrast_span.c | 72 +++++++++++++------------------ 2 files changed, 30 insertions(+), 43 deletions(-) diff --git a/docs/relnotes-7.6.1.html b/docs/relnotes-7.6.1.html index 3d19c6cb705..d155cf5a673 100644 --- a/docs/relnotes-7.6.1.html +++ b/docs/relnotes-7.6.1.html @@ -55,6 +55,7 @@ tbd
  • Fixed a number of Microsoft Visual Studio compilation problems.
  • Fixed clipping / provoking vertex bugs in i965 driver.
  • Assorted build fixes for AIX. +
  • Endianness fixes for the DRI swrast driver (bug 22767).
  • Changes

    diff --git a/src/mesa/drivers/dri/swrast/swrast_span.c b/src/mesa/drivers/dri/swrast/swrast_span.c index 2d3c25dcbef..f8e503463fa 100644 --- a/src/mesa/drivers/dri/swrast/swrast_span.c +++ b/src/mesa/drivers/dri/swrast/swrast_span.c @@ -63,56 +63,42 @@ static const GLubyte kernel[16] = { /* 32-bit BGRA */ #define STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE) \ - DST[3] = VALUE[ACOMP]; \ - DST[2] = VALUE[RCOMP]; \ - DST[1] = VALUE[GCOMP]; \ - DST[0] = VALUE[BCOMP] + *DST = VALUE[ACOMP] << 24 | VALUE[RCOMP] << 16 | VALUE[GCOMP] << 8 | VALUE[BCOMP] #define STORE_PIXEL_RGB_A8R8G8B8(DST, X, Y, VALUE) \ - DST[3] = 0xff; \ - DST[2] = VALUE[RCOMP]; \ - DST[1] = VALUE[GCOMP]; \ - DST[0] = VALUE[BCOMP] + *DST = 0xff << 24 | VALUE[RCOMP] << 16 | VALUE[GCOMP] << 8 | VALUE[BCOMP] #define FETCH_PIXEL_A8R8G8B8(DST, SRC) \ - DST[ACOMP] = SRC[3]; \ - DST[RCOMP] = SRC[2]; \ - DST[GCOMP] = SRC[1]; \ - DST[BCOMP] = SRC[0] + DST[ACOMP] = *SRC >> 24; \ + DST[RCOMP] = (*SRC >> 16) & 0xff; \ + DST[GCOMP] = (*SRC >> 8) & 0xff; \ + DST[BCOMP] = *SRC & 0xff /* 32-bit BGRX */ #define STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) \ - DST[3] = 0xff; \ - DST[2] = VALUE[RCOMP]; \ - DST[1] = VALUE[GCOMP]; \ - DST[0] = VALUE[BCOMP] + *DST = 0xff << 24 | VALUE[RCOMP] << 16 | VALUE[GCOMP] << 8 | VALUE[BCOMP] #define STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE) \ - DST[3] = 0xff; \ - DST[2] = VALUE[RCOMP]; \ - DST[1] = VALUE[GCOMP]; \ - DST[0] = VALUE[BCOMP] + *DST = 0xff << 24 | VALUE[RCOMP] << 16 | VALUE[GCOMP] << 8 | VALUE[BCOMP] #define FETCH_PIXEL_X8R8G8B8(DST, SRC) \ - DST[ACOMP] = 0xff; \ - DST[RCOMP] = SRC[2]; \ - DST[GCOMP] = SRC[1]; \ - DST[BCOMP] = SRC[0] + DST[ACOMP] = 0xff; \ + DST[RCOMP] = (*SRC >> 16) & 0xff; \ + DST[GCOMP] = (*SRC >> 8) & 0xff; \ + DST[BCOMP] = *SRC & 0xff /* 16-bit BGR */ #define STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) \ do { \ int d = DITHER_COMP(X, Y) >> 6; \ - GLushort *p = (GLushort *)DST; \ - *p = ( ((DITHER_CLAMP((VALUE[RCOMP]) + d) & 0xf8) << 8) | \ - ((DITHER_CLAMP((VALUE[GCOMP]) + d) & 0xfc) << 3) | \ - ((DITHER_CLAMP((VALUE[BCOMP]) + d) & 0xf8) >> 3) ); \ + *DST = ( ((DITHER_CLAMP((VALUE[RCOMP]) + d) & 0xf8) << 8) | \ + ((DITHER_CLAMP((VALUE[GCOMP]) + d) & 0xfc) << 3) | \ + ((DITHER_CLAMP((VALUE[BCOMP]) + d) & 0xf8) >> 3) ); \ } while(0) #define FETCH_PIXEL_R5G6B5(DST, SRC) \ do { \ - GLushort p = *(GLushort *)SRC; \ DST[ACOMP] = 0xff; \ - DST[RCOMP] = ((p >> 8) & 0xf8) * 255 / 0xf8; \ - DST[GCOMP] = ((p >> 3) & 0xfc) * 255 / 0xfc; \ - DST[BCOMP] = ((p << 3) & 0xf8) * 255 / 0xf8; \ + DST[RCOMP] = ((*SRC >> 8) & 0xf8) * 255 / 0xf8; \ + DST[GCOMP] = ((*SRC >> 3) & 0xfc) * 255 / 0xfc; \ + DST[BCOMP] = ((*SRC << 3) & 0xf8) * 255 / 0xf8; \ } while(0) @@ -145,8 +131,8 @@ static const GLubyte kernel[16] = { #define SPAN_VARS \ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 4; -#define INC_PIXEL_PTR(P) P += 4 + GLuint *P = (GLuint *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch / 4 + (X) +#define INC_PIXEL_PTR(P) P++ #define STORE_PIXEL(DST, X, Y, VALUE) \ STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE) #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ @@ -163,8 +149,8 @@ static const GLubyte kernel[16] = { #define SPAN_VARS \ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 4; -#define INC_PIXEL_PTR(P) P += 4 + GLuint *P = (GLuint *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch / 4 + (X); +#define INC_PIXEL_PTR(P) P++ #define STORE_PIXEL(DST, X, Y, VALUE) \ STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ @@ -181,8 +167,8 @@ static const GLubyte kernel[16] = { #define SPAN_VARS \ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 2; -#define INC_PIXEL_PTR(P) P += 2 + GLushort *P = (GLushort *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch / 2 + (X); +#define INC_PIXEL_PTR(P) P++ #define STORE_PIXEL(DST, X, Y, VALUE) \ STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) #define FETCH_PIXEL(DST, SRC) \ @@ -234,8 +220,8 @@ static const GLubyte kernel[16] = { #define SPAN_VARS \ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)row; -#define INC_PIXEL_PTR(P) P += 4 + GLuint *P = (GLuint *)row; +#define INC_PIXEL_PTR(P) P++ #define STORE_PIXEL(DST, X, Y, VALUE) \ STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE) #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ @@ -252,8 +238,8 @@ static const GLubyte kernel[16] = { #define SPAN_VARS \ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)row; -#define INC_PIXEL_PTR(P) P += 4 + GLuint *P = (GLuint *)row; +#define INC_PIXEL_PTR(P) P++ #define STORE_PIXEL(DST, X, Y, VALUE) \ STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ @@ -270,7 +256,7 @@ static const GLubyte kernel[16] = { #define SPAN_VARS \ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)row; + GLushort *P = (GLushort *)row; #define INC_PIXEL_PTR(P) P += 2 #define STORE_PIXEL(DST, X, Y, VALUE) \ STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) -- cgit v1.2.3 From a11750218fa43dcf0d45b960d52497f7700db2a7 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 15 Oct 2009 01:24:53 +0100 Subject: autoconf: Fix case for not having package (cherry picked from commit 5c4bdbd825934fe01330890d360b61caa06fdc8d) --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 85385452c04..5fe3a944967 100644 --- a/configure.ac +++ b/configure.ac @@ -1159,9 +1159,9 @@ yes) fi if test "$tracker" = xorg; then PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], - HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71" + HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71", HAVE_XEXTPROTO_71="no") - fi + fi done GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" ;; -- cgit v1.2.3 From da0883114b1dceceff8a38deea1bb870fda40464 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 23 Nov 2009 18:32:27 -0800 Subject: shaderutil: Fix detection of shaders Check for versions >= 2.0 (because some drivers return 3.0), and return GL_FALSE if shaders are not detected. --- progs/util/shaderutil.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c index 4db950016b8..629b6f1d972 100644 --- a/progs/util/shaderutil.c +++ b/progs/util/shaderutil.c @@ -25,7 +25,11 @@ GLboolean ShadersSupported(void) { const char *version = (const char *) glGetString(GL_VERSION); - if (version[0] == '2' && version[1] == '.') { + + /* NVIDIA binary drivers will return "3.0.0", and they clearly support + * shaders. + */ + if (version[0] >= '2' && version[1] == '.') { return GL_TRUE; } else if (glutExtensionSupported("GL_ARB_vertex_shader") @@ -34,7 +38,7 @@ ShadersSupported(void) fprintf(stderr, "Warning: Trying ARB GLSL instead of OpenGL 2.x. This may not work.\n"); return GL_TRUE; } - return GL_TRUE; + return GL_FALSE; } -- cgit v1.2.3 From b12ca6b87b55e3359e81d5a3be380c860478e353 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 23 Nov 2009 23:14:49 -0800 Subject: i915: Initialize Length and Offset fields when mapping a buffer object This fixes an assertion failure in _mesa_MapBufferARB. Fixes bugzilla #25253. --- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index a0225936c81..ccce9e712d8 100644 --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -254,6 +254,8 @@ intel_bufferobj_map(GLcontext * ctx, if (intel_obj->sys_buffer) { obj->Pointer = intel_obj->sys_buffer; + obj->Length = obj->Size; + obj->Offset = 0; return obj->Pointer; } -- cgit v1.2.3 From e4c5fe52c99bdf651aafa1569d9cf901891004d8 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 25 Nov 2009 20:23:22 +1000 Subject: radeon: fix context destroy needing lock for flushing. Thanks to Intel code which I've just stolen pretty much as usual. This fixes fdo bug 22851 which is a dri1 regression since rewrite. Tested by: fpiobaf (Fabio) on #radeon Signed-off-by: Dave Airlie --- src/mesa/drivers/dri/radeon/radeon_lock.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.c b/src/mesa/drivers/dri/radeon/radeon_lock.c index 02de8e5fd1d..7ad781ba619 100644 --- a/src/mesa/drivers/dri/radeon/radeon_lock.c +++ b/src/mesa/drivers/dri/radeon/radeon_lock.c @@ -62,8 +62,6 @@ void radeonGetLock(radeonContextPtr rmesa, GLuint flags) __DRIdrawablePrivate *const readable = radeon_get_readable(rmesa); __DRIscreenPrivate *sPriv = rmesa->dri.screen; - assert(drawable != NULL); - drmGetLock(rmesa->dri.fd, rmesa->dri.hwContext, flags); /* The window might have moved, so we might need to get new clip @@ -74,12 +72,13 @@ void radeonGetLock(radeonContextPtr rmesa, GLuint flags) * Since the hardware state depends on having the latest drawable * clip rects, all state checking must be done _after_ this call. */ - DRI_VALIDATE_DRAWABLE_INFO(sPriv, drawable); - if (drawable != readable) { + if (drawable) + DRI_VALIDATE_DRAWABLE_INFO(sPriv, drawable); + if (readable && drawable != readable) { DRI_VALIDATE_DRAWABLE_INFO(sPriv, readable); } - if (rmesa->lastStamp != drawable->lastStamp) { + if (drawable && (rmesa->lastStamp != drawable->lastStamp)) { radeon_window_moved(rmesa); rmesa->lastStamp = drawable->lastStamp; } -- cgit v1.2.3 From 0528f40e3b8ca3e59d3a641c4504d34cf9364578 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 25 Nov 2009 16:31:28 -0800 Subject: Improve implementation of GL_POINT_SPRITE_COORD_ORIGIN errors This enum is only supported for OpenGL 2.0. If a driver supports OpenGL 1.4 and GL_ARB_point_sprite, using this enum should generate an error. This is important because, for example, i915 and i830 can support GL_ARB_point_sprite, but they cannot support GL_POINT_SPRITE_COORD_ORIGIN. This commit just removes the check for NV_point_sprite, which is completely wrong, and add some comments describing what the code should do. I don't see an easy way to check for version >= 2.0 from inside Mesa. Perhaps we should add an extension GL_MESA_point_sprite_20 (like Intel's old GL_EXT_packed_pixels_12) to indicate that this added bit of functionality is available. Also note that glean's pointSprite test only checks for GL_ARB_point_sprite before trying to use GL_POINT_SPRITE_COORD_ORIGIN. Naturally, that fails on non-2.0 implementations (i.e., Mac OS X on GMA 950). --- src/mesa/main/points.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index 4c8fc1f72e0..b3305448904 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -200,7 +200,12 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params) } break; case GL_POINT_SPRITE_COORD_ORIGIN: - if (ctx->Extensions.ARB_point_sprite || ctx->Extensions.NV_point_sprite) { + /* This is not completely correct. GL_POINT_SPRITE_COORD_ORIGIN was + * added to point sprites when the extension was merged into OpenGL + * 2.0. It is expected that an implementation supporting OpenGL 1.4 + * and GL_ARB_point_sprite will generate an error here. + */ + if (ctx->Extensions.ARB_point_sprite) { GLenum value = (GLenum) params[0]; if (value != GL_LOWER_LEFT && value != GL_UPPER_LEFT) { _mesa_error(ctx, GL_INVALID_VALUE, -- cgit v1.2.3 From d8d49716cf5d5cabebadc32d7717eec787c75ff1 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sun, 29 Nov 2009 17:40:02 -0800 Subject: i915: Enable point sprite coordinate generation Support still isn't completely correct, but it's better. piglit point-sprite now passes. However, glean's pointSprite test fails. In that test the texture on the sprite is somehow inverted as though GL_POINT_SPRITE_COORD_ORIGIN were set to GL_LOWER_LEFT. i915 hardware shouldn't be able to do that! I believe there are also problems when not all texture units have GL_COORD_REPLACE set. The hardware enable seems to be all or nothing. Fixes bug #25313. --- src/mesa/drivers/dri/i915/i915_state.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index b60efea75bd..1ec84ef1167 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -599,6 +599,24 @@ i915PointSize(GLcontext * ctx, GLfloat size) } +static void +i915PointParameterfv(GLcontext * ctx, GLenum pname, const GLfloat *params) +{ + struct i915_context *i915 = I915_CONTEXT(ctx); + + switch (pname) { + case GL_POINT_SPRITE_COORD_ORIGIN: + /* This could be supported, but it would require modifying the fragment + * program to invert the y component of the texture coordinate by + * inserting a 'SUB tc.y, {1.0}.xxxx, tc' instruction. + */ + FALLBACK(&i915->intel, I915_FALLBACK_POINT_SPRITE_COORD_ORIGIN, + (params[0] != GL_UPPER_LEFT)); + break; + } +} + + /* ============================================================= * Color masks */ @@ -939,6 +957,17 @@ i915Enable(GLcontext * ctx, GLenum cap, GLboolean state) case GL_POLYGON_SMOOTH: break; + case GL_POINT_SPRITE: + /* This state change is handled in i915_reduced_primitive_state because + * the hardware bit should only be set when rendering points. + */ + I915_STATECHANGE(i915, I915_UPLOAD_CTX); + if (state) + i915->state.Ctx[I915_CTXREG_LIS4] |= S4_SPRITE_POINT_ENABLE; + else + i915->state.Ctx[I915_CTXREG_LIS4] &= ~S4_SPRITE_POINT_ENABLE; + break; + case GL_POINT_SMOOTH: break; -- cgit v1.2.3 From 718f31b830b2c4edad8b7e04804ff23e1db93e5a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sun, 29 Nov 2009 17:43:38 -0800 Subject: i915: Round point sizes instead of truncate. --- src/mesa/drivers/dri/i915/i915_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index 1ec84ef1167..86f37379dc4 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -585,7 +585,7 @@ i915PointSize(GLcontext * ctx, GLfloat size) { struct i915_context *i915 = I915_CONTEXT(ctx); int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_POINT_WIDTH_MASK; - GLint point_size = (int) size; + GLint point_size = (int) round(size); DBG("%s\n", __FUNCTION__); -- cgit v1.2.3 From 533b7660073f2c1cd1a19105d4989ec11bfdcd87 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sun, 29 Nov 2009 17:49:55 -0800 Subject: i915: Fallback bit define missed on previous commit --- src/mesa/drivers/dri/i915/i915_context.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h index 8de4a9d0d36..90e698bacf2 100644 --- a/src/mesa/drivers/dri/i915/i915_context.h +++ b/src/mesa/drivers/dri/i915/i915_context.h @@ -39,6 +39,7 @@ #define I915_FALLBACK_LOGICOP 0x20000 #define I915_FALLBACK_POLYGON_SMOOTH 0x40000 #define I915_FALLBACK_POINT_SMOOTH 0x80000 +#define I915_FALLBACK_POINT_SPRITE_COORD_ORIGIN 0x100000 #define I915_UPLOAD_CTX 0x1 #define I915_UPLOAD_BUFFERS 0x2 -- cgit v1.2.3 From 587a52e95bbe96788e8b96b63f091bb3022fc048 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 30 Nov 2009 12:43:12 -0800 Subject: i915: Actually put i915PointParameterfv in the driver function table. Duh. --- src/mesa/drivers/dri/i915/i915_state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index 86f37379dc4..cc98d125dbc 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -1137,6 +1137,7 @@ i915InitStateFunctions(struct dd_function_table *functions) functions->LineWidth = i915LineWidth; functions->LogicOpcode = i915LogicOp; functions->PointSize = i915PointSize; + functions->PointParameterfv = i915PointParameterfv; functions->PolygonStipple = i915PolygonStipple; functions->Scissor = i915Scissor; functions->ShadeModel = i915ShadeModel; -- cgit v1.2.3