summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* gallium/hud: round max_value to print nicely rounded numbers next to graphsMarek Olšák2016-08-223-4/+80
| | | | | | This improves readability a lot. Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: generalize code for drawing numbers next to graphsMarek Olšák2016-08-221-5/+8
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: draw numbers with 3 decimal places if those aren't 0Marek Olšák2016-08-221-5/+12
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: use sRGB for nicer AA linesMarek Olšák2016-08-221-0/+21
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: use AA lines for graphsMarek Olšák2016-08-221-1/+5
| | | | | | this looks a lot better (with the next patch) Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: don't enable blending for all objectsMarek Olšák2016-08-221-2/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* ttn: Use nir_load_front_face instead of the TGSI-style input.Eric Anholt2016-08-191-3/+27
| | | | | | | This reduces the diff between GLSL-to-NIR and TGSI-to-NIR, and gives NIR more optimization to work on. Reviewed-by: Kenneth Graunke <[email protected]>
* ttn: Make FRAG_RESULT_DEPTH be a float variable to match gtn and ptn.Eric Anholt2016-08-191-3/+16
| | | | | | | This lets TTN-using drivers handle FRAG_RESULT_DEPTH the same between all their source paths. Reviewed-by: Rob Clark <[email protected]>
* gallium: change pipe_image_view::first_element/last_element -> offset/sizeMarek Olšák2016-08-171-2/+2
| | | | | | | | | This is required by OpenGL. Our hardware supports this. Example: Bind RGBA32F with offset = 4 bytes. Acked-by: Ilia Mirkin <[email protected]> Acked-by: Nicolai Hähnle <[email protected]>
* gallium: change pipe_sampler_view::first_element/last_element -> offset/sizeMarek Olšák2016-08-171-2/+2
| | | | | | | | | | | This is required by OpenGL. Our hardware supports this. Example: Bind RGBA32F with offset = 4 bytes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97305 Acked-by: Ilia Mirkin <[email protected]> Acked-by: Nicolai Hähnle <[email protected]>
* gallivm: add lp_build_alloca_undefNicolai Hähnle2016-08-172-0/+24
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm: add create_builder_at_entry helper functionNicolai Hähnle2016-08-171-23/+22
| | | | | | | Reduces code duplication. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: add tgsi_scan_arraysNicolai Hähnle2016-08-172-0/+93
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: remove unused u_clear.h fileBrian Paul2016-08-162-65/+0
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: minor reformatting in u_box.hBrian Paul2016-08-161-29/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_blitter: split out a helper for common clear stateRob Clark2016-08-162-13/+30
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_blitter: add helper to save FS const buffer stateRob Clark2016-08-162-0/+25
| | | | | | | | | Not (currently) state that is overwridden by u_blitter itself, but drivers with custom blit/clear which are reusing part of the u_blitter infrastructure will use it. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_blitter: export some functionsRob Clark2016-08-162-70/+84
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: add helper to compute zmin/zmax for a viewport stateIlia Mirkin2016-08-142-1/+61
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Cc: "11.2 12.0" <[email protected]>
* vl/rbsp: add a check for emulation prevention three byteLeo Liu2016-08-101-2/+12
| | | | | | | | | | This is the case when the "00 00 03" is very close to the beginning of nal unit header v2: move the check to rbsp init Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium: add render_condition_enable param to clear_render_target/depth_stencilMarek Olšák2016-08-103-4/+5
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: Add c99_compat.h to u_bitcast.hMathias Fröhlich2016-08-091-0/+2
| | | | | | | | We need this for 'inline'. Signed-off-by: Mathias Fröhlich <[email protected]> Tested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* util: Move _mesa_fsl/util_last_bit into util/bitscan.hMathias Fröhlich2016-08-091-64/+0
| | | | | | | | | | | As requested with the initial creation of util/bitscan.h now move other bitscan related functions into util. v2: Split into two patches. Signed-off-by: Mathias Fröhlich <[email protected]> Tested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* util: Move format_r11g11b10f.h to src/utilJason Ekstrand2016-08-053-234/+1
| | | | | | | It's used from both mesa main and gallium. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Move format_rgb9e5.h to src/utilJason Ekstrand2016-08-054-164/+2
| | | | | | | It's used from both mesa main and gallium. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* vl/dri3: Destroy Present event context when destroying drawable v2Michel Dänzer2016-08-041-5/+16
| | | | | | | | | | | Without this, the X server may accumulate stale Present event contexts if a client performs several video decoding sessions using the same window. v2: Based on Chris Wilson's review: * Use xcb_discard_reply() instead of free(xcb_request_check()) Reviewed-and-Tested-by: Leo Liu <[email protected]>
* gallium/util: fix align64Marek Olšák2016-08-011-1/+1
| | | | | | | | it cut off the upper 32 bits Cc: [email protected] Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* draw: Avoid aliasing violations.Matt Turner2016-08-012-3/+6
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/auxiliary: Add u_bitcast.h header.Matt Turner2016-08-012-0/+58
| | | | Reviewed-by: Marek Olšák <[email protected]>
* auxiliary/os: add new os_get_command_line() functionBrian Paul2016-08-012-0/+52
| | | | | | | | | | | This can be used by the driver to get the command line which started the process. Will be used by the VMware driver for extra logging. For now, this is only implemented for Linux via /proc/self/cmdline and Windows via GetCommandLine(). Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* u_vbuf: fix potentially bogus assertRob Clark2016-08-011-2/+4
| | | | | | | | | | | | | | | There are cases where we hit u_vbuf path due to alignment or pitch- alignment restrictions, but for an output-format that u_vbuf does not support translating (yet the driver does support natively). In which case we hit the memcpy() path and don't care that u_vbuf doesn't understand it. Fixes crash with debug build of mesa in: dEQP-GLES3.functional.vertex_arrays.single_attribute.strides.fixed.user_ptr_stride17_components2_quads1 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95000 Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Revert "gallium/util: fix resource leak"Roland Scheidegger2016-07-301-2/+0
| | | | | | This reverts commit d1fe26a62862f4e47a799222dca1bc1dc14ca4af. Replacing a resource leak with a segfault isn't the solution.
* gallium/util: fix resource leakEric Engestrom2016-07-301-0/+2
| | | | | | | CovID: 401540 Signed-off-by: Eric Engestrom <[email protected]> Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* os: add pipe_mutex_assert_locked()Rob Clark2016-07-301-0/+16
| | | | | | | Would be nice if we could also have lockdep, like in the linux kernel. But this is better than nothing. Signed-off-by: Rob Clark <[email protected]>
* ttn: Update shader->info as we generate code.Eric Anholt2016-07-261-0/+13
| | | | | | | We could use the nir_shader_gather_info() pass to update it after the fact, but this is what glsl_to_nir and prog_to_nir do. Reviewed-by: Rob Clark <[email protected]>
* vl/util: add copy func for yv12image to nv12surface v2Boyuan Zhang2016-07-251-0/+37
| | | | | | | | | | | | Add function to copy from yv12 image to nv12 surface for VAAPI putimage call. We need this function in VaPutImage call where copying from yv12 image to nv12 surface for encoding. Existing function can't be used because it only work for copying from yv12 surface to nv12 image in Vaapi. v2: cleanup variable types and commit message Signed-off-by: Boyuan Zhang <[email protected]> Signed-off-by: Christian König <[email protected]>
* gallium/util: don't modify usage in pipe_buffer_writeMarek Olšák2016-07-231-9/+2
| | | | | | All drivers were already doing it except virgl. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: split transfer_inline_write into buffer and texture callbacksMarek Olšák2016-07-234-119/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | to reduce the call indirections with u_resource_vtbl. The worst call tree you could get was: - u_transfer_inline_write_vtbl - u_default_transfer_inline_write - u_transfer_map_vtbl - driver_transfer_map - u_transfer_unmap_vtbl - driver_transfer_unmap That's 6 indirect calls. Some drivers only had 5. The goal is to have 1 indirect call for drivers that care. The resource type can be determined statically at most call sites. The new interface is: pipe_context::buffer_subdata(ctx, resource, usage, offset, size, data) pipe_context::texture_subdata(ctx, resource, level, usage, box, data, stride, layer_stride) v2: fix whitespace, correct ilo's behavior Reviewed-by: Nicolai Hähnle <[email protected]> Acked-by: Roland Scheidegger <[email protected]>
* gallium/os: use CLOCK_MONOTONIC for sleeps (v2)Marek Olšák2016-07-222-6/+14
| | | | | | v2: handle EINTR, remove backslashes Reviewed-by: Eric Engestrom <[email protected]>
* gallium/pb_cache: reduce the number of pointer dereferencesMarek Olšák2016-07-191-7/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/pb_cache: divide the cache into buckets for reducing cache missesMarek Olšák2016-07-193-22/+43
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/pb_cache: check parameters that are more likely to fail firstMarek Olšák2016-07-191-8/+7
| | | | | | This makes Bioshock Infinite with deferred flushing 2% faster. Reviewed-by: Nicolai Hähnle <[email protected]>
* vl: fix memory leakEric Engestrom2016-07-191-7/+1
| | | | | | | CovID: 1363008 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/dri3: fix a memory leak from front bufferLeo Liu2016-07-181-0/+1
| | | | | | | | | | | | | | | | | Inspired by fix for mem leak of vdpau interop, resource_from_handle set texture reference count, that need to be decreased and released, recall there is a similar case for DRI3, that is with VA-API glx extension, there is temporary TFP(texture from pixmap), we target it through dma-buf. leak happens when without count down the reference. Checked and found with mpv vo=opengl case, there only one static TFP, the leak happens once, but for totem player using gstreamer VA-API glx, the dynamic TFP for each frame, so leak quite a bit. This fixes mem leak for mpv and totem. Signed-off-by: Leo Liu <[email protected]> Cc: "12.0" <[email protected]>
* compiler: Rename INTERP_QUALIFIER_* to INTERP_MODE_*.Kenneth Graunke2016-07-171-3/+3
| | | | | | | | | | | | | | | | | Likewise, rename the enum type to glsl_interp_mode. Beyond the GLSL front-end, talking about "interpolation modes" seems more natural than "interpolation qualifiers" - in the IR, we're removed from how exactly the source language specifies how to interpolate an input. Also, SPIR-V calls these "decorations" rather than "qualifiers". Generated by: $ find . -regextype egrep -regex '.*\.(c|cpp|h)' -type f -exec sed -i \ -e 's/INTERP_QUALIFIER_/INTERP_MODE_/g' \ -e 's/glsl_interp_qualifier/glsl_interp_mode/g' {} \; Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Dave Airlie <[email protected]>
* gallium/u_queue: add optional cleanup callbackRob Clark2016-07-162-2/+10
| | | | | | | | | | | | Adds a second optional cleanup callback, called after the fence is signaled. This is needed if, for example, the queue has the last reference to the object that embeds the util_queue_fence. In this case we cannot drop the ref in the main callback, since that would result in the fence being destroyed before it is signaled. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* Use correct names for dlopen()ed files on CygwinYaakov Selkowitz2016-07-151-0/+2
| | | | | Signed-off-by: Yaakov Selkowitz <[email protected]> Reviewed-by: Jon Turney <[email protected]>
* gallivm: add helper lp_add_attr_dereferenceableMarek Olšák2016-07-132-0/+14
| | | | | | | | | Not sure if this is the right way to do it, but it seems to work. v2: make it a no-op on LLVM <= 3.5 Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* vl/compositor: set layer of y or uv to renderLeo Liu2016-07-122-0/+42
| | | | | | Signed-off-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]> Tested-by: Julien Isorce <[email protected]>
* vl/compositor: add weave to yuv shaderLeo Liu2016-07-122-0/+43
| | | | | | | | This shader will make interlaced yuv to progressive yuv. Signed-off-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]> Tested-by: Julien Isorce <[email protected]>