summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nvc0: use PRIxPTR for sizeof()Christoph Bumiller2014-05-231-1/+1
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv50,nvc0: allow 15,16,30 bpp display formatsChristoph Bumiller2014-05-231-4/+4
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv50,nvc0: handle guard band definesChristoph Bumiller2014-05-232-4/+16
| | | | | [imirkin: moved default case out of switch] Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv50/ir/tgsi: optimize KILChristoph Bumiller2014-05-231-0/+5
| | | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* nv50/ir: fix lowering of predicated instructions (without defs)Christoph Bumiller2014-05-231-1/+4
| | | | | | | | Note that predicated instructions with defs are still not supported because transformation to SSA doesn't handle them yet. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* nv50/ir/opt: fix constant folding with saturate modifierChristoph Bumiller2014-05-231-1/+3
| | | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* nv50/ir/tgsi: TGSI_OPCODE_POW replicates its resultChristoph Bumiller2014-05-231-1/+5
| | | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* nv50,nvc0: set constbufs dirty on pipe context switchChristoph Bumiller2014-05-232-0/+5
| | | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* nv50: setup scissors on clear_render_target/depth_stencilChristoph Bumiller2014-05-231-2/+18
| | | | | | [imirkin: add logic to also clear the "regular" scissors] Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* nv50,nvc0: always pull out bufctx on context destructionChristoph Bumiller2014-05-232-9/+7
| | | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* i965: Properly return *RESET* status in glGetGraphicsResetStatusARBPavel Popov2014-05-231-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glGetGraphicsResetStatusARB from ARB_robustness extension always returns GUILTY_CONTEXT_RESET_ARB and never returns NO_ERROR for guilty context with LOSE_CONTEXT_ON_RESET_ARB strategy. This is because Mesa returns GUILTY_CONTEXT_RESET_ARB if batch_active !=0 whereas kernel driver never reset batch_active and this variable always > 0 for guilty context. The same behaviour also can be observed for batch_pending and INNOCENT_CONTEXT_RESET_ARB. But ARB_robustness spec says: If a reset status other than NO_ERROR is returned and subsequent calls return NO_ERROR, the context reset was encountered and completed. If a reset status is repeatedly returned, the context may be in the process of resetting. 8. How should the application react to a reset context event? RESOLVED: For this extension, the application is expected to query the reset status until NO_ERROR is returned. If a reset is encountered, at least one *RESET* status will be returned. Once NO_ERROR is encountered, the application can safely destroy the old context and create a new one. The main problem is the context may be in the process of resetting and in this case a reset status should be repeatedly returned. But looks like the kernel driver returns nonzero active/pending only if the context reset has already been encountered and completed. For this reason the *RESET* status cannot be repeatedly returned and should be returned only once. The reset_count and brw->reset_count variables can be used to control that glGetGraphicsResetStatusARB returns *RESET* status only once for each context. Note the i915 triggers reset_count twice which allows to return correct reset count immediately after active/pending have been incremented. v2 (idr): Trivial reformatting of comments. Signed-off-by: Pavel Popov <pavel.e.popov@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
* appleglx: Improve error reporting if CGLChoosePixelFormat() didn't find any ↵Jon TURNEY2014-05-231-0/+5
| | | | | | | matching pixel formats. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* Fix build of appleglxJon TURNEY2014-05-2321-291/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define GLX_USE_APPLEGL, as config/darwin used to, to turn on specific code to use the applegl direct renderer Convert src/glx/apple/Makefile to automake Since the applegl libGL is now built by linking libappleglx into libGL, rather than by linking selected files into a special libGL: - Remove duplicate code in apple/glxreply.c and apple/apple_glx.c. This makes apple/glxreply.c empty, so remove it - Some indirect rendering code is already guarded by !GLX_USE_APPLEGL, but we need to add those guards to indirect_glx.c, indirect_init.c (via it's generator), render2.c and vertarr.c so they don't generate anything Fix and update various includes glapi_gentable.c (which is only used on darwin), should be included in shared glapi as well, to provide _glapi_create_table_from_handle() Note that neither swrast nor indirect is supported in the APPLEGL path at the moment, which makes things more complex than they need to be. More untangling is needed to allow that v2: Correct apple/Makefile.am for srcdir != builddir Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* Make DRI dependencies and build depend on the targetJon TURNEY2014-05-2312-25/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't require xcb-dri[23] etc. if we aren't building for a target with DRM, as we won't be using dri[23] - Enable a more fine-grained control of what DRI code is built, so that a libGL using direct swrast can be built on targets which don't have DRM. The HAVE_DRI automake conditional is retired in favour of a number of other conditionals: HAVE_DRI2 enables building of code using the DRI2 interface (and possibly DRI3 with HAVE_DRI3) HAVE_DRISW enables building of DRI swrast HAVE_DRICOMMON enables building of target-independent DRI code, and also enables some makefile cases where a more detailled decision is made at a lower level. HAVE_APPLEDRI enables building of an Apple-specific direct rendering interface, still which requires additional fixing up to build properly. v2: Place xfont.c and drisw_glx.c into correct categories. Update 'make check' as well Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* 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 <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* targets/egl-static: add missing line break in ldflagsEmil Velikov2014-05-231-1/+1
| | | | | | | | Accidently omitted by commit 7b7944ee1cedeaf. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* 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 <brianp@vmware.com> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
* 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 <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* 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 <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* 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 <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: "10.2" <mesa-stable@lists.freedesktop.org>
* 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 <imirkin@alum.mit.edu>
* 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 <mattst88@gmail.com>
* 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 <mattst88@gmail.com>
* 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 <mattst88@gmail.com>
* 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 <mattst88@gmail.com>
* 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 <brianp@vmware.com>
* 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 <robclark@freedesktop.org>
* 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 <t_arceri@yahoo.com.au> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <robclark@freedesktop.org>
* 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 <kenneth@whitecape.org>
* 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 <robclark@freedesktop.org>
* freedreno: update generated headersRob Clark2014-05-214-5/+5
| | | | Signed-off-by: Rob Clark <robclark@freedesktop.org>
* 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 <robclark@freedesktop.org>
* rbug: add missing pipe->blit() entrypointRob Clark2014-05-211-0/+21
| | | | | Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* 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: <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* meta: Refactor _mesa_meta_setup_blit_shader() to avoid duplicate shader codeAnuj Phogat2014-05-211-53/+48
| | | | | | | Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* 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 <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* 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 <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
* 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 <imirkin@alum.mit.edu> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
* 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 <imirkin@alum.mit.edu> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
* 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 <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* 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 <sarah.a.sharp@linux.intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: Jamey Sharp <jamey@minilop.net> Cc: Ian Romanick <idr@freedesktop.org> Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>