summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix build for darwinJon TURNEY2014-05-238-3/+19
| | | | | | | | | | | | | | | | | | | Fix build for darwin, when ./configured --disable-driglx-direct - darwin ld doesn't support -Bsymbolic or --version-script, so check if ld supports those options before using them - define GLX_ALIAS_UNSUPPORTED as config/darwin used to, as aliasing of non-weak symbols isn't supported - default to -with-dri-drivers=swrast v2: Use -Wl,-Bsymbolic, as before, not -Bsymbolic Test that ld --version-script works, rather than just looking for it in ld --help Don't use -Wl,--no-undefined on darwin, either Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* targets/egl-static: add missing line break in ldflagsEmil Velikov2014-05-231-1/+1
| | | | | | | | Accidently omitted by commit 7b7944ee1cedeaf. Cc: "10.2" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* mesa: Fix unbinding GL_DEPTH_STENCIL_ATTACHMENTJames Legg2014-05-231-0/+6
| | | | | | | | | glFramebufferRender(..., GL_DEPTH_STENCIL_ATTACHMENT, ..., 0) only detached the depth buffer and not the stencil buffer. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=79115 Reviewed-by: Brian Paul <[email protected]> Cc: "10.1 10.2" <[email protected]>
* targets/osmesa: limit the amount of exported symbolsEmil Velikov2014-05-232-0/+19
| | | | | | | src/gallium/targets/osmesa/Makefile.am | 1 + src/gallium/targets/osmesa/osmesa.sym | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/gallium/targets/osmesa/osmesa.sym
* gallivm: Disable workaround for PR12833 on LLVM 3.2+.José Fonseca2014-05-231-2/+2
| | | | Fixed upstream.
* gallivm: Support MCJIT on Windows.José Fonseca2014-05-231-0/+9
| | | | | | | 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.
* mesa/x86: Fix build with clang 3.4.José Fonseca2014-05-231-0/+4
| | | | | | | | It defines bit_SSE41 instead of bit_SSE4_1. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=79095 Trivial.
* mesa: Move declaration to top of block.José Fonseca2014-05-231-1/+3
| | | | To fix MSVC build. Trivial.
* meta blit: Set Z texcoord during meta blit to sample the correct layerJordan Justen2014-05-231-1/+8
| | | | | | | | | | | | If the source renderbuffer has a depth > 0, then send a Z texcoord which is set to the source attachment Z offset. This fixes piglit's gl-3.2-layered-rendering-gl-layer-render with the GL_TEXTURE_2D_MULTISAMPLE_ARRAY case test on i965/gen8. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: "10.2" <[email protected]>
* i965: Listen to BRW_NEW_FRAGMENT_PROGRAM for 3DSTATE_PS_BLEND.Kenneth Graunke2014-05-232-2/+3
| | | | | | | | | | | | | | brw_color_buffer_write_enabled depends on brw->fragment_program, which means we have to listen to BRW_NEW_FRAGMENT_PROGRAM. On most generations, this was only called from a function that already subscribed. However, on Broadwell, we failed to listen to the necessary event in the atom that emits 3DSTATE_PS_BLEND. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.2" <[email protected]>
* i965: Use WE_all for FB write header setup on Broadwell.Kenneth Graunke2014-05-231-6/+7
| | | | | | | | | | | | I forgot to disable writemasking on the OR and MOV which set the render target index and "source 0 alpha present to render target" bit. Using get_element_ud is equivalent and avoids a line-wrap. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.2" <[email protected]>
* mesa/x86: fix a typos in SSE4.1 detectionTobias Klausmann2014-05-221-2/+2
| | | | | | | | Commit a2fb71e23 introduced 32-bit code for SSE4.1. Fix compilation, and make sure to check ecx for the SSE4.1 bit. [imirkin: switch sse4.1 to look at ecx] Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Rely on USE_X86_64_ASM.José Fonseca2014-05-223-5/+5
| | | | | | | 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. Reviewed-by: Matt Turner <[email protected]>
* scons: Fix x86_64 build.José Fonseca2014-05-221-0/+1
| | | | | | x86/common_x86.c is required also for x86_64 builds. Reviewed-by: Matt Turner <[email protected]>
* mesa/x86: Brown bag fix for undeclared variable.Matt Turner2014-05-221-1/+1
|
* i965: Use SSE4.1 runtime detection for intel_miptree_map.Matt Atwood2014-05-221-8/+3
| | | | | | Previous it was a compile-time decision. Reviewed-by: Matt Turner <[email protected]>
* mesa/x86: add SSE4.1 runtime detection.Matt Atwood2014-05-222-0/+10
| | | | | | Add a bit to _mesa_x86_features for SSE 4.1, along with macros to query. Reviewed-by: Matt Turner <[email protected]>
* mesa/x86: Support SSE 4.1 detection on x86-64.Matt Turner2014-05-223-2/+13
| | | | | Uses the cpuid.h header provided by gcc and clang. Other platforms are encouraged to switch.
* mesa: Add uninitialized_vars macro from the Linux kernel.Matt Turner2014-05-221-0/+6
|
* haiku: Add missing u_memory.h for FREE()Alexander von Gluck IV2014-05-212-0/+2
| | | | Acked-by: Brian Paul <[email protected]>
* freedreno/a3xx: fix blend opcodeRob Clark2014-05-218-54/+83
| | | | | | | Seems the opcodes are slightly different from a2xx. Resync headers and move blend_func() helper into hw generation specific code. Signed-off-by: Rob Clark <[email protected]>
* mesa: check constant before null checkTimothy Arceri2014-05-221-3/+3
| | | | | | | For most drivers this if statement is always going to fail so check the constant value first. Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* freedreno/a3xx: fix depth/stencil gmem restoreRob Clark2014-05-211-1/+1
| | | | | | | We already multiply by bytes per pixel for this, so f3ba7611 broke mem2gmem for depth/stencil. Drop the now-redundant mutiply by cpp. Signed-off-by: Rob Clark <[email protected]>
* i965: Ask the VBO module to actually use VBOs.Eric Anholt2014-05-211-0/+3
| | | | | | | | | | Note that this covers the Begin/End rendering path, but not user vertex arrays (so we can't drop copy_array_to_vbo_array() code). Improves performance of isosurf GLVERTEX|TRIANGLES by 16.7506% +/- 4.98934% (n=20). No difference on openarena (n=10), which was why this was reverted back in cbde2765804a4fc62bcf092230a01376aedbf2cd. Reviewed-by: Kenneth Graunke <[email protected]>
* freedreno/a3xx: fix depth/stencil GMEM positioningRob Clark2014-05-211-12/+18
| | | | | | | In cases where there was no color buf bound, there were inconsistancies in register settings related to position of depth/stencil inside GMEM. Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2014-05-214-5/+5
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: use OUT_RELOCW when buffer is writtenRob Clark2014-05-211-4/+4
| | | | | | | These aren't buffers we ever read back from CPU, so using incorrect reloc fxn wasn't really harming anything. But might as well be correct. Signed-off-by: Rob Clark <[email protected]>
* rbug: add missing pipe->blit() entrypointRob Clark2014-05-211-0/+21
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* meta: Use gl_FragColor to output color values to all the draw buffersAnuj Phogat2014-05-211-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _mesa_meta_setup_blit_shader() currently generates a fragment shader which, irrespective of the number of draw buffers, writes the color to only one 'out' variable. Current shader rely on an undefined behavior and possibly works by chance. From OpenGL 4.0 spec, page 256: "If a fragment shader writes to gl_FragColor, DrawBuffers specifies a set of draw buffers into which the single fragment color defined by gl_FragColor is written. If a fragment shader writes to gl_FragData, or a user-defined varying out variable, DrawBuffers specifies a set of draw buffers into which each of the multiple output colors defined by these variables are separately written. If a fragment shader writes to none of gl_FragColor, gl_FragData, nor any user defined varying out variables, the values of the fragment colors following shader execution are undefined, and may differ for each fragment color." OpenGL 4.4 spec, page 463, added an additional line in this section: "If some, but not all user-defined output variables are written, the values of fragment colors corresponding to unwritten variables are similarly undefined." V2: Write color output to gl_FragColor instead of writing to multiple 'out' variables. This'll avoid recompiling the shader every time draw buffers count is updated. Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* meta: Refactor _mesa_meta_setup_blit_shader() to avoid duplicate shader codeAnuj Phogat2014-05-211-53/+48
| | | | | | | Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi: add GS_INVOCATIONS to property names arrayIlia Mirkin2014-05-211-1/+2
| | | | | | | | | | In commit 4be146b1, I neglected to add the new property to the strings array. This leads to the string '(null)' to be printed instead when converting a GS shader to text. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nv50,nvc0: fix 3d blits with mipmap levelsIlia Mirkin2014-05-212-11/+19
| | | | | | | | | | Make sure to normalize the z coordinates as well as the x/y ones when there are mipmaps present. Fixes 3d mipmap generation, which now uses the blit path. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]> Reviewed-by: Ben Skeggs <[email protected]>
* nv50/ir: fix constant folding for OP_MUL subop HIGHIlia Mirkin2014-05-211-4/+43
| | | | | | | | | | | | These instructions can come in either through IMUL_HI/UMUL_HI TGSI opcodes, or from OP_DIV constant folding. Also make sure that the constant foldings which delete the original instruction still get counted as having done something. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.1 10.2" <[email protected]> Reviewed-by: Ben Skeggs <[email protected]>
* nv50/ir: fix s32 x s32 -> high s32 multiply logicIlia Mirkin2014-05-212-11/+82
| | | | | | | | | | | | | | | | | Retrieving the high 32 bits of a signed multiply is rather annoying. It appears that the simplest way to do this is to compute the absolute value of the arguments, and perform a u32 x u32 -> u64 operation. If the arguments' signs differ, then negate the result. Since there is no u64 support in the cvt instruction, we have the perform the 2's complement negation "by hand". This logic can come into use by the IMUL_HI instruction (very unlikely to be seen), as well as from constant folding of division by a constant. Fixes dolphin's divisions by 255. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.1 10.2" <[email protected]> Reviewed-by: Ben Skeggs <[email protected]>
* i965/fs: Assume fragment color clamping is off when precompiling.Kenneth Graunke2014-05-211-2/+0
| | | | | | | | | | | | | | | | | | | | Modern applications frequencly use both UNORM buffers and FLOAT buffers with color clamping disabled. (FLOAT with clamping explicitly enabled and SNORM buffers appear to be less common.) We don't need to emit saturates in the fragment shader in either of the common cases. Mesa sets ctx->Color._ClampFragmentColor to false if all the color buffers are UNORM. Also, for GL_FIXED_ONLY mode (the default in legacy OpenGL), it will be false if any FLOAT buffers are bound. Since the common case is false, that should be our default. Thanks to Roland Scheidegger for pointing out some faulty logic in v1 of this patch (unnecessary code and incorrect explanations). v2: Drop superfluous code and reword commit message. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* egl: Add EGL_CHROMIUM_sync_control extension.Sarah Sharp2014-05-2011-0/+84
| | | | | | | | | | | | | | | | | | | | | Chromium defined a new GL extension (that isn't registered with Khronos). We need to add an EGL extension for it, so we can migrate ChromeOS on Intel systems to use EGL instead of GLX. http://git.chromium.org/gitweb/?p=chromium/src/third_party/khronos.git;a=commitdiff;h=27cbfdab35c601f70aa150581ad1448d0401f447 The EGL_CHROMIUM_sync_control extension is similar to the GLX extension OML_sync_control, but only defines one function, eglGetSyncValuesCHROMIUM, which is equivalent to glXGetSyncValuesOML. http://www.opengl.org/registry/specs/OML/glx_sync_control.txt Signed-off-by: Sarah Sharp <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: Jamey Sharp <[email protected]> Cc: Ian Romanick <[email protected]> Cc: Stéphane Marchesin <[email protected]>
* Import eglextchromium.h from Chromium.Sarah Sharp2014-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | In order to support the (currently unregistered) Chromium-specific EGL extension eglGetSyncValuesCHROMIUM on Intel systems, we need to import the Chromium header that defines it. The file was downloaded from https://chromium.googlesource.com/chromium/chromium/+/trunk/ui/gl/EGL/eglextchromium.h It is subject to the license found at https://chromium.googlesource.com/chromium/chromium/+/trunk/LICENSE I have imported the header file and added the license text to the top. The only change was to fix the include guard on the Chromium header to change the last line from a #define to a #endif, which makes the header actually compile. Signed-off-by: Sarah Sharp <[email protected]> Reviewed-by: Chad Versace <[email protected]> Cc: Jamey Sharp <[email protected]> Cc: Ian Romanick <[email protected]> Cc: Stéphane Marchesin <[email protected]>
* darwin: Fix test for kCGLPFAOpenGLProfile support at runtimeJeremy Huddleston Sequoia2014-05-201-5/+9
| | | | Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
* freedreno: don't advertise texture arrays for nowRob Clark2014-05-201-1/+1
| | | | | | | I think a3xx and later should support (it is part of GLES3), but this isn't needed for the time being and still needs to be reversed. Signed-off-by: Rob Clark <[email protected]>
* glapi: Avoid heap corruption in _glapi_tableJeremy Huddleston Sequoia2014-05-201-1/+1
| | | | | Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* freedreno/a3xx: shadow sampler supportRob Clark2014-05-192-3/+46
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx/compiler: refactor trans_samp()Rob Clark2014-05-191-47/+90
| | | | | | | Split it up into some smaller fxns so it doesn't grow into a huge monster as we add things. Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2014-05-194-4/+10
| | | | Signed-off-by: Rob Clark <[email protected]>
* meta: Avoid _swrast_BlitFramebuffer in the meta CopyTexSubImage code.Kenneth Graunke2014-05-191-6/+6
| | | | | | | | | | | | | | | This is a replacement for bd44ac8b5ca08016bb064b37edaec95eccfdbcd5 that should actually work. Fixes Piglit's copyteximage-border on swrast, as well as one of es3conform's packed_pixels_pixelstore test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78546 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77705 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Cc: "10.2" <[email protected]>
* meta: Split _swrast_BlitFramebuffer out of the meta blit path.Kenneth Graunke2014-05-198-25/+56
| | | | | | | | | | | | | | | | | | Separating the software fallbacks from the rest of the meta path (which is usually hardware accelerated) gives callers better control over their blitting options. For example, i965 might want to try meta blit, hardware blits, then swrast as a last resort. Splitting it makes that possible. This updates all callers to maintain the existing behavior (even in the few cases where it isn't desirable behavior - later patches can change that). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Cc: "10.2" <[email protected]>
* meta: Drop unnecessary early returns in _mesa_meta_BlitFramebuffer.Kenneth Graunke2014-05-191-8/+0
| | | | | | | | | | | These aren't necessary - all of the following code is predicated on mask being non-zero, so no code will get executed anyway. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Cc: "10.2" <[email protected]>
* Revert "i965: Don't _swrast_BlitFramebuffer when doing CopyTexSubImage."Kenneth Graunke2014-05-191-1/+1
| | | | | | | | | | | | | | | | This reverts commit bd44ac8b5ca08016bb064b37edaec95eccfdbcd5. Fixes: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78842 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78843 Re-breaks: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77705 but that will be fixed properly in a few commits. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Cc: "10.2" <[email protected]>
* i965/fbo: Only try stencil meta blits on gen >= 8Topi Pohjolainen2014-05-191-2/+4
| | | | | | | | | I don't have an ILK at hand but the fix should be trivial. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78872 Cc: "10.2" <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-and-tested-by: Kenneth Graunke <[email protected]>
* mesa: Disable GL_EXT_framebuffer_multisample_blit_scaled on Broadwell.Kenneth Graunke2014-05-191-1/+2
| | | | | | | | | It's not properly implemented in the meta code, and we don't have time to fix it for 10.2. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.2" <[email protected]>
* llvmpipe: do IR counting for shader cache management after optimization.Roland Scheidegger2014-05-193-4/+22
| | | | | | | | | | | 2ea923cf571235dfe573c35c3f0d90f632bd86d8 had the side effect of IR counting now being done after IR optimization instead of before. Some quick analysis shows that there's roughly 1.5 times more IR instructions before optimization than after, hence the effective shader cache size got quite a bit smaller. Could counter this with an increase of the instruction limit but it probably makes more sense to count them after optimizations, so move that code. Reviewed-by: Brian Paul <[email protected]>