summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: trim down #includes in api_loopback.hBrian Paul2015-03-021-6/+1
| | | | Acked-by: Matt Turner <[email protected]>
* mesa: trim down includes of compiler.hBrian Paul2015-03-0216-23/+6
| | | | | | | In some cases, glheader.h is the right #include. Also remove some instances of struct _glapi_table declarations. Acked-by: Matt Turner <[email protected]>
* scons: Fix HAVE___* definition.Jose Fonseca2015-03-021-24/+23
| | | | | | These definitions must be moved before `cppdefines` is used to have effect. Trivial.
* identity: Remove.Jose Fonseca2015-03-0214-1707/+0
| | | | | | | | | | | | | | | It's unmaintained, and most likely broken: I use trace driver every now and then, and everytime I do I need to fix it up. It's also unused: identity_screen_create is never called. Above all, it's dead weight: if identity driver had the infrastructure for other pass-through drivers (like trace and rbug), then it would make sense on its own right. But as it is implemmented, it's just another driver to (forget) to update whenever there is a gallium interface change. Reviewed-by: Marek Olšák <[email protected]>
* i965: Remove the create_raw_surface vtbl hook.Francisco Jerez2015-03-025-47/+8
| | | | | | | | It's a wrapper around emit_buffer_surface_state with format=RAW, pitch=1, rw=true and the remaining arguments ordered differently. There's no point in having a separate vtbl pointer for that. Reviewed-by: Kristian Høgsberg <[email protected]>
* i965: Add missing defines for render cache messages.Francisco Jerez2015-03-022-2/+8
| | | | | | And remove duplicated definition of OWORD_DUAL_BLOCK_WRITE. Reviewed-by: Paul Berry <[email protected]>
* i965/skl: Lay out a 1D miptree horizontallyNeil Roberts2015-03-021-2/+60
| | | | | | | On Gen9+ the 1D miptree is laid out with all of the mipmap levels in a horizontal line. Reviewed-by: Ben Widawsky <[email protected]>
* i965/skl: Lay out 3D textures the same as array texturesNeil Roberts2015-03-021-2/+8
| | | | | | | On Gen9+ the 3D textures use the same mipmap layout as 2D array textures. Reviewed-by: Ben Widawsky <[email protected]>
* i965/skl: Fix the maximum thread count format for the PSNeil Roberts2015-03-021-1/+6
| | | | | | | According to the bspec for some reason the format of the maximum number of threads field has changed from U8-2 to U8-1 for the PS. Reviewed-by: Anuj Phogat <[email protected]>
* draw: fix division-by-zero for empty geometry shadersMarek Olšák2015-03-021-2/+5
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89372 Reviewed-by: Dave Airlie <[email protected]>
* i965/gs: Check newly-generated GS-out VUE map against correct stageChris Forbes2015-03-011-1/+1
| | | | | | | | | | | | | | | Previously, we compared our new GS-out VUE map to the existing *VS*-out VUE map, which is bogus. This would mostly manifest as redundant dirty flagging where the GS is in use but the VS and GS output layouts differ; but there is a scary case where we would fail to flag a GS-out layout change if it happened to match the VS-out layout. Signed-off-by: Chris Forbes <[email protected]> Cc: "10.5, 10.4" <[email protected]> Reviewed-by: Matt Turner <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88885
* i965: add GLSL_TYPE_DOUBLE switch case to silence warningBrian Paul2015-02-281-0/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: include macros.h in stencil.hBrian Paul2015-02-281-0/+1
| | | | | | Since it uses the CLAMP macro. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move finite macro to imports.hBrian Paul2015-02-282-8/+8
| | | | | | Move it to the only place it's used. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove _NORMAPI, _NORMAPIP macrosBrian Paul2015-02-282-8/+1
| | | | | | Was only used in one place. Use equivalent _XFORMAPIP there instead. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move FLT_MAX_EXP to c99_math.hBrian Paul2015-02-282-4/+4
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: move ONE_DIV_SQRT_LN2 to prog_statevars.cBrian Paul2015-02-282-4/+3
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove unused uninitialized_var() macroBrian Paul2015-02-281-8/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: Check return value of __get_cpuid().Matt Turner2015-02-281-3/+3
| | | | | | | | | | | The use of the uninitialized_var() macro was to silence an uninitialized variable warning that I assumed stemmed from gcc being unable to see inside __get_cpuid() or understand its inline assembly. In fact, it was because the __get_cpuid() function can fail, and not initialize its arguments. Instead, check for failure and return early. Reviewed-by: Brian Paul <[email protected]>
* 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]>