summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* st/va: added some calls to handle_table_remove()Michael Varga2014-11-193-0/+3
| | | | | | In a few locations handles were being added but not removed. Signed-off-by: Michael Varga <[email protected]>
* i965: Fix segfault in WebGL Conformance on IvybridgeChad Versace2014-11-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes regression of WebGL Conformance test texture-size-limit [1] on Ivybridge Mobile GT2 0x0166 with Google Chrome R38. Regression introduced by commit 6c044231535b93c5d16404528946cad618d96bd9 Author: Kenneth Graunke <[email protected]> Date: Sun Feb 2 02:58:42 2014 -0800 i965: Bump GL_MAX_CUBE_MAP_TEXTURE_SIZE to 8192. The test regressed because the pointer offset arithmetic in intel_miptree_map_gtt() overflows for large textures. The pointer arithmetic is not 64-bit safe. [1] https://github.com/KhronosGroup/WebGL/blob/52f0dc240f04dce31b1b8e2b8107fe2b8332dc90/sdk/tests/conformance/textures/texture-size-limit.html Cc: "10.3 10.4" <[email protected]> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=78770 Fixes: Intel CHRMOS-1377 Reported-by: Lu Hua <[email protected]> Reviewed-by: Ian Romanic <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* mesa/main: Fix tmp_row memory leak in texstore_rgba_integer.Siavash Eliasi2014-11-181-1/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* r600g: limit texture offset application to specific types (v2)Dave Airlie2014-11-191-3/+18
| | | | | | | | | | | | | | | | | | | | | | For 1D and 2D arrays we don't want the other coordinates being offset and affecting where we sample. I wrote this patch 6 months ago but lost it. Fixes: ./bin/tex-miplevel-selection textureLodOffset 1DArray ./bin/tex-miplevel-selection textureLodOffset 2DArray ./bin/tex-miplevel-selection textureOffset 1DArray ./bin/tex-miplevel-selection textureOffset 1DArrayShadow ./bin/tex-miplevel-selection textureOffset 2DArray ./bin/tex-miplevel-selection textureOffset(bias) 1DArray ./bin/tex-miplevel-selection textureOffset(bias) 2DArray v2: rewrite to handle more cases and be consistent with code above. Reviewed-by: Glenn Kennard <[email protected]> Cc: "10.3 10.4" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: geom shaders: always load texture src regs from inputsDave Airlie2014-11-191-1/+2
| | | | | | | | | | | Otherwise we seem to lose the split_gs_inputs and try and pull from an uninitialised register. fixes 9 texelFetch geom shader tests. Reviewed-by: Glenn Kennard <[email protected]> Cc: "10.3 10.4" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vc4: Emit semaphore instructions for new kernel ABI.Eric Anholt2014-11-183-6/+87
| | | | | | | Previously, the kernel would dispatch thread 0, wait, then dispatch thread 1. By insisting that the thread contents use semaphores in the right place, the kernel can sleep for longer by dispatching both threads at once.
* vc4: Mark a big array as const.Eric Anholt2014-11-181-1/+1
| | | | Drops 1kb of code from this inner loop, in exchange for 2.5k of data.
* glsl_compiler: Add binding hash tables to avoid SIGSEVs on linking stageAndres Gomez2014-11-181-0/+10
| | | | | | | | | | When using the stand alone compiler, if we try to link a shader with vertex attributes it will segfault on linking as the binding hash tables are not included in the shader program. Obviously, we cannot make the linking stage succeed without the bound attributes but we can prevent the crash and just let the linker spit its own error. Reviewed-by: Brian Paul <[email protected]>
* linker: Add carriage returns on several linker errorsAndres Gomez2014-11-181-20/+20
| | | | Reviewed-by: Brian Paul <[email protected]>
* draw: Fixed inline commentsAndres Gomez2014-11-182-2/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallivm: fix alignment issue for vertex data fetchRoland Scheidegger2014-11-189-14/+50
| | | | | | | | | | | | | | We cannot guarantee that vertex buffers have the necessary alignment for fetching all AoS members at once (for instance 4x32bit XYZW data). We can however guarantee that for textures. This did not cause errors for older llvm versions but it now matters and will cause segfaults if the data happens to not be aligned. Thus we need to set alignment manually. (Note that we can't actually really guarantee data to be even element aligned due to offsets in vertex buffers being bytes and OpenGL allowing this, but it does not matter for x86 as alignment is only required for sse vectors - not sure what happens on other archs, however.) This fixes https://bugs.freedesktop.org/show_bug.cgi?id=85467.
* radeonsi: support gl_FragCoord at integer pixel centerMarek Olšák2014-11-182-1/+5
| | | | | | No known benefit for OpenGL, but it doesn't hurt. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: support per-sample gl_FragCoordMarek Olšák2014-11-181-12/+13
| | | | | Cc: 10.4 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* st/mesa: add a fallback for clear_with_quad when no vs_layerIlia Mirkin2014-11-174-5/+97
| | | | | | | | | | | | | | | | | Not all drivers can set gl_Layer from VS. Add a fallback that passes the instance id from VS to GS, and then uses the GS to set the layer. Tested by adding quad_buffers |= clear_buffers; clear_buffers = 0; to the st_Clear logic, and forcing set_vertex_shader_layered in all cases. No piglit regressions (on piglits with 'clear' in the name). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: "10.4 10.3" <[email protected]>
* nine: Implement threadpoolAxel Davy2014-11-188-10/+345
| | | | | | | | | | | | | | | DRI_PRIME setups have different issues due the lack of dma-buf fences support in the drivers. For DRI3 DRI_PRIME, a race can appear, making tearings visible, or worse showing older content than expected. Until dma-buf fences are well supported (and by all drivers), an alternative is to send the buffers to the server only when rendering has finished. Since waiting the rendering has finished in the main thread has a performance impact, this patch uses an additional thread to offload the wait and the sending of the buffers to the server. Acked-by: Jose Fonseca <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* nine: Add drirc options (v2)Axel Davy2014-11-184-0/+54
| | | | | | | | | Implements vblank_mode and throttling, which allows us change default ratio between framerate and input lag. Acked-by: Jose Fonseca <[email protected]> Signed-off-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* nine: Add state tracker nine for Direct3D9 (v3)Joakim Sindholt2014-11-1880-0/+28388
| | | | | | | | | | | | | | | | | | | | | | | | | Work of Joakim Sindholt (zhasha) and Christoph Bumiller (chrisbmr). DRI3 port done by Axel Davy (mannerov). v2: - nine_debug.c: klass extended from 32 chars to 96 (for sure) by glennk - Nine improvements by Axel Davy (which also fixed some wine tests) - by Emil Velikov: - convert to static/shared drivers - Sort and cleanup the includes - Use AM_CPPFLAGS for the defines - Add the linker garbage collector - Restrict the exported symbols (think llvm) v3: - small nine fixes - build system improvements by Emil Velikov v4: [Emil Velikov] - Do no link against libudev. No longer needed. Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Axel Davy <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* gallium/auxiliary: add contained and rect checks (v6)Christoph Bumiller2014-11-182-0/+136
| | | | | | | | | | | | | v3: thanks to Brian, improved coding style, also glennk helped spot few things (unsigned -> int, two constify) v4: thanks Ilia improved function, dropped u_box_clip_3d v5: incorporated rest of Gregor proposed changes,clean ups v6: u_box_clip_2d simplify proposed by Ilia Mirkin Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* gallium/auxiliary: add inc and dec alternative with return (v4)Christoph Bumiller2014-11-181-0/+52
| | | | | | | | | | | | | | | At this moment we use only zero or positive values. v2: Implement it for also for Solaris, MSVC assembly and enable for other combinations. v3: Replace MSVC assembly by assert + warning during compilation v4: remove inc and dec with return for MSVC assembly Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* gallium/auxiliary: implement sw_probe_wrapped (v2)Christoph Bumiller2014-11-183-1/+36
| | | | | | | | | | | | | Implement pipe_loader_sw_probe_wrapped which allows to use the wrapped software renderer backend when using the pipe loader. v2: - remove unneeded ifdef - use GALLIUM_PIPE_LOADER_WINSYS_LIBS - check for CALLOC_STRUCT thanks to Emil Velikov Acked-by: Jose Fonseca <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* winsys/sw/wrapper: implement is_displaytarget_format_supported for swrastChristoph Bumiller2014-11-181-0/+14
| | | | | Acked-by: Jose Fonseca <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* tgsi/ureg: add ureg_UARL shortcut (v2)Christoph Bumiller2014-11-181-0/+1
| | | | | | | | v2: moved in in same order as in p_shader_tokens (thanks Brian) Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* r600g/cayman: handle empty vertex shadersDave Airlie2014-11-181-4/+8
| | | | | | | | | | | | | | Some of the geom shader tests produce an empty vertex shader, on cayman we'd crash in the finaliser because last_cf was NULL. cayman doesn't need the NOP workaround, so if the code arrives here with no last_cf, just emit an END. fixes crashes in a bunch of piglit geom shader tests. Cc: "10.3 10.4" <[email protected]> Reviewed-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g/cayman: fix texture gather testsDave Airlie2014-11-181-4/+11
| | | | | | | | | | It appears on cayman the TG4 outputs were reordered. This fixes a lot of piglit tests. Cc: "10.3 10.4" <[email protected]> Reviewed-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: cayman umad assigns dst pointlesslyDave Airlie2014-11-181-1/+1
| | | | | | | | There is no need to assign dst here, just use the chan from j Pointed out by glennk. Signed-off-by: Dave Airlie <[email protected]>
* r600g/cayman: fix integer multiplication output overwrite (v2)Dave Airlie2014-11-181-3/+23
| | | | | | | | | | | This fixes tests/spec/glsl-1.10/execution/fs-op-assign-mult-ivec2-ivec2-overwrite.shader_test. hopeful fix for fd.o bug 85376 Reported-by: ghallberg Cc: "10.3 10.4" <[email protected]> Reviewed-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: copy sampler_array_size field when copying instructionsBrian Paul2014-11-171-1/+6
| | | | | | | | | | | | | | | | | | The sampler_array_size field was added by "mesa/st: add support for dynamic sampler offsets". But the field wasn't getting copied in the get_pixel_transfer_visitor() or get_bitmap_visitor() functions. The count_resources() function then didn't properly compute the glsl_to_tgsi_visitor::samplers_used bitmask. Then, we didn't declare all the sampler registers in st_translate_program(). Finally, we asserted when we tried to emit a tgsi ureg src register with File = TGSI_FILE_UNDEFINED. Add the missing assignments and some new assertions to catch the invalid register sooner. Cc: "10.3, 10.4" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/tests: add missing arg to util_make_vertex_passthrough_shader()Brian Paul2014-11-172-2/+2
| | | | | | | Fix oversights from the "add a window_space option to the passthrough vertex shader" patch. Reviewed-by: Jakob Bornecrantz <[email protected]>
* radeonsi: Disable asynchronous DMA except for PIPE_BUFFERMichel Dänzer2014-11-171-0/+15
| | | | | | | | | | | | | | | | | Using the asynchronous DMA engine for multi-dimensional operations seems to cause random GPU lockups for various people. While the root cause for this might need to be fixed in the kernel, let's disable it for now. Before re-enabling this, please make sure you can hit all newly enabled paths in your testing, preferably with both piglit and real world apps, and get in touch with people on the bug reports below for stability testing. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85647 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83500 Cc: "10.3 10.4" <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Grigori Goronzy <[email protected]>
* draw: Make it more clear that *_jit_context points to pipe_viewport_state ↵José Fonseca2014-11-163-13/+13
| | | | | | structures. No change in behavior.
* draw: Fix breakage due to removal pipe_viewport_state::translate[3] and ↵José Fonseca2014-11-161-2/+6
| | | | | | | | scale[3]. Unfortunately no LLVM type was generated for pipe_viewport_state -- it was being treated as a single floating point array --, so llvmpipe (and any driver that relies on draw/llvm) got totally busted.
* gallium/auxiliary: Fix build without LLVM.José Fonseca2014-11-161-6/+6
| | | | Trivial.
* gallium/auxiliary: Remove GALLIVM_CPP_SOURCESJosé Fonseca2014-11-163-9/+1
| | | | | | Redundant. Should fix ttps://bugs.freedesktop.org/show_bug.cgi?id=86330
* freedreno: add missing headers in Makefile.sourcesEmil Velikov2014-11-161-1/+14
| | | | | | ... or autotools will fail to pick them up for the distribution tarball. Signed-off-by: Emil Velikov <[email protected]>
* targets: bundle all files in the tarballEmil Velikov2014-11-1612-1/+34
| | | | | | | | | We were missing a few files - The version scripts - Android & scons build scripts - A few headers. Signed-off-by: Emil Velikov <[email protected]>
* auxiliary: ship all files in the distribution tarballEmil Velikov2014-11-162-61/+281
| | | | | | | | | | | | | | | | | | - Add all headers into Makefile.sources - Don't forget the target-helpers - Add the python scripts & the formats table/list (csv) - Temporary add vl/vl_winsys_dri.c to EXTRA_DIST until we rework the way VL is build. - Add the following to EXTRA_DIST - they are included via the generated u_indices_gen.c thus we should not add them to *SOURCES. indices/u_indices.c indices/u_unfilled_indices.c XXX: Should we nuke gallivm/f.cpp ? It seems that no-one is using it. v2: Rebase Signed-off-by: Emil Velikov <[email protected]>
* gallium: ship the gallium API headersEmil Velikov2014-11-161-0/+1
| | | | Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: consolidate sources into Makefile.sourcesEmil Velikov2014-11-162-8/+10
| | | | | | Drop the unneeded subdir-objects. Signed-off-by: Emil Velikov <[email protected]>
* dri/kms: Always zero out struct drm_mode_create_dumbThierry Reding2014-11-162-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DRM_IOCTL_MODE_CREATE_DUMB (and others) IOCTL isn't very rigorously specified, which has the effect that some kernel drivers do not consider the .pitch and .size fields of struct drm_mode_create_dumb outputs only. Instead they will use these as lower bounds and overwrite them only if the values that they compute are larger than what userspace provided. This works if and only if userspace initializes the fields explicitly to either 0 or some meaningful value. However, if userspace just leaves the values uninitialized and the struct drm_mode_create_dumb is allocated on the stack for example, the driver may try to overallocate buffers. Fortunately most userspace does zero out the structure before passing it to the IOCTL, but there are rare exceptions. Mesa is one of them. In an attempt to rectify this situation, kernel drivers are being updated to not use the .pitch and .size fields as inputs. However in order to fix the issue with older kernels, make sure that Mesa always zeros out the structure as well. Future IOCTLs should be more rigorously defined so that structures can be validated and IOCTLs rejected if output fields aren't set to zero. Signed-off-by: Thierry Reding <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: remove unused pipe_viewport_state::translate[3] and scale[3]Marek Olšák2014-11-1634-65/+5
| | | | Almost all drivers ignore them.
* radeonsi: implement TGSI_PROPERTY_VS_WINDOW_SPACE_POSITIONMarek Olšák2014-11-163-3/+16
| | | | | | | Required by Nine. Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Nick Sarnie <[email protected]>
* tgsi/ureg: simplify code for declaring propertiesMarek Olšák2014-11-166-194/+43
| | | | Tested-by: Nick Sarnie <[email protected]>
* gallium/util: add a test for TGSI_PROPERTY_VS_WINDOW_SPACE_POSITIONMarek Olšák2014-11-163-0/+308
| | | | | | Not testable by OpenGL. Required by Nine. This is an example of how to implement a piglit-like test using gallium only.
* gallium/util: add a window_space option to the passthrough vertex shaderMarek Olšák2014-11-168-10/+21
| | | | Tested-by: Nick Sarnie <[email protected]>
* tgsi: fixup the string of VS_WINDOW_SPACE_POSITIONMarek Olšák2014-11-161-1/+1
| | | | Tested-by: Nick Sarnie <[email protected]>
* freedreno/a4xx: implement mem->gmem (restore)Rob Clark2014-11-152-3/+199
| | | | | | Support to restore gmem (tile buffer) (in case it wasn't glClear'd). Signed-off-by: Rob Clark <[email protected]>
* freedreno/a4xx: move where SP_FS_MRT_REGn is emittedRob Clark2014-11-152-14/+22
| | | | | | | Addition of color fmt bitfield to this register (compared to a3xx) means we need to re-emit if either prog or framebuffer state is dirty. Signed-off-by: Rob Clark <[email protected]>
* Revert "mesa: Wrap SSE4.1 code in #ifdef __SSE4_1__."Emil Velikov2014-11-151-3/+0
| | | | | | | | | | | | | | | | | This reverts commit 8d3f739383fbdf671752fdec707f1c2b9b2aa6a3. In the last commit we've updated our check to determine if the actual code is buildable, rather than if the compiler acknowledges the option. I.e. did anyone provide -mno-sse4.1 vs is my compiler too old. Now this code will never be attemped to be build, in both cases. Confirmed by building mesa with export CFLAGS='-march=native -mno-sse4.1' ./configure && make Tested-by: David Heidelberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* nv50,nvc0: use clip_halfz setting when creating rasterizer stateIlia Mirkin2014-11-156-3/+10
| | | | | | | This enables the ARB_clip_control extension. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.4" <[email protected]>
* freedreno: add adreno 420 supportRob Clark2014-11-1532-12/+3870
| | | | | | | | Very initial support. Basic stuff working (es2gears, es2tri, and maybe about half of glmark2). Expect broken stuff. Still missing: mem->gmem (restore), queries, mipmaps (blob segfaults!), hw binning, etc. Signed-off-by: Rob Clark <[email protected]>