[Mesa-dev] [PATCH 5/9] gallivm: Removed unused variable.

2014-11-26 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c index 2ef5db1..738d5e9 100644 --- a/src/gallium/auxiliary/

[Mesa-dev] [PATCH 9/9] mesa/gdi: Don't pretend mesadef.py is auto generated.

2014-11-26 Thread jfonseca
From: José Fonseca Just use the same entrypoints we use for st/wgl's opengl32.dll. --- src/mesa/drivers/windows/gdi/mesa.def | 839 -- 1 file changed, 192 insertions(+), 647 deletions(-) diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windo

[Mesa-dev] [PATCH 6/9] util/u_snprintf: Don't redefine HAVE_STDINT_H as 0.

2014-11-26 Thread jfonseca
From: José Fonseca We now always guarantee availability of stdint.h on MSVC -- if MSVC doesn't supply one we use our own. --- src/gallium/auxiliary/util/u_snprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_snprintf.c b/src/gallium/auxilia

[Mesa-dev] [PATCH 3/9] scons: Disable MSVC signed/unsigned mismatch warnings.

2014-11-26 Thread jfonseca
From: José Fonseca Unfortunately gcc completely ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base end up being little more than noise, potentially obscuring more pertinent warnings. This change disables them. --- scons/gallium.py | 1 + 1 fi

[Mesa-dev] [PATCH 2/9] scons: Generate SSE2 floating-point arithmetic.

2014-11-26 Thread jfonseca
From: José Fonseca - SSE2 is available on all x86 processors we care about. - It's recommended by Intel: https://software.intel.com/en-us/blogs/2012/09/26/gcc-x86-performance-hints - And has been the default since MSVC 2012: http://msdn.microsoft.com/en-us/library/7t5yh4fd(v=vs.110).aspx

[Mesa-dev] [PATCH 8/9] st/wgl: Don't export wglGetExtensionsStringARB.

2014-11-26 Thread jfonseca
From: José Fonseca It's not exported by the official opengl32.dll neither. Applications are supposed to get it via wglGetProcAddress(), not GetProcAddress(). --- src/gallium/state_trackers/wgl/opengl32.def | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/state_trackers/wgl/opengl3

[Mesa-dev] [PATCH 7/9] mapi/glapi: Fix dll linkage of GLES1 symbols.

2014-11-26 Thread jfonseca
From: José Fonseca This fixes several MSVC warnings like: warning C4273: 'glClearColorx' : inconsistent dll linkage In fact, we should avoid using `declspec(dllexport)` altogether, and use exclusively the .DEF instead, which gives more precise control of which symbols must be exported, but al

[Mesa-dev] [PATCH 1/9] scons: Remove dead code/comments.

2014-11-26 Thread jfonseca
From: José Fonseca - Remove no-op if-clause. - -mstackrealign has been enabled again on MinGW for quite some time and appears to work alright nowadays. - Drop -mmmx option as it is implied my -msse, and we don't use MMX intrinsics anyway. --- scons/gallium.py | 5 + 1 file changed, 1 i

[Mesa-dev] [PATCH 4/9] draw, gallivm, llvmpipe: Avoid implicit casts of 32-bit shifts to 64-bits.

2014-11-26 Thread jfonseca
From: José Fonseca Addresses MSVC warnings "result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)", which can often be symptom of bugs, but in these cases were all benign. --- src/gallium/auxiliary/draw/draw_llvm.c| 4 ++-- src/gallium/auxiliary/gallivm/lp_b

[Mesa-dev] [PATCH 1/3] cmake: Don't use gcc specific warnings with g++.

2014-11-19 Thread jfonseca
From: José Fonseca Avoids "warning: command line option ‘-W...’ is valid for Ada/C/ObjC but not for C++". --- CMakeLists.txt | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3e217f..57a46f8 100644 --- a/CMakeLists.txt +++ b/CMakeLi

[Mesa-dev] [PATCH 2/3] tests, trival, fp, vp: Rename errno with errnum.

2014-11-19 Thread jfonseca
From: José Fonseca Prevents warnings on MinGW due to conflicting linkage types for errno. --- src/fp/fp-tri.c | 8 src/tests/arbfpspec.c| 14 +++--- src/tests/arbfptest1.c | 8 src/tests/arbvptest1.c |

[Mesa-dev] [PATCH 3/3] wgl: Ensure PIXELFORMATDESCRIPTOR members are zeroed.

2014-11-19 Thread jfonseca
From: José Fonseca I suddenly started seeing many simple GL apps, including wglinfo, choosing Microsoft GDI OpenGL implementation, even though hardware accelerated pixel formats were available. It turned out that: - the screen was in 16bpp mode (some WHCK tests have the nasty habit of doing th

[Mesa-dev] [PATCH] rtasm,translate: Re-enable SSE on Mingw64.

2014-11-19 Thread jfonseca
From: José Fonseca This reverts f4dd0991719ef3e2606920c5100b372181c60899. The src/gallium/tests/unit/translate_test.c gives the same results on MinGW 64-bits as on Linux 64-bits. And since MinGW is often used for development/testing due to its convenience, it's better not to have this sort of d

[Mesa-dev] [PATCH] mesa, st/glx, st/wgl: Move GL version validation into an helper.

2014-11-14 Thread jfonseca
From: José Fonseca As suggested by Brian Paul. Tested with piglit glx-create-context-invalid-{gl,es}-version. --- src/gallium/state_trackers/glx/xlib/glx_api.c| 13 +++--- src/gallium/state_trackers/wgl/stw_ext_context.c | 13 +++--- src/mesa/main/version.c

[Mesa-dev] [PATCH 2/2] st/wgl: Implement WGL_EXT_create_context_es/es2_profile.

2014-11-14 Thread jfonseca
From: José Fonseca Derived from st/glx's GLX_EXT_create_context_es/es2_profile implementation. Tested with an OpenGL ES 2.0 ApiTrace. --- src/gallium/state_trackers/wgl/stw_context.c | 74 +- src/gallium/state_trackers/wgl/stw_ext_context.c | 65 +--

[Mesa-dev] [PATCH 1/2] st/xlib: Generate errors as specified.

2014-11-14 Thread jfonseca
From: José Fonseca Tested with piglit glx tests. --- src/gallium/state_trackers/glx/xlib/glx_api.c | 125 ++ 1 file changed, 109 insertions(+), 16 deletions(-) diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c ind

[Mesa-dev] [PATCH 3/3] glx: Allow to create any OpenGL ES version.

2014-11-12 Thread jfonseca
From: José Fonseca The latest version of GLX_EXT_create_context_es2_profile states: "If the version requested is a valid and supported OpenGL-ES version, and the GLX_CONTEXT_ES_PROFILE_BIT_EXT bit is set in the GLX_CONTEXT_PROFILE_MASK_ARB attribute (see below), then the context returned

[Mesa-dev] [PATCH 2/3] st/dri: Support EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR/GLX_CONTEXT_DEBUG_BIT_ARB on ES contexts.

2014-11-12 Thread jfonseca
From: José Fonseca The latest version of the specs explicitly allow it, and given that Mesa universally supports KHR_debug we should definitely support it. Totally untested. (Just happened to noticed this while implementing GLX_EXT_create_context_es2_profile for st/xlib.) --- src/gallium/state

[Mesa-dev] [PATCH 1/3] st/glx: Implement GLX_EXT_create_context_es2_profile.

2014-11-12 Thread jfonseca
From: José Fonseca apitrace now supports it, and it makes it much easier to test tracing/replaying on OpenGL ES contexts since GLX_EXT_create_context_{es2,es}_profile are widely available. --- src/gallium/state_trackers/glx/xlib/glx_api.c | 5 +- src/gallium/state_trackers/glx/xlib/xm_api.c |

[Mesa-dev] [PATCH] util/format: Fix clamping to 32bit integers.

2014-11-07 Thread jfonseca
From: José Fonseca Use clamping constants that guarantee no integer overflows. As spotted by Chris Forbes. This causes the code to change as: - value |= (uint32_t)CLAMP(src[0], 0.0f, 4294967295.0f); + value |= (uint32_t)CLAMP(src[0], 0.0f, 4294967040.0f); - value |= (u

[Mesa-dev] [PATCH] llvmpipe: Avoid deadlock when unloading opengl32.dll

2014-11-07 Thread jfonseca
From: José Fonseca On Windows, DllMain calls and thread creation/destruction are serialized, so when llvmpipe is destroyed from DllMain waiting for the rasterizer threads to finish will deadlock. So, instead of waiting for rasterizer threads to have finished, simply wait for the rasterizer thre

[Mesa-dev] [PATCH] util/format: Generate floating point constants for clamping.

2014-11-07 Thread jfonseca
From: José Fonseca This commit causes the generated C code to change as union util_format_r32g32b32a32_sscaled pixel; - pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647); - pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647); - pi

[Mesa-dev] [PATCH 1/2] llvmpipe: Flush stdout on lp_test_* unit tests.

2014-10-24 Thread jfonseca
From: José Fonseca So that the order of test messages and gallivm/llvmpipe debug output is preserved. Trivial. --- src/gallium/drivers/llvmpipe/lp_test_arit.c | 1 + src/gallium/drivers/llvmpipe/lp_test_format.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gallium/drivers/llvmpi

[Mesa-dev] [PATCH 2/2] llvmpipe: Ensure the packed input of the lp_test_format is aligned.

2014-10-24 Thread jfonseca
From: José Fonseca https://bugs.freedesktop.org/show_bug.cgi?id=85377 http://llvm.org/bugs/show_bug.cgi?id=21365 --- src/gallium/drivers/llvmpipe/lp_test_format.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/sr

[Mesa-dev] [PATCH 3/3] gallivm: Properly update for removal of JITMemoryManager in LLVM 3.6.

2014-10-22 Thread jfonseca
From: José Fonseca JITMemoryManager was removed in LLVM 3.6, and replaced by its base class RTDyldMemoryManager. This change fixes our JIT memory managers specializations to derive from RTDyldMemoryManager in LLVM 3.6 instead of JITMemoryManager. This enables llvmpipe to run with LLVM 3.6. How

[Mesa-dev] [PATCH 2/3] gallivm: Fix white-space.

2014-10-22 Thread jfonseca
From: José Fonseca Replace tabs with spaces. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index ab3b3c9..a1d2940

[Mesa-dev] [PATCH 1/3] gallivm, llvmpipe, clover: Bump required LLVM version to 3.3.

2014-10-22 Thread jfonseca
From: José Fonseca We'll need to update gallivm for the interface changes in LLVM 3.6, and the fewer the number of older LLVM versions we support the less hairy that will be. As consequence HAVE_AVX define can disappear. (Note HAVE_AVX means whether LLVM version is supported or not. Runtime su

[Mesa-dev] [PATCH] glsl/glcpp: Rename ERROR to ERROR_TOKEN.

2014-07-30 Thread jfonseca
From: José Fonseca To prevent collision with wingdi.h's ERROR define, using the same _TOKEN suffix already forsome other tokens due to similar reasons. PS: Name collisions will be rife with single capitalized words. And using _TOKEN suffix for only some of the tokens is not particularly consist

[Mesa-dev] [PATCH] st/wgl: Clamp wglChoosePixelFormatARB's output nNumFormats to nMaxFormats.

2014-07-24 Thread jfonseca
From: José Fonseca While running https://github.com/nvMcJohn/apitest with apitrace I noticed that Mesa was producing bogus results: wglChoosePixelFormatARB(hdc, piAttribIList = {...}, pfAttribFList = &0, nMaxFormats = 1, piFormats = {19, 65576, 37, 198656, 131075, 0, 402653184, 0, 0, 0, 0,

[Mesa-dev] [PATCH] mesa/main: Prevent sefgault on glGetIntegerv(GL_ATOMIC_COUNTER_BUFFER_BINDING).

2014-06-06 Thread jfonseca
From: José Fonseca A recent ApiTrace change, that tries to dump more buffer state causes Mesa from my distro (10.1.4) to segfaults here. I haven't actually confirm this fixes it (I can't repro on master), but it seems a good idea to be defensive here anyway. Cc: "10.1 10.2" --- src/mesa/main/

[Mesa-dev] [PATCH] wgl: Disable CRT message boxes when Windows system error messages boxes are disabled.

2014-06-03 Thread jfonseca
From: José Fonseca At least on MSVC we statically link against the CRT, so we must disable the CRT message boxes if we want to attended testing. The messages are convenient when running manually, so let them be if the system error message boxes are not disabled. --- src/gallium/auxiliary/util/u

[Mesa-dev] [PATCH 2/2] mesa: Make glGetIntegerv(GL_*_ARRAY_SIZE) return GL_BGRA.

2014-06-01 Thread jfonseca
From: José Fonseca Same as b026b6bbfe3f15c8a7296ac107dc3d31f74e401e, but COLOR_ARRAY_SIZE/SECONDARY_COLOR_ARRAY_SIZE. Ideally we wouldn't munge the incoming state, so that we wouldn't need to unmunge it back on glGet*. But the array size state is copied and referred in many places, many of whic

[Mesa-dev] [PATCH 1/2] mesa/main: Make get_hash.c values constant.

2014-06-01 Thread jfonseca
From: José Fonseca --- src/mesa/main/get_hash_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/get_hash_generator.py b/src/mesa/main/get_hash_generator.py index 96bc495..b200d19 100644 --- a/src/mesa/main/get_hash_generator.py +++ b/src/mesa/main/ge

[Mesa-dev] [PATCH] docs: Document how to replace Windows built-in OpenGL software rasterizer with llvmpipe.

2014-05-29 Thread jfonseca
From: José Fonseca Just happened to stumble across this registry key while debugging something else. This technique is much neater than trying to override opengl32.dll. Also a few minors cleanups. --- docs/llvmpipe.html | 52 1 file changed,

[Mesa-dev] [PATCH 2/2] mesa: Rely on USE_X86_64_ASM.

2014-05-22 Thread jfonseca
From: José Fonseca This fixes MinGW x64 builds. We don't use assembly on any of the Windows builds, to avoid divergence between MSVC and MinGW when testing. --- src/mesa/main/cpuinfo.c | 2 +- src/mesa/main/cpuinfo.h | 2 +- src/mesa/x86/common_x86.c | 6 +++--- 3 files changed, 5 insertion

[Mesa-dev] [PATCH 1/2] scons: Fix x86_64 build.

2014-05-22 Thread jfonseca
From: José Fonseca x86/common_x86.c is required also for x86_64 builds. --- src/mesa/SConscript | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/SConscript b/src/mesa/SConscript index cd959be..f565786 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -392,6 +392,7 @@ if (

[Mesa-dev] [PATCH 2/2] gallivm: Disable workaround for PR12833 on LLVM 3.2+.

2014-05-14 Thread jfonseca
From: José Fonseca Fixed upstream. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 4d63f9a..ec54776 100644 --- a/src/gall

[Mesa-dev] [PATCH 1/2] gallivm: Support MCJIT on Windows.

2014-05-14 Thread jfonseca
From: José Fonseca It works fine, though it requires using ELF objects. With this change there is nothing preventing us to switch exclusively to MCJIT, everywhere. It's still off though. --- scons/llvm.py | 8 +++- src/gallium/auxiliary/gallivm/lp_bld_misc.c

[Mesa-dev] [PATCH 05/12] gallivm: Use LLVM global context.

2014-05-13 Thread jfonseca
From: José Fonseca I saw that LLVM internally uses its global context for some things, even when we use our own. Given ours is also global, might as well use LLVM's. However, sepearate contexts can still be enabled with a simple source code modification, for when the need/benefit arises. --- s

[Mesa-dev] [PATCH 02/12] configure: Require LLVM 3.1.

2014-05-13 Thread jfonseca
From: José Fonseca --- configure.ac | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 99a761a..b4a1606 100644 --- a/configure.ac +++ b/configure.ac @@ -1624,6 +1624,12 @@ if test "x$enable_gallium_llvm" = xyes; then LLVM_VERSION_INT=`echo $L

[Mesa-dev] [PATCH 03/12] gallivm, draw, llvmpipe: Remove support for versions of LLVM prior to 3.1.

2014-05-13 Thread jfonseca
From: José Fonseca Older versions haven't been tested probably don't work anyway. But more importantly, code supporting it is hindering further work. --- src/gallium/auxiliary/draw/draw_llvm.c| 48 -- src/gallium/auxiliary/gallivm/lp_bld.h| 3 + src/gallium/auxili

[Mesa-dev] [PATCH 01/12] scons: Require LLVM 3.1

2014-05-13 Thread jfonseca
From: José Fonseca Support for prior versions will be removed in the following change. --- scons/llvm.py | 57 + 1 file changed, 13 insertions(+), 44 deletions(-) diff --git a/scons/llvm.py b/scons/llvm.py index 134a072..cdfbe43 100644 ---

[Mesa-dev] [PATCH 09/12] draw: Delete unneeded LLVM stuff earlier.

2014-05-13 Thread jfonseca
From: Frank Henigman Free up unneeded LLVM stuff immediately after generating vertex shader code. Saves about 500K per shader. v2: Don't bother calling gallivm_free_function (Jose) Signed-off-by: José Fonseca --- src/gallium/auxiliary/draw/draw_llvm.c | 19 --- 1 file changed

[Mesa-dev] [PATCH 12/12] gallivm: Remove lp_func_delete_body.

2014-05-13 Thread jfonseca
From: José Fonseca Not necessary, now that we will free the whole module (hence all function bodies) immediately after compiling. --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 src/gallium/auxiliary/gallivm/lp_bld_misc.h |

[Mesa-dev] [PATCH 07/12] gallivm: One code memory pool with deferred free.

2014-05-13 Thread jfonseca
From: Frank Henigman Provide a JITMemoryManager derivative which puts all generated code into one memory pool instead of creating a new one each time code is generated. This saves significant memory per shader as the pool size is 512K and a small shader occupies just several K. This memory manag

[Mesa-dev] [PATCH 06/12] gallivm: Run passes per module, not per function.

2014-05-13 Thread jfonseca
From: José Fonseca This is how it is meant to be done nowadays. --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 47 - 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_

[Mesa-dev] [PATCH 10/12] llvmpipe: Delete unneeded LLVM stuff earlier.

2014-05-13 Thread jfonseca
From: José Fonseca Same as Frank's change to draw module but for llvmpipe module. --- src/gallium/drivers/llvmpipe/lp_state_fs.c| 13 ++--- src/gallium/drivers/llvmpipe/lp_state_setup.c | 13 ++--- src/gallium/drivers/llvmpipe/lp_test_arit.c | 4 ++-- src/gallium/drivers/l

[Mesa-dev] [PATCH 11/12] gallivm: Remove gallivm_free_function.

2014-05-13 Thread jfonseca
From: José Fonseca Unused. Deprecated by gallivm_free_ir(). --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 18 -- src/gallium/auxiliary/gallivm/lp_bld_init.h | 5 - 2 files changed, 23 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/

[Mesa-dev] [PATCH 08/12] gallivm: Separate freeing LLVM intermediate data from freeing final code.

2014-05-13 Thread jfonseca
From: Frank Henigman Split free_gallivm_state() into two steps. First step is gallivm_free_ir() which cleans up the LLVM scaffolding used to generate code while preserving the code itself. Second step is gallivm_free_code() to free the memory occupied by the code. v2: s/gallivm_teardown/galliv

[Mesa-dev] [PATCH 04/12] gallivm: Stop using module providers.

2014-05-13 Thread jfonseca
From: José Fonseca Nowadays LLVMModuleProviderRef is just an alias for LLVMModuleRef, so its use just causes unnecessary confusion. --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 33 ++--- src/gallium/auxiliary/gallivm/lp_bld_init.h | 1 - 2 files changed, 7 insertion

[Mesa-dev] [PATCH] ralloc: Omit detailed license information about talloc.

2014-05-09 Thread jfonseca
From: José Fonseca That information misleads source code auditing tools to think that ralloc itself is released under LGPL v3. Instead, simply state talloc is not licensed under a permissive license. --- src/glsl/ralloc.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 2/2] st/wgl: Advertise WGL_ARB_create_context(_profile).

2014-05-07 Thread jfonseca
From: José Fonseca We added wglCreateContextAttribsARB but not the extension strings. This allows creation of GL 3.x contents. --- src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/state_trackers/wgl/stw_ext_extensionsstr

[Mesa-dev] [PATCH 1/2] st/wgl: Honour request of 3.1 contexts through core profile where available.

2014-05-07 Thread jfonseca
From: José Fonseca Port 5f493eed69f6fb11239c04119d602f1c23a68cbd from GLX. --- src/gallium/state_trackers/wgl/stw_context.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/wgl/stw_context.c b/src/gallium/state_trackers/wgl/stw_co

[Mesa-dev] [PATCH 5/9] scons: Don't restrict MSVC_VERSION values.

2014-05-02 Thread jfonseca
From: José Fonseca Saves the trouble of continuously needing to update. --- common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.py b/common.py index d6e6215..1d2d586 100644 --- a/common.py +++ b/common.py @@ -101,4 +101,4 @@ def AddOptions(opts): opts.Add

[Mesa-dev] [PATCH 7/9] egl: Don't attempt to redefine stdint.h types with VS 2013.

2014-05-02 Thread jfonseca
From: José Fonseca Just include stdint.h. --- src/egl/main/eglcompiler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h index 53dab54..5ea83d6 100644 --- a/src/egl/main/eglcompiler.h +++ b/src/egl/main/eglcompiler.h @

[Mesa-dev] [PATCH 6/9] scons: Don't use bundled C99 headers for VS 2013.

2014-05-02 Thread jfonseca
From: José Fonseca Use the ones provided by the compiler instead. NOTE: External trees should be updated to not include '#include/c99' directory directly, but rather rely on scons/gallium.py to do the right thing. --- SConstruct | 6 -- scons/gallium.py | 6 ++ 2 files changed, 6

[Mesa-dev] [PATCH 9/9] util: Don't attempt to redefine INFINITY/NAN on VS 2013.

2014-05-02 Thread jfonseca
From: José Fonseca There are now provided by VS. --- src/gallium/auxiliary/util/u_math.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index a60e183..2ade64a 100644 --- a/src/gallium/auxiliary/util/u_math.h +++

[Mesa-dev] [PATCH 4/9] draw: Prevent signed/unsigned comparisons.

2014-05-02 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/draw/draw_pt_so_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/draw/draw_pt_so_emit.c b/src/gallium/auxiliary/draw/draw_pt_so_emit.c index bd49d0a..91e67c0 100644 --- a/src/gallium/auxiliary/draw/draw

[Mesa-dev] [PATCH 8/9] mesa: VS 2013 does not provide strcasecmp.

2014-05-02 Thread jfonseca
From: José Fonseca A define is necessary, like for earlier VS versions. --- src/mesa/main/imports.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 17a9bd0..af780b2 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/

[Mesa-dev] [PATCH 2/9] scons: Adjust the warnings for VS.

2014-05-02 Thread jfonseca
From: José Fonseca Silence insignificant warnings so significant warnings have a chance to stand out. The only abundant warning that's not silenced here is "C4018: signed/unsigned mismatch", as it could hide security issues, so it's better to actually fix the code. --- scons/gallium.py | 4 +++-

[Mesa-dev] [PATCH 1/9] util/u_debug_flush: Use util_snprintf.

2014-05-02 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/util/u_debug_flush.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index 9cf70db..fdb248c 100644 --- a/src/gallium/auxiliary/util/u_deb

[Mesa-dev] [PATCH 3/9] st/vega: Prevent signed/unsigned comparisons.

2014-05-02 Thread jfonseca
From: José Fonseca --- src/gallium/state_trackers/vega/vg_translate.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/vega/vg_translate.c b/src/gallium/state_trackers/vega/vg_translate.c index 7b3df27..4aad899 100644 --- a/src/gallium/st

[Mesa-dev] [PATCH] st/xlib: Do minimal version checking in glXCreateContextAttribsARB.

2014-04-24 Thread jfonseca
From: José Fonseca The current version checking is wrongly refusing to create 3.3 contexts; unsupported version are checked elsewhere; and the DRI path doesn't do this sort of checking neither. This enables piglit glsl 3.30 tests to run without skipping. --- src/gallium/state_trackers/glx/xlib/

[Mesa-dev] [PATCH 2/2] llvmpipe: Advertise GLSL 3.30.

2014-04-24 Thread jfonseca
From: José Fonseca According to Roland all TGSI support is there in theory. In practice there are a few piglit failures and crashes, as this hadn't been tested before. --- src/gallium/drivers/llvmpipe/lp_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/dr

[Mesa-dev] [PATCH 1/2] st/xlib: Honour request of 3.1 contexts through core profile where available.

2014-04-24 Thread jfonseca
From: José Fonseca The GLX_ARB_create_context_profile spec says: "If version 3.1 is requested, the context returned may implement any of the following versions: * Version 3.1. The GL_ARB_compatibility extension may or may not be implemented, as determined by the implementa

[Mesa-dev] [PATCH 2/2] mesa/st: Fix pipe_framebuffer_state::height for PIPE_TEXTURE_1D_ARRAY.

2014-04-23 Thread jfonseca
From: José Fonseca This prevents buffer overflow w/ llvmpipe when running piglit bin/gl-3.2-layered-rendering-clear-color-all-types 1d_array single_level -fbo -auto v2: Compute the framebuffer size as the minimum size, as pointed out by Brian; compacted code; ran piglit quick test list (wi

[Mesa-dev] [PATCH 1/2] util/u_debug: Pass correct size to strncat.

2014-04-23 Thread jfonseca
From: José Fonseca Courtesy of Clang static analyzer. --- src/gallium/auxiliary/util/u_debug.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index fe51717..dc840e8 100644 --- a/src/gallium/

[Mesa-dev] [PATCH 2/3] auxiliary/os,auxiliary/util: Fix the `‘noreturn’ function does return` warning.

2014-04-16 Thread jfonseca
From: José Fonseca Now that _debug_assert_fail() has the noreturn attribute, it is better that execution truly never returns. Not just for sake of silencing the warning, but because the code at the return IP address may be invalid or lead to inconsistent results. This removes support for the GA

[Mesa-dev] [PATCH 1/3] scons: Enable building through Clang Static Analyzer.

2014-04-16 Thread jfonseca
From: José Fonseca Same intent as commit a45a50a4828e1357e9555474bc127c5585b3a420, but this the C compiler is detected via C-preprocessor macros, similar to how autotools do it, as that seems to be the most reliable method. --- scons/gallium.py | 38 +++--- 1 file

[Mesa-dev] [PATCH 3/3] util: Add __declspec(noreturn) to _debug_assert_fail().

2014-04-16 Thread jfonseca
From: José Fonseca Mostly for consistency; as MSVC's static source code analysis doesn't seem to rely on assertions, but instead on different kind of source annotations( http://msdn.microsoft.com/en-us/library/hh916383.aspx ). --- src/gallium/auxiliary/util/u_debug.h | 3 +++ 1 file changed, 3 i

[Mesa-dev] [PATCH 2/3] util/u_debug: Add noreturn attribute to _debug_assert_fail().

2014-04-14 Thread jfonseca
From: José Fonseca As recommended by http://clang-analyzer.llvm.org/annotations.html#attr_noreturn --- src/gallium/auxiliary/util/u_debug.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h index

[Mesa-dev] [PATCH 1/3] scons: Enable building through Clang Static Analyzer.

2014-04-14 Thread jfonseca
From: José Fonseca By accurately detecting gcc/clang through --version option instead of executable name. Clang Static Analyzer reports many issues, most false positives, but it found at least one real and subtle use-after-free issue in st_texture_get_sampler_view(): http://people.freedeskto

[Mesa-dev] [PATCH 3/3] scons: Add an analyze option.

2014-04-14 Thread jfonseca
From: José Fonseca For Clang static code analyzer, the scan-build script will produce more comprehensive output. Nevertheless you can invoke it as CC=clang CXX=clang++ scons analyze=1 For MSVC this is the best way to use its static code analysis. Simply invoke as scons analyze=1 --- com

[Mesa-dev] [PATCH] mesa/st: Fix pipe_framebuffer_state::height for PIPE_TEXTURE_1D_ARRAY.

2014-04-03 Thread jfonseca
From: José Fonseca This prevents buffer overflow w/ llvmpipe when running piglit bin/gl-3.2-layered-rendering-clear-color-all-types 1d_array single_level -fbo -auto --- src/mesa/state_tracker/st_atom_framebuffer.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) di

[Mesa-dev] [PATCH] st/wgl: Remove wgl*Gallium*MESA().

2014-03-27 Thread jfonseca
From: José Fonseca These were only used by the Python state tracker, which was removed, hence they have no practical use. --- src/gallium/state_trackers/wgl/Makefile.sources| 1 - src/gallium/state_trackers/wgl/stw_ext_gallium.c | 50 -- src/gallium/state_trackers/wgl/

[Mesa-dev] [PATCH] mapi/glapi: Use ElementTree instead of libxml2.

2014-03-25 Thread jfonseca
From: José Fonseca It is quite hard to meet the dependency of the libxml2 python bindings out side Linux, and in particularly on MacOSX; whereas ElementTree is part of Python's standard library. ElementTree is more limited than libxml2: no DTD verification, defaults from DTD, or XInclude support

[Mesa-dev] [PATCH 1/2] draw: Duplicate TGSI tokens in draw_pipe_pstipple module.

2014-03-24 Thread jfonseca
From: José Fonseca As done in draw_pipe_aaline and draw_pipe_aapoint modules. --- src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple

[Mesa-dev] [PATCH 2/2] llvmpipe: Simplify vertex and geometry shaders.

2014-03-24 Thread jfonseca
From: José Fonseca Eliminate lp_vertex_shader, as it added nothing over draw_vertex_shader. Simplify lp_geometry_shader, as most of the incoming state is unneeded. (We could also just use draw_geometry_shader if we were willing to peek inside the structure.) --- src/gallium/drivers/llvmpipe/lp_

[Mesa-dev] [PATCH] st/mesa: Add R8G8B8A8_SRGB case to st_pipe_format_to_mesa_format.

2014-03-06 Thread jfonseca
From: José Fonseca With the recent SRGB changes all my automated OpenGL llvmpipe tests (piglit, conform, glretrace) start asserting with the backtrace below. I'm hoping this change will fix it. I'm not entirely sure, as this doesn't happen in my development machine (the bug probably depends on

[Mesa-dev] [PATCH 3/3] c11/threads: Don't implement thrd_current on Windows.

2014-03-03 Thread jfonseca
From: José Fonseca GetCurrentThread() returns a pseudo-handle (a constant which can only be used within the calling thread) and not a real handle. DuplicateHandle will return a real handle, but it will create a new handle every time we call. Calling DuplicateHandle here means we will leak handl

[Mesa-dev] [PATCH 2/3] mapi/u_thread: Use GetCurrentThreadId

2014-03-03 Thread jfonseca
From: José Fonseca u_thread_self() expects thrd_current() to return a unique numeric ID for the current thread, but this is not feasible on Windows. --- src/mapi/u_thread.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mapi/u_thread.h b/src/mapi/u_thread.h index ba5

[Mesa-dev] [PATCH 1/3] c11: Fix nano to second conversion.

2014-03-03 Thread jfonseca
From: José Fonseca Per https://gist.github.com/yohhoy/2223710/#comment-710118 --- include/c11/threads_win32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/c11/threads_win32.h b/include/c11/threads_win32.h index be1a389..771db94 100644 --- a/include/c11/threads_win3

[Mesa-dev] [PATCH 1/2] trace: Re-license trace.xsl under MIT license.

2014-01-17 Thread jfonseca
From: José Fonseca I was the sole author, as Tungsten Graphics employee, which was since then acquired by VMware Inc. --- src/gallium/drivers/trace/trace.xsl | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/gallium/drivers/trace/trace

[Mesa-dev] [PATCH 3/7] gallium: Use C11 threads.h.

2014-01-09 Thread jfonseca
From: José Fonseca Note that PIPE_ROUTINE now returns an int. --- src/gallium/auxiliary/os/os_thread.h | 262 +++--- src/gallium/drivers/llvmpipe/lp_rast.c| 2 +- src/gallium/drivers/rbug/rbug_core.c | 2 +- src/gallium/tests/unit/pipe_ba

[Mesa-dev] [PATCH 1/7] os: Remove pipe_static_condvar.

2014-01-09 Thread jfonseca
From: José Fonseca Never used. --- src/gallium/auxiliary/os/os_thread.h | 12 1 file changed, 12 deletions(-) diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 4528abb..d16f36d 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src

[Mesa-dev] [PATCH 4/7] mapi: Use C11 thread abstractions.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/mapi/u_thread.h | 165 +--- 1 file changed, 13 insertions(+), 152 deletions(-) diff --git a/src/mapi/u_thread.h b/src/mapi/u_thread.h index 31999c4..75fbec6 100644 --- a/src/mapi/u_thread.h +++ b/src/mapi/u_thread.h @@ -

[Mesa-dev] [PATCH 6/7] rbug: Update for PIPE_THREAD_ROUTINE returning 0.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/gallium/drivers/rbug/rbug_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c index 7cc9f79..c5b26b8 100644 --- a/src/gallium/drivers/rbug/rbug_core.c +++ b/src/gallium/

[Mesa-dev] [PATCH 2/7] c11: Import threads.h emulation library.

2014-01-09 Thread jfonseca
From: José Fonseca Implementation is based of https://gist.github.com/2223710 with the following modifications: - inline implementatation - retain XP compatability - add temporary hack for static mutex initializers (as they are not part of the stack but still widely used internally). --- inclu

[Mesa-dev] [PATCH 7/7] c11: Make TIME_UTC a conditional macro.

2014-01-09 Thread jfonseca
From: José Fonseca Some system headers already define it, so this prevents conflict. --- include/c11/threads.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/c11/threads.h b/include/c11/threads.h index 678774c..4a4079d 100644 --- a/include/c11/threads.h +++ b/i

[Mesa-dev] [PATCH 5/7] egl: Use C11 thread abstractions.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/egl/main/eglmutex.h | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/src/egl/main/eglmutex.h b/src/egl/main/eglmutex.h index 1349e9e..2ec965c 100644 --- a/src/egl/main/eglmutex.h +++ b/src/egl/main/eglmutex.h @@ -31,46 +31

[Mesa-dev] [PATCH] llvmpipe: Honour pipe_rasterizer::point_quad_rasterization.

2014-01-08 Thread jfonseca
From: José Fonseca Commit eda21d2a3010d9fc5a68b55a843c5e44b2abf8dd fixed the rasterization of points for Direct3D but ended up breaking the rasterization of OpenGL non-sprite points, in particular conform's pntrast.c test. The only way to get both working is to properly honour pipe_rasterizer::p

[Mesa-dev] [PATCH 2/2] demos/pixeltest: Adapt the example for points too.

2014-01-08 Thread jfonseca
From: José Fonseca This example is very useful to understand the rasterization of lines. And with this change, points too. Adding a key / command-line option to switch modes is left for a future opportunity though. --- src/demos/pixeltest.c | 109

[Mesa-dev] [PATCH 1/2] demos/pixeltest: Remove Line struct.

2014-01-08 Thread jfonseca
From: José Fonseca Not really used/necessary. --- src/demos/pixeltest.c | 113 +++--- 1 file changed, 52 insertions(+), 61 deletions(-) diff --git a/src/demos/pixeltest.c b/src/demos/pixeltest.c index e9b95b8..0898290 100644 --- a/src/demos/pixeltest.

[Mesa-dev] [PATCH 1/2] trace: Dump query results faithfully.

2013-11-27 Thread jfonseca
From: José Fonseca --- src/gallium/drivers/trace/tr_context.c| 82 +-- src/gallium/drivers/trace/tr_dump_state.c | 64 src/gallium/drivers/trace/tr_dump_state.h | 2 + 3 files changed, 133 insertions(+), 15 deletions(-) diff --git a/src/

[Mesa-dev] [PATCH 2/2] trace: Dump PIPE_QUERY_* enums.

2013-11-27 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/util/u_dump.h | 3 ++ src/gallium/auxiliary/util/u_dump_defines.c | 33 src/gallium/drivers/trace/tr_context.c | 3 +- src/gallium/drivers/trace/tr_dump_defines.h | 58 + src/gallium/drivers/

[Mesa-dev] [PATCH 1/2] tgsi_ureg: Refactor the ureg_* inline so that all variables are pre-declared.

2013-11-21 Thread jfonseca
From: José Fonseca Mere syntactical change. --- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 200 + 1 file changed, 104 insertions(+), 96 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index e104cd9..cf0c75e

[Mesa-dev] [PATCH 2/2] tgsi: Prevent emission of instructions with empty writemask.

2013-11-21 Thread jfonseca
From: José Fonseca These degenerate instructions can often be emitted by state trackers when the semantics of instructions don't match precisely. --- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 8 src/gallium/auxiliary/tgsi/tgsi_ureg.h | 22 ++ 2 files changed, 30 inse

[Mesa-dev] [PATCH] docs: Add a section with recommended reading for llvmpipe development.

2013-11-21 Thread jfonseca
From: José Fonseca Several links contributed by Keith Whitwell and Roland Scheidegger. --- docs/llvmpipe.html | 58 -- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/docs/llvmpipe.html b/docs/llvmpipe.html index 80f8a01..d695907

[Mesa-dev] [PATCH] tgsi_exec: Fix mask calculation for emit_kill_if.

2013-11-20 Thread jfonseca
From: José Fonseca Same as Si Chen's commit e7a5905d8a3960b0981750f8131e3af9acbfcdb8 for tgsi_exec module. Not actually tested, because softpipe is failing the test that caught this bug due to unrelated issues. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 3 +++ 1 file changed, 3 insertions(+)

[Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread jfonseca
From: José Fonseca D3D9 Shader Model 2 restricted the fog register to one component, http://msdn.microsoft.com/en-us/library/windows/desktop/bb172945.aspx , but that restriction no longer exists in Shader Model 3, and several WHCK tests enforce that. So this change: - lifts the single-component

  1   2   3   >