summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
...
* Gallium: Add format PIPE_FORMAT_R8_SRGBGert Wollny2018-11-023-0/+9
| | | | | | | | | | | | | | | | | | | | | | | This format is needed to support EXT_texture_sRGB_R8. THe patch adds a new format enum, the format entries in Gallium and and svga, the mapping between sRGB and linear formats, and tests. v2: - add mapping to linear format for PIPE_FORMATR_R8_SRGB v3: - Add texture format to svga format table since otherwise building mesa will fail when this driver is enabled. It was not tested whether the extension actually works. v4: - svga: remove the SVGA specific format definitions and table entries and only add correct the location of PIPE_FORMAT_R8_SRGB in the format_conversion_table (Ilia Mirkin) - Split patch (1/2) to separate Gallium part and mesa/st part. (Roland Scheidegger) - Trim the commit message to only contain the relevant parts from the split. v5: - svga: correct location of PIPE_FORMAT_SRGB_R8 (Ilia Mirkin) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* configure: allow building with python3Emil Velikov2018-10-311-1/+1
| | | | | | | | | | | | | | | Pretty much all of the scripts are python2+3 compatible. Check and allow using python3, while adjusting the PYTHON2 refs. Note: - python3.4 is used as it's the earliest supported version - python2 chosen prior to python3 v2: use python2 by default Cc: Ilia Mirkin <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* util: move u_cpu_detect to utilDylan Baker2018-10-304-698/+0
| | | | | | | | | CC: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107870 Fixes: 80825abb5d1a7491035880253ffd531c55acae6b ("move u_math to src/util") Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: Move u_debug to utilsDylan Baker2018-10-309-910/+4
| | | | | Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: Move os_misc to utilDylan Baker2018-10-305-283/+1
| | | | | | | this is needed by u_debug Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove u_inlines.h from u_debug.cDylan Baker2018-10-301-1/+0
| | | | | | | It's not used, and I'm not pulling u_inlines into src/util. Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove p_format.h from u_debug.hDylan Baker2018-10-302-1/+1
| | | | | Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: move memory debug declarations into u_debug_galliumDylan Baker2018-10-304-8/+7
| | | | | Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: move debug_print_tranfer_flags to u_debug_galilumDylan Baker2018-10-304-21/+16
| | | | | | | This also appears to be unused. Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: move debug_print_bind_flags to u_debug_galliumDylan Baker2018-10-304-37/+36
| | | | | | | This also appears to be unused. Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: move debug_print_usage_enum to the u_debug_galliumDylan Baker2018-10-304-22/+28
| | | | | | | | This isn't used in mesa, maybe vmware uses this in a closed source state tracker? Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: start splitting u_debug into generic and gallium specific ↵Dylan Baker2018-10-307-16/+93
| | | | | | | | | | components In order to pull u_debug into src/util we need to break the generically useful bits from the bits that are tightly coupled to gallium. Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: split u_prim_name out of u_debug.hDylan Baker2018-10-304-26/+50
| | | | | | | This allows us to pull u_prim.h out of u_debug.h Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: fix power sensor readings for amdgpu usersAndre Heider2018-10-301-0/+3
| | | | | | | | | | | | | | amdgpu doesn't use the INPUT but the AVERAGE subfeature: $ sensors -u amdgpu-pci-0100 Adapter: PCI adapter power1: power1_average: 17.233 power1_cap: 180.000 Signed-off-by: Andre Heider <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: rework PIPE_HANDLE_USAGE_* flagsMarek Olšák2018-10-303-4/+4
| | | | Only radeonsi uses them, so adjust them to match its needs.
* vl: drop left-over variableEric Engestrom2018-10-301-1/+0
| | | | | | Fixes: 6ccc435e7ad92bb0ba77d "pipe-loader: move dup(fd) within pipe_loader_drm_probe_fd" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vl: get h264 profile idcBoyuan Zhang2018-10-261-0/+24
| | | | | | | Adding a function for converting h264 pipe video profile to profile idc Signed-off-by: Boyuan Zhang <[email protected]> Acked-by: Christian König <christian.koenig at amd.com>
* android: Build kms_swrast for the Android platformRob Herring2018-10-221-0/+1
| | | | | | Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: Fix mismatched ifdef-guardsMichał Janiszewski2018-10-181-2/+2
| | | | | Signed-off-by: Michał Janiszewski <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* softpipe: dynamically allocate space for immediate constantsGert Wollny2018-10-182-5/+15
| | | | | | | | | | | | | | | The number of immediate constants was fixed and the size check was only done by means of an assertion. Given this a shader that emits more immediate constants would result in a memory corruption when mesa is build in release mode. Instead of using this fixed limit allocate the space dynamically, let it grow as needed, and also remove the unused ImmArray. Fixes: dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.1 Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/ttn: Convert inputs and outputs to derefs of variables.Eric Anholt2018-10-151-60/+54
| | | | | | | | | | | This means that TTN shaders more closely resemble GTN shaders: they have inputs and outputs as variable derefs, with the variables having their .driver_location already set up for you. This will be useful for v3d to do input variable DCE in NIR, which we can't do when the TTN shaders never have a pre-nir_lower_io stage. Acked-by: Rob Clark <[email protected]>
* gallium/ttn: Fix the type of gl_FragDepth.Eric Anholt2018-10-151-0/+1
| | | | | | | | In TGSI we have a vec4 of which only .z is used, but for NIR we should be using a float the same as other NIR IR. We were already moving TGSI's .z to the .x channel. Acked-by: Rob Clark <[email protected]>
* gallium/u_transfer_helper: Add support for separate Z24/S8 as well.Kenneth Graunke2018-10-142-19/+55
| | | | | | | | | | | | | | | | u_transfer_helper already had code to handle treating packed Z32_S8 as separate Z32_FLOAT and S8_UINT resources, since some drivers can't handle that interleaved format natively. Other hardware needs depth and stencil as separate resources for all formats. For example, V3D3 needs this for 24-bit depth as well. This patch adds a new flag to lower all depth/stencils formats, and implements support for Z24_UNORM_S8_UINT. (S8_UINT_Z24_UNORM is left as an exercise to the reader, preferably someone who has access to a machine that uses that format.) Reviewed-by: Eric Anholt <[email protected]>
* gallium/format: Add a helper to combine separate Z24 and S8 stencil.Kenneth Graunke2018-10-142-0/+22
| | | | | | | This new function takes separate Z24 depth and S8 stencil sources, and packs them into a single combined Z24S8 buffer. Reviewed-by: Eric Anholt <[email protected]>
* gallium/auxiliary: Add util_format_get_depth_only() helper.Kenneth Graunke2018-10-141-0/+21
| | | | | | | This will be used by u_transfer_helper.c shortly, in order to split packed depth-stencil into separate resources. Reviewed-by: Eric Anholt <[email protected]>
* gallivm: Make it possible to disable some optimization shortcuts in release ↵Gert Wollny2018-10-064-21/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | builds For testing it is of interest that all tests of dEQP pass, e.g. to test virglrenderer on a host only providing software rendering like in a CI. Hence make it possible to disable certain optimizations that make tests fail. While we are there also add some documentation to the flags to make it clear that this is opt-out. Setting the environment variable "GALLIVM_PERF=no_filter_hacks" can be used to make the following tests pass in release mode: dEQP-GLES2.functional.texture.mipmap.2d.affine.*_linear_* dEQP-GLES2.functional.texture.mipmap.cube.generate.* dEQP-GLES2.functional.texture.vertex.2d.filtering.*_mipmap_linear_* dEQP-GLES2.functional.texture.vertex.2d.wrap.* Related: https://bugs.freedesktop.org/show_bug.cgi?id=94957 v2: rename optimization disabling flag to 'safemath' and also move the nopt flag to the perf flags. v3: rename flag "safemath" to "no_filter_hacks" since safemath is usually associated with floating point operations (Roland) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* pipe-loader: add a dup() in pipe_loader_sw_probe_kmsEmil Velikov2018-10-032-2/+12
| | | | | | | | | | | | | | | | | The pipe_loader_release API closes the fd given, even if the pipe-loader should _not_ take ownership of it. With earlier commit we fixed pipe_loader_drm_probe_fd, and now with cover the final piece. Note that unlike the DRM case, here the caller _did_ forget to dup before using it ... most likely leading to all sorts of fun. Don't forget the close in the error path. Seems like the things are a bit leaky/asymmetrical with the semi-recent config work. But we can shave that yak another day ;-) Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: move dup(fd) within pipe_loader_drm_probe_fdEmil Velikov2018-10-034-17/+30
| | | | | | | | | | | | | | | | | | | | | | Currently pipe_loader_drm_probe_fd takes ownership of the fd given. To match that, pipe_loader_release closes it. Yet we have many instances which do not want the change of ownership, and thus duplicate the fd before passing it to the pipe-loader. Move the dup() within pipe-loader, explicitly document that and document all the cases through the codebase. A trivial git grep -2 pipe_loader_release makes things as obvious as it gets ;-) Cc: Leo Liu <[email protected]> Cc: Thomas Hellstrom <[email protected]> Cc: Axel Davy <[email protected]> Cc: Patrick Rudolph <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Reviewed-by: Axel Davy <[email protected]> (for nine)
* vl/dri3: do full teardown on screen_destroyEmil Velikov2018-10-031-1/+0
| | | | | | | | | | | Earlier commit added support for 'front_buffers', erroneously adding a return in vl_dri3_screen_destroy. Effectively leaking a lot of state. Fixes: 8d7ac0a4e4d ("vl/dri3: implement DRI3 BufferFromPixmap") Cc: Leo Liu <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* gallium/util: Clarify comment in util_init_thread_pinningMichel Dänzer2018-09-281-1/+4
| | | | | | | | | | As discussed in the review of the patch which added the comment: Nothing happens when a thread is created, because pthread_atfork doesn't affect creating threads. However, spawning a child process will likely crash. Reviewed-by: Marek Olšák <[email protected]>
* gallivm: ensure string is null-terminated instead of assert()ingEric Engestrom2018-09-251-3/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: Don't compile pipe loader with dri support when not using driDylan Baker2018-09-211-5/+5
| | | | | | | | | | | Corrects building glx as gallium-xlib without any dri targets. v2: - fix ugly formatting Fixes: 66c94b9313a697ce8f2b222f4ba353035e4b8726 ("meson: build gallium winsys for dri, null, and wrapper") Reviewed-by: Eric Engestrom <[email protected]>
* mesa/st: add force_compat_profile option to driconfigTimothy Arceri2018-09-181-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* Revert "radeonsi: avoid syncing the driver thread in si_fence_finish"Timothy Arceri2018-09-181-8/+0
| | | | | | | | | | This reverts commit bc65dcab3bc48673ff6180afb036561a4b8b1119. This was manually reverted. Reverting stops the menu hanging in some id tech games such as RAGE and Wolfenstein The New Order. Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107891
* gallium/util: don't let child processes inherit our thread affinityMarek Olšák2018-09-141-4/+32
| | | | v2: corrected the comment
* gallium/util: start with a random L3 cache index for AMD ZenMarek Olšák2018-09-141-4/+16
|
* vl/dri: add color depth to vl winsysLeo Liu2018-09-132-0/+2
| | | | | | | For VDPAU use later Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* vl/dri3: add support for 10 bits formatLeo Liu2018-09-131-4/+25
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* vl/dri: add 10 bits format supportsLeo Liu2018-09-132-10/+65
| | | | | | | v2: Tell B10G10R10X2 and R10G10B10X2 formats for different HW. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/u_inlines: remove the destroy variable in pipe_reference_describedMarek Olšák2018-09-101-6/+3
| | | | | Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* gallium/u_inlines: improve pipe_reference_described perf for debug buildsMarek Olšák2018-09-101-4/+5
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/auxiliary: don't dereference counters twice needlesslyMarek Olšák2018-09-101-7/+10
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium/u_inlines: normalize naming, use dst & src, style fixes (v2)Marek Olšák2018-09-101-47/+47
| | | | | | | v2: update comments Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* util: Make util_context_thread_changed a no-op on Windows.Jose Fonseca2018-09-101-0/+2
| | | | | | | | | Spite using thrd_t types, these functions are wed to pthreads, and break Windows builds, because thrd_current() is not implemented there, as it's impossible to have an efficient thrd_current() implementation on Windows. Trivial.
* gallium: New cap PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET.Mathias Fröhlich2018-09-101-0/+3
| | | | | | | | | | | Introduce a new capability for the maximum value of pipe_vertex_element::src_offset. Initially just every driver backend returns the value previously set from _mesa_init_constants. So this shall end up in no functional change. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* st/mesa: throttle texture uploads if their memory usage goes beyond a limitMarek Olšák2018-09-072-0/+137
| | | | | This prevents radeonsi from running out of memory. It also increases texture upload performance by being nice to the kernel memory manager.
* gallium: add PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGETMarek Olšák2018-09-071-0/+1
|
* Revert "gallium/os_thread: simplify helper pipe_current_thread_get_time_nano"Marek Olšák2018-09-071-1/+5
| | | | | | This reverts commit 6d477bc5460eec14c6a0d047a0384c9ce5c7609b. It fixes the Windows build hopefully.
* gallium/u_threaded: implement set_context_param for thread pinning (v2)Marek Olšák2018-09-072-0/+41
| | | | | | | v2: - use set_context_param - set set_context_param even if the driver doesn't implement it Reviewed-by: Brian Paul <[email protected]>
* st/mesa: pin driver threads to a specific L3 cache on AMD Zen (v2)Marek Olšák2018-09-072-0/+46
| | | | | | v2: use set_context_param Reviewed-by: Brian Paul <[email protected]>