summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* nv50,nvc0: fix start_instance in manual push pathIlia Mirkin2016-06-212-10/+22
| | | | | | | | | | The start instance is applied as an offset into the buffer directly, ignoring the divisor, not as an instance id offset that respects the divisor. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 12.0" <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* translate: fix start_instance parameter in sse versionIlia Mirkin2016-06-211-7/+7
| | | | | | | | | The generic version gets this right already, but this was using an incorrect formula in SSE. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 12.0" <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: add a debug flag for unsafe math LLVM optimizationsMarek Olšák2016-06-213-0/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: use u_blitter for mipmap generationMarek Olšák2016-06-212-1/+32
| | | | | | | | This reduces time spend in glGenerateMipmap by a half. v2: don't decompress the levels to be overwritten Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_blitter: implement mipmap generationMarek Olšák2016-06-212-114/+238
| | | | | | | | | for pipe_context::generate_mipmap first move some of the blit code from util_blitter_blit_generic to a separate function, then use it from util_blitter_generate_mipmap Reviewed-by: Nicolai Hähnle <[email protected]>
* clover: Fix build against clang SVN >= r273191Vedran Miletić2016-06-211-1/+1
| | | | | | setLangDefaults() now requires PreprocessorOptions as an argument. Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
* gallium: make image_view constRob Clark2016-06-207-10/+10
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: make constant_buffer constRob Clark2016-06-2021-24/+23
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: make shader_buffers constRob Clark2016-06-206-9/+9
| | | | | | | Be consistent with the rest of the "set_xyz" state interfaces. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: use trapezoid distribution for tess on Fiji and PolarisNicolai Hähnle2016-06-202-8/+24
| | | | | | | This yields a small performance improvement in Unigine Heaven. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi/sid: add Fiji+ tesselation distribution modeNicolai Hähnle2016-06-201-3/+7
| | | | | Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: emit PA_SC_RASTER_CONFIG_1 only onceNicolai Hähnle2016-06-201-16/+17
| | | | | | | It is the same for all SEs. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix calculation of valid RB mask per SENicolai Hähnle2016-06-201-4/+9
| | | | | | | | The old calculation treated too many RBs as disabled. Cc: 11.0 11.1 11.2 12.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: raise SI_PM4_MAX_DWNicolai Hähnle2016-06-201-1/+1
| | | | | | | | | The old limit, introduced in commit afa752d3f03ac6697581ff5d324e8ac0512ef513, was exceeded by 4 SE configurations which hit si_write_harvested_raster_configs. Cc: 11.1 11.2 12.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm: don't use integer min/max sse intrinsics with llvm >= 3.9Roland Scheidegger2016-06-201-2/+4
| | | | | | | | | | | | | | | | | | | Apparently, these are deprecated. There's some AutoUpgrade feature which is supposed to promote these to cmp/select, which apparently doesn't work with jit code. It is possible it's not actually even meant to work (see the bug filed against llvm which couldn't provide an answer neither) but in any case this is meant to be only temporary unless the intrinsics are really illegal. So, just use the fallback code (which should be cmp/select, we're actually doing cmp/sext/trunc/select, but in any case llvm 3.9 manages to optimize this back to pmin/pmax in the end). This addresses https://llvm.org/bugs/show_bug.cgi?id=28176 CC: <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Tested-by: Vinson Lee <[email protected]> Tested-by: Aaron Watry <[email protected]>
* nvc0: don't make use of push hint if there are no non-const user vbosIlia Mirkin2016-06-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | This makes the check match up what we do on nv50 as well - there's no point in switching over the push path if everything's in managed buffers. This can happen when a shader uses a vertex without an enabled array - we end up passing it a constant attribute. This also has the effect of "fixing" some flickering in Talos. I have no idea why. I've stared at the push logic forwards, backwards, and sideways. By always forcing the push path (which is slow), the flickering also goes away, but other rendering is still wrong (specifically draw 383068 as identified in the bug). However by not switching over to the push path, draw 383068 is correct. Note that other flickering remains in Talos, like the red/green walls/floors. This takes care of the shadow flickering though. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90513 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "12.0" <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* gk104/ir: fix tex use generation to be more careful about eliding usesIlia Mirkin2016-06-192-12/+27
| | | | | | | | | | | | | If we have a loop, instructions before the tex might be added as tex uses, and those may in fact dominate all other uses of the tex results. This however doesn't mean that we don't need a texbar after the tex. Only check if uses dominate each other they are dominated by the tex. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96565 Fixes: 7752bbc44 (gk104/ir: simplify and fool-proof texbar algorithm) Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 12.0" <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* nv50: add support for GL_EXT_window_rectanglesIlia Mirkin2016-06-187-5/+74
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: add support for GL_EXT_window_rectanglesIlia Mirkin2016-06-187-5/+72
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium: add PIPE_CAP_MAX_WINDOW_RECTANGLES to all driversIlia Mirkin2016-06-1817-0/+18
| | | | | | | | This says how many window rectangles are supported by the implementation, although it may not exceed PIPE_MAX_WINDOW_RECTANGLES. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add API for setting window rectanglesIlia Mirkin2016-06-183-3/+25
| | | | | | | | | | | | | | | | | | Window rectangles apply to all framebuffer operations, either in inclusive or exclusive mode. They may also be specified as part of a blit operation. In exclusive mode, any fragment inside any of the specified rectangles will be discarded. In inclusive mode, any fragment outside every rectangle will be discarded. The no-op state is to have 0 rectangles in exclusive mode. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* nv50/ir: add missing strings for some recent sysvalsSamuel Pitoiset2016-06-181-0/+3
| | | | | | | | | This is pretty useful for debugging purposes and those should not be omitted. Fixes: 517a93b3 ("nvc0: add ARB_shader_draw_parameters support") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* swr: Update screen->context pointer with multiple contexts.Bruce Cherniak2016-06-172-3/+7
| | | | | | | | | A pipe pointer in the screen allows for access to current device context in flush_frontbuffer and resource_destroy. This wasn't tracking current context in multi-context situations. v2: More caffeine. Corrected compare, removed unnecessary set of screen-pipe in create_context, and added a few comments.
* swr: switch from overriding -march to selecting featuresTim Rowley2016-06-171-2/+2
| | | | | Acked-by: Chuck Atkins <[email protected]> Tested-by: Chuck Atkins <[email protected]>
* st/vdpau: we support lumakeying nowChristian König2016-06-161-0/+1
| | | | Signed-off-by: Christian König <[email protected]>
* vl: support luma keying for interlaced surfaces as wellChristian König2016-06-161-35/+41
| | | | | | We had the CSC code twice in there, factor it out into a separate function. Signed-off-by: Christian König <[email protected]>
* auxilary/os: allow appending to GALLIUM_LOG_FILEBrian Paul2016-06-151-2/+13
| | | | | | | | | | If the log file specified by the GALLIUM_LOG_FILE begins with '+', open the file in append mode. This is useful to log all gallium output for an entire piglit run, for example. v2: put GALLIUM_LOG_FILE support inside an #ifdef DEBUG block. Reviewed-by: Jose Fonseca <[email protected]>
* vc4: fix vc4_resource_from_handle() stride calculationRob Herring2016-06-151-2/+2
| | | | | | | | | | | | | | The expected stride calculation is completely wrong. It should ultimately be multiplying cpp and width rather than dividing. The width also needs to be aligned to the tiling width first before converting to stride bytes. The whole stride check here is possibly pointless. Any buffers which were allocated outside of vc4 may have strides with larger alignment requirements. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* winsys/radeon: use the common job queue for multithreaded command submission v2Marek Olšák2016-06-154-82/+19
| | | | | | v2: fixup after renaming to util_queue_fence Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: import the multithreaded job queue from amdgpu winsys (v2)Marek Olšák2016-06-157-83/+229
| | | | | | v2: rename the event to util_queue_fence Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: fix undefined left-shift into sign bitNicolai Hähnle2016-06-151-1/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: num-cs-flushes query should display per-frame averageMarek Olšák2016-06-141-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add driver queries for compute/dma call stats and spillsMarek Olšák2016-06-146-1/+45
| | | | | | also print the average count per frame Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't generate "ret void undef"Marek Olšák2016-06-141-6/+14
| | | | | | | Use LLVMBuildRetVoid in epilogs and the GS copy shader and si_llvm_build_ret otherwise. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi: try to hit direct hw MSAA resolve by changing micro mode in clearMarek Olšák2016-06-143-1/+107
| | | | | | | | | We could also do MSAA resolve in a compute shader like Vulkan and remove these workarounds. v2: comment the magic numbers Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: clarify the MSAA resolve limitation with scanoutMarek Olšák2016-06-141-1/+5
| | | | | | this is the correct hw requirement Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add micro_tile_mode to radeon_surfMarek Olšák2016-06-143-3/+43
| | | | | | for easier access Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: don't use blocksize for minify for assertionsRoland Scheidegger2016-06-141-20/+8
| | | | | | | | | | | | | | | | The previous assertions required for texture sizes smaller than block_size that src_box.x + src_box.width still be block size. (e.g. for a texture with width 3, and src_box.x = 0, src_box.width would have to be 4 to not assert.) This caused some assertions with some other state tracker. It looks though like callers aren't expected to round up widths to block sizes (for sizes larger than block size the assertion would still have verified it wouldn't have been rounded up) so we simply shouldn't use a minify which rounds up to block size. (No piglit change with llvmpipe.) Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: hack-fix bugs due to bogus bind flagsRoland Scheidegger2016-06-146-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | The gallium contract would be that bind flags must indicate all possible bindings a resource might get used, but fact is the mesa state tracker does not set bind flags correctly, and this is more or less unfixable due to GL. This caused a bug with piglit arb_uniform_buffer_object-rendering-dsa since 6e6fd911da8a1d9cd62fe0a8a4cc0fb7bdccfe02 - the commit is correct, but it caused us to miss updates to fs UBOs completely, since the corresponding buffer didn't have the appropriate bind flag set (thus we wouldn't check if it is indeed currently bound). See the discussion about this starting here: https://lists.freedesktop.org/archives/mesa-dev/2016-June/119829.html So, update the bind flags when we detect such usage. Note we update this value for now only in places which matter for us - that is creating sampler/surface view, or binding constant buffer. There's plenty more places (setting streamout buffers, vertex/index buffers, ...) where things can be set with the wrong bind flags, but the bind flags there never matter. While here also make sure we only set dirty constant bit when it's a fs constant buffer - totally doesn't matter if it's vs/gs. Reviewed-by: Jose Fonseca <[email protected]>
* freedreno: support start param for sampler views/statesRob Clark2016-06-142-33/+23
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: only do extra vertex-buffer state logic on a2xxRob Clark2016-06-141-8/+10
| | | | | | | Possibly this should move into an fd2 wrapper fxn, similar to the texture state tracking done for fd3/fd4 (clamp emulation, etc) Signed-off-by: Rob Clark <[email protected]>
* freedreno: use util_copy_constant_buffer() helperRob Clark2016-06-141-6/+2
| | | | Signed-off-by: Rob Clark <[email protected]>
* st/vdpau: replace 0.f and 1.f with 0.0f and 1.0f respectivelyNayan Deshmukh2016-06-142-8/+8
| | | | | Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/dri: Clear drawable texture_mask in dri2_invalidate_drawableMichel Dänzer2016-06-141-0/+1
| | | | | | | | | | | | This makes sure that dri_set_tex_buffer2 -> dri_drawable_validate_att will re-create the front left attachment buffer after the drawable got invalidated. Fixes window contents not updating until the window is resized when using DRI2 PRIME. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/va: ensure linear memory for dmabufJulien Isorce2016-06-143-1/+10
| | | | | | | | | | | | | | | | In order to do zero-copy between two different devices the memory should not be tiled. Tested with GStreamer on a laptop that has 2 GPUs: 1- gstvaapidecode: HW decoding and dmabuf export with nouveau driver on Nvidia GPU. 2- glimagesink: EGLImage imports dmabuf on Intel GPU. TEST: DRI_PRIME=1 gst-launch vaapidecodebin ! glimagesink Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Christian König <[email protected]>
* mesa/gallium: Move u_bit_scan{,64} from gallium to util.Mathias Fröhlich2016-06-141-148/+1
| | | | | | | | | | | | | | | The functions are also useful for mesa. Introduce src/util/bitscan.{h,c}. Move ffs function implementations from src/mesa/main/imports.{h,c}. Move bit scan related functions from src/gallium/auxiliary/util/u_math.h. Merge platform handling with what is available from within mesa. v2: Try to fix MSVC compile. Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* clover: Include generated sources in AM_CPPFLAGSAaron Watry2016-06-141-0/+1
| | | | | | | | | | git_sha1.c is generated in $(top_builddir)/src. Fixes out-of-tree builds since 4825264f75c83576. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96516 Signed-off-by: Aaron Watry <[email protected]> Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
* nv50/ir: make Graph destructor virtualStephan Bergmann2016-06-131-1/+1
| | | | | | | | Avoid ASan new-delete-type-mismatch when Function::domTree is created as DominatorTree in Function::convertToSSA but destroyed only as base Graph in ~Function. Reviewed-by: Ilia Mirkin <[email protected]>
* clover: Update OpenCL version string to match OpenGLVedran Miletić2016-06-132-2/+6
| | | | | | | | | | | | | Change MESA into Mesa in CL_PLATFORM_VERSION and CL_DEVICE_VERSION. For both, always append git version suffix from git_sha1.h. v5: move semicolon to same line as MESA_GIT_SHA1. v4: drop #ifdef guards. v3: add missing include. v2: change CL_DEVICE_VERSION as well. Cc: <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* util: update some assertions in util_resource_copy_region()Brian Paul2016-06-131-4/+8
| | | | | | | | To cope with copies of compressed images which are not multiples of the block size. Suggested by Jose. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <sroland@[email protected]>