summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965/fs/nir: Mark fallthrough.Matt Turner2015-02-281-0/+1
|
* i965/fs/nir: Mark fallthrough.Matt Turner2015-02-281-0/+1
|
* i965: Avoid applying negate to wrong MAD source.Matt Turner2015-02-272-30/+26
| | | | | | | | | | | | For some given GLSL IR like (+ (neg x) (* 1.2 x)), the try_emit_mad function would see that one of the +'s sources was a negate expression and set mul_negate = true without confirming that it was actually a multiply. Cc: 10.5 <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89315 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89095 Reviewed-by: Ian Romanick <[email protected]>
* i965/vec4: Fix implementation of i2b.Matt Turner2015-02-271-1/+1
| | | | | | | | I broke this in commit 2881b123d. I must have misread i2b as b2i. Cc: 10.5 <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88246 Reviewed-by: Ian Romanick <[email protected]>
* i965/fs/nir: Use emit_math for nir_op_fpowIan Romanick2015-02-271-1/+1
| | | | | | | | | It appears that all the other instructions that need it already use it. This one just got missed. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "10.5" <[email protected]>
* mapi: Don't rely on GNU void pointer arithmetic.Matt Turner2015-02-272-2/+2
| | | | | | | | | Commit 79daa510c added -Werror=pointer-arith to CFLAGS, which makes arithmetic on void pointers an error. See https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html Reviewed-by: Brian Paul <[email protected]>
* Revert "configure: Leverage gcc warn options to enable safe use of C99 ↵Kenneth Graunke2015-02-2711-51/+12
| | | | | | | | | features where possible." This reverts commit 79daa510c7a871a33797308a2ccb4b83a067ffbe. I apparently hadn't done a clean build when testing this; it broke the build for Tom, Ben, and myself. We like the idea; let's try a v2.
* auxilary/os: correct sysctl use in os_get_total_physical_memory()Jonathan Gray2015-02-271-2/+2
| | | | | | | | | | | | | The length argument passed to sysctl was the size of the pointer not the type. The result of this is sysctl calls would fail on 32 bit BSD/Mac OS X. Additionally the wrong pointer was passed as an argument to store the result of the sysctl call. Cc: "10.4, 10.5" <[email protected]> Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glsl: silence uninitialized var warning on MinGWBrian Paul2015-02-271-0/+1
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* mesa: silence unused var warning in get_tex_rgba_uncompressed()Brian Paul2015-02-271-1/+2
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* mesa: move declaration before codeBrian Paul2015-02-271-2/+3
| | | | | | To fix MinGW warning. Reviewed-by: Anuj Phogat <[email protected]>
* meta: silence declaration after code warning on MinGWBrian Paul2015-02-271-1/+2
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* meta: silence uninitialized variable warnings for MinGWBrian Paul2015-02-271-0/+2
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* c99_alloca.h: fix #include for MinGWBrian Paul2015-02-271-0/+4
| | | | | | | As with MSVC, include malloc.h but don't redefine alloca. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89364 Reviewed-by: José Fonseca <[email protected]>
* gallium/util: add debug_print_usage_enum() debug helperBrian Paul2015-02-272-0/+22
| | | | Signed-off-by: Brian Paul <[email protected]>
* gallium/util: fix 'statement with no effect' warningBrian Paul2015-02-271-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* i965: Fix I/L/LA SNORM formats.Kenneth Graunke2015-02-271-1/+19
| | | | | | | | | | | | | | | _mesa_choose_tex_format (texformat.c) tries I8_SNORM, L8_SNORM, and either L8A8_SNORM or A8L8_SNORM, none of which are supported by our driver. Failing that, it falls back to RGBX for luminance, and RGBA intensity and luminance alpha. So, we need to use swizzle overrrides to obtain the correct values. Fixes Piglit's EXT_texture_snorm/fbo-blending-formats and fbo-clear-formats. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* i965/fs: Patch the instruction generating discards; don't use CMP.Z.Kenneth Graunke2015-02-271-2/+3
| | | | | | | | | | | | | | | | | | | CMP.Z doesn't work on Gen4-5 because the boolean isn't guaranteed to be 0 or 0xFFFFFFFF - only the low bit is defined. We can call emit_bool_to_cond_code to generate the condition in f0.0; the last instruction will generate the flag value. We can patch it to use f0.1, and negate the condition. Fixes discard tests on Gen4-5. Haswell shader-db stats: total instructions in shared programs: 5770279 -> 5769112 (-0.02%) instructions in affected programs: 64342 -> 63175 (-1.81%) helped: 1069 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Introduce brw_negate_cmod().Kenneth Graunke2015-02-272-0/+23
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* main: Fix whitespace in teximage.c.Laura Ekstrand2015-02-271-1/+1
| | | | Reviewed-by: Ian Romanick <[email protected]>
* radeonsi/compute: Enable PIPE_SHADER_CAP_DOUBLES v2Tom Stellard2015-02-271-2/+2
| | | | | | | v2: - Simplify ifdef Reviewed-by: Michel Dänzer <[email protected]>
* clover: Don't unconditionally define cl_khr_fp64Tom Stellard2015-02-271-1/+0
| | | | | | | This should be done by the frontend for devices that support this extension. Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: Fix build with dri drivers enabled, and vl state trackers disabledTom Stellard2015-02-271-1/+5
| | | | | | | | | | | | | | | | | Configure arguments: ./configure --disable-dri3 --disable-xvmc --enable-opencl --with-gallium-drivers=r300,r600,radeonsi --with-egl-platforms=drm Build error: make[3]: *** No rule to make target `../../../../src/gallium/auxiliary/libgalliumvlwinsys.la', needed by `pipe_r300.la'. Stop. Cc: "10.5" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* configure: Leverage gcc warn options to enable safe use of C99 features ↵Jose Fonseca2015-02-2711-12/+51
| | | | | | | | | | | | | | | | | | | | | | | where possible. The main objective of this change is to enable Linux developers to use more of C99 throughout Mesa, with confidence that the portions that need to be built with MSVC -- and only those portions --, stay portable. This is achieved by using the appropriate -Werror= options only on the places they need to be used. Unfortunately we still need MSVC 2008 on a few portions of the code (namely llvmpipe and its dependencies). I hope to eventually eliminate this so that we can use C99 everywhere, but there are technical/logistic challenges (specifically, newer Windows SDKs no longer bundle MSVC, instead require a full installation of Visual Studio, and that has hindered adoption of newer MSVC versions on our build processes.) Thankfully we have more directy control over our OpenGL driver, which is why we're now able to migrate to MSVC 2013 for most of the tree. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Use alloca instead of variable length arrays.Jose Fonseca2015-02-274-16/+66
| | | | | | | | This is to enable the code to build with -Werror=vla in the short term, and enable the code to build with MSVC2013 soon after. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: restore #include stdarg.h in imports.hBrian Paul2015-02-271-0/+1
| | | | | https://bugs.freedesktop.org/show_bug.cgi?id=89345 Signed-off-by: Brian Paul <[email protected]>
* c99_math.h: add defines for M_PI, M_E, M_LOG2EBrian Paul2015-02-271-0/+13
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89342 Signed-off-by: Brian Paul <[email protected]>
* r300g/tests: Include stdio.h.Vinson Lee2015-02-261-0/+2
| | | | | | | | | | | | Fix build error. CC compiler/tests/r300_compiler_tests-radeon_compiler_regalloc_tests.o compiler/tests/radeon_compiler_regalloc_tests.c: In function ‘test_runner_rc_regalloc’: compiler/tests/radeon_compiler_regalloc_tests.c:57:3: error: implicit declaration of function ‘fprintf’ [-Werror=implicit-function-declaration] fprintf(stderr, "Failed to load program\n"); ^ Signed-off-by: Vinson Lee <[email protected]>
* radeon/compiler: include stdio.hBrian Paul2015-02-261-0/+1
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89343 Reviewed-by: Tom Stellard <[email protected]>
* main: Fix target checking for CompressedTexSubImage*D.Laura Ekstrand2015-02-261-15/+65
| | | | | | | | | | | | | This fixes a dEQP test failure. In the test, glCompressedTexSubImage2D was called with target = 0 and failed to throw INVALID ENUM. This failure was caused by _mesa_get_current_tex_object(ctx, target) being called before the target checking. To remedy this, target checking was made into its own function and called prior to _mesa_get_current_tex_object. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89311 Reviewed-by: Anuj Phogat <[email protected]>
* main: Fix target checking for CopyTexSubImage*D.Laura Ekstrand2015-02-261-8/+54
| | | | | | | | | | | | | This fixes a dEQP test failure. In the test, glCopyTexSubImage2D was called with target = 0 and failed to throw INVALID ENUM. This failure was caused by _mesa_get_current_tex_object(ctx, target) being called before the target checking. To remedy this, target checking was separated from the main error-checking function and called prior to _mesa_get_current_tex_object. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89312 Reviewed-by: Anuj Phogat <[email protected]>
* c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVCBrian Paul2015-02-261-0/+5
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove unused INLINE macro from compiler.hBrian Paul2015-02-261-7/+0
| | | | | | We now use 'inline' everywhere in Mesa. Reviewed-by: Alex Deucher <[email protected]>
* st/mesa: replace INLINE with inlineBrian Paul2015-02-2615-37/+37
| | | | Reviewed-by: Alex Deucher <[email protected]>
* swrast: replace INLINE with inlineBrian Paul2015-02-262-6/+6
| | | | Reviewed-by: Alex Deucher <[email protected]>
* radeon: replace INLINE with inlineBrian Paul2015-02-265-8/+8
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r200: replace INLINE with inlineBrian Paul2015-02-263-4/+4
| | | | Reviewed-by: Alex Deucher <[email protected]>
* i915: replace INLINE with inlineBrian Paul2015-02-2610-22/+22
| | | | Reviewed-by: Alex Deucher <[email protected]>
* include,auxiliary: Remove support for MSVC older then 2008.Jose Fonseca2015-02-264-104/+7
| | | | | | | | | | MSVC 2008 (shipped with Windows SDK 7.0.7600) is the oldest we need to support. At least on llvmpipe, gallium/auxiliary, and util modules. For the remaining modules (particular all OpenGL specific code) can be built with MSVC 2013. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: don't include stdint.h in compiler.hBrian Paul2015-02-261-6/+0
| | | | | | | Not needed. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't include math.h in compiler.hBrian Paul2015-02-264-1/+3
| | | | | | | | Not needed by anything in that header. Include math.h or c99_math.h where needed instead. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: trim down #includes in compiler.hBrian Paul2015-02-264-5/+4
| | | | | | | | Don't include stuff we don't need. Fix a few #includes elsewhere to keep thing building. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* r300g: remove dependency on compiler.hBrian Paul2015-02-265-3/+5
| | | | | | | | It only needs typical stdio.h and stdlib.h functions. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't include limits.h in compiler.hBrian Paul2015-02-261-1/+0
| | | | | | | Not needed. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't include float.h in compiler.hBrian Paul2015-02-261-1/+0
| | | | | | | Not needed. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: only include ctype.h where it's usedBrian Paul2015-02-262-1/+1
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: include stdarg.h only where it's usedBrian Paul2015-02-265-3/+5
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove M_PI, M_E, M_LOG2E macro definitionsBrian Paul2015-02-261-13/+0
| | | | | | | Should be defined in math.h. If not, we can add them to c99_math.h Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* glsl: #include c99_math.h instead of core.hBrian Paul2015-02-261-1/+1
| | | | | | | We only need the M_LOG2E definition. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: whitespace, comment formatting fixes in p_defines.hBrian Paul2015-02-261-30/+36
| | | | | | Just to keep things consistent. Reviewed-by: José Fonseca <[email protected]>