summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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-172-0/+76
| | | | | | | | | | | | | | | | | 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-187-10/+340
| | | | | | | | | | | | | | | 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-183-0/+41
| | | | | | | | | 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]>
* 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-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1629-55/+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-163-177/+13
| | | | 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-165-7/+16
| | | | 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]>
* 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]>
* freedreno: update generated headersRob Clark2014-11-156-66/+2274
| | | | Signed-off-by: Rob Clark <[email protected]>
* st/wgl: Implement WGL_EXT_create_context_es/es2_profile.José Fonseca2014-11-143-63/+78
| | | | | | | | Derived from st/glx's GLX_EXT_create_context_es/es2_profile implementation. Tested with an OpenGL ES 2.0 ApiTrace. Reviewed-by: Brian Paul <[email protected]>
* st/xlib: Generate errors as specified.José Fonseca2014-11-141-16/+109
| | | | | | Tested with piglit glx tests. Reviewed-by: Brian Paul <[email protected]>
* freedreno/ir3: move some helpersRob Clark2014-11-142-65/+71
| | | | | | | Split out a few helpers from fd3_program so we don't have to duplicate for fd4_program. Signed-off-by: Rob Clark <[email protected]>
* freedreno: rename draw->draw_vboRob Clark2014-11-144-6/+6
| | | | | | | Gets rid of a namespace conflict w/ a4xx which wants an fd4_draw() version of fd_draw().. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: missing u_upload_destroyRob Clark2014-11-141-0/+2
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix borked check for a320.0Rob Clark2014-11-141-1/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: half vs full reg in standalone compiler outputRob Clark2014-11-141-6/+10
| | | | | | Handle hrN.c in printing outputs/inputs. Signed-off-by: Rob Clark <[email protected]>
* st/dri: Support EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR/GLX_CONTEXT_DEBUG_BIT_ARB ↵José Fonseca2014-11-141-3/+3
| | | | | | | | | | | | | on ES contexts. The latest version of the specs explicitly allow it, and given that Mesa universally supports KHR_debug we should definitely support it. Totally untested. (Just happened to noticed this while implementing GLX_EXT_create_context_es2_profile for st/xlib.) Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* configure.ac: remove enable flags for EGL and GBM Gallium state trackersMarek Olšák2014-11-141-8/+0
| | | | | | Acked-by: Kristian Høgsberg <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Informally acked-by: Jose Fonseca