aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
...
* draw: add disk caching for draw shadersDave Airlie2020-06-111-17/+126
| | | | | | | | This adds the cache search/insert and compile skipping for cached objects to the VS/GS/TES/TCS stages in draw. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* llvmpipe: hook draw disk cache upDave Airlie2020-06-111-1/+21
| | | | | | | Connect the draw callbacks into the llvmpipe code. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* draw: add disk cache callbacks for draw shadersDave Airlie2020-06-113-1/+35
| | | | | | | | This provides a set of hooks from the driver that draw can use to access the disk cache for the draw shaders. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* llvmpipe/cs: add shader cachingDave Airlie2020-06-111-3/+45
| | | | | | | As for fragment shader, skip compilation step if we have the shaders Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* llvmpipe/fs: add caching supportDave Airlie2020-06-111-4/+47
| | | | | | | | | Serialize and check if the object is in the cache, it there is a cached object skip compilation code once we've constructed the function interface. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* gallivm: don't cache shaders that use fetch functions.Dave Airlie2020-06-111-1/+5
| | | | | | | | | | This needs to be reworked, but it's a bit messy as we have to store all the fetch pointers to be added as globals later once gallivm has been initialised further. For now just refuse to cache shaders that hit these paths (mainly ETC1 and BPTC). Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* llvmpipe: add infrastructure for disk cache supportDave Airlie2020-06-113-3/+78
| | | | | | | | | | This hooks up the gallium API and adds the APIs needed for shader stages to search and add things to the cache. It also adds cache stats debug printing. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* gallivm: add cache interface to mcjitDave Airlie2020-06-113-1/+49
| | | | | | | | | | MCJIT uses an ObjectCache object to implement the cache, this creates and instances of it and adds it to the MCJIT instances, it stores the cached object for later use by the outer layers. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* gallivm: skip operations if we have a cached object.Dave Airlie2020-06-111-0/+5
| | | | | | | | If the object is loaded from the cache, a bunch of gallivm/llvm interactions can be skipped. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* gallivm: add support for a cache objectDave Airlie2020-06-1114-19/+41
| | | | | | | | This plumbs the cache object into the gallivm API, nothing uses it yet. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* gallivm: rework debug printf hook to use global mapping.Dave Airlie2020-06-113-7/+9
| | | | | | | | | Cached shaders require relinking, so hardcoding the pointer can't work. This switches out the printf code to use new proper API. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* gallivm: rework coroutine malloc/free callouts.Dave Airlie2020-06-115-11/+35
| | | | | | | | | | | | When using cached shaders we have to relink the shader with external symbols when it's loaded. However the way gallivm does function calls now hardcodes the function pointer into the shader. LLVM had a mechanism for doing this properly using global mappings, this switches the coroutine alloc/free code to use a global mapping. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* llvmpipe/draw: drop variant number from function names.Dave Airlie2020-06-113-16/+9
| | | | | | | | | | | | | When we use an object cache for the MCJIT we can have identical cache entries from the same shader variant in different shaders, but the JIT objcache uses the function name to relink things, so it has to be consistent. Just drop the variants from the function names. Note the modules still have the variant info. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* llvmpipe/cs: overhaul cs variant key state.Dave Airlie2020-06-112-25/+64
| | | | | | | | This just realigns it with the fs state, and fixes some issues where shaders weren't getting cached correctly. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* ac/surface: cache DCC retile maps (v2)Marek Olšák2020-06-101-17/+5
| | | | | | | | | | This reduces overhead when resizing windows or when allocating similar image sizes over and over again. v2: optimize the memory footprint of the cache Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5398>
* ac/surface: add a wrapper structure to hold ADDR_HANDLEMarek Olšák2020-06-102-4/+3
| | | | | | | and more things in the future. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5398>
* panfrost: Add writes_stencil to the EARLY_Z disable listIcecream952020-06-101-1/+2
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* zink: only report device-local memory as video-memoryErik Faye-Lund2020-06-101-2/+5
| | | | | | | | | | | While the definition of "video memory" isn't super clear, I think it's pretty reasonable to assume host-memory isn't meant to be included. So let's only count dedicated memory here. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3107 Reviewed-by: Witold Baryluk <[email protected]> Tested-by: Witold Baryluk <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5409>
* radeonsi/ngg: try GS multi-cycling mode if default mode failedPierre-Eric Pelloux-Prayer2020-06-101-1/+10
| | | | | | | | | | | | | If gsprim_lds_size is larger than target_lds_size then gfx10_ngg_calculate_subgroup_info will fail. This commit adds a logic to try the multi-cycling in this case because it's using less memory. This fix glsl-1.50-gs-max-output when using NGG. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5401>
* radeonsi: add return value to gfx10_ngg_calculate_subgroup_infoPierre-Eric Pelloux-Prayer2020-06-103-3/+11
| | | | | | | | | | | | gfx10_ngg_calculate_subgroup_info uses assert to detect invalid configuration, but if asserts are disabled it will continue its execution. This commits adds a boolean return value to let the caller know that something went wrong and that the results mustn't be used. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3103 Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5401>
* panfrost: Ensure we have ro before using itAlyssa Rosenzweig2020-06-091-4/+4
| | | | | | | | | | | | | | | | Even through the resouce requested has a BIND_SCANOUT or related tag, this does not mean that we have a render-only driver. This can trivially happen as one requests such resource from GBM, while using the panfrost fd (and hence panfrost_dri.so) Forward port of !3000 Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Robert Foss <[email protected]> Signed-off-by: Alyssa Rosenzweig <[email protected]> Closes: #2664 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5410>
* zink: emit interpolation decorations for ntv outputsMike Blumenkrantz2020-06-091-0/+17
| | | | | | | this matches up with nir internal states pre/post ntv Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5384>
* zink: track program usages for each shaderMike Blumenkrantz2020-06-094-1/+34
| | | | | | | | | | | | | | when shaders are created and destroyed in large numbers, the same pointers get reused for different shaders, which can lead to bad lookups in the program_cache hash table. now each shader tracks its program usage to automatically remove itself from that program in order to avoid hash collisions fixes mesa/mesa#3053 Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5315>
* zink: assert that image-view format isn't undefinedErik Faye-Lund2020-06-091-0/+1
| | | | | Reviewed-by: Mike Blumenkrantz <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5407>
* zink: emulate B8G8R8X8_SRGB with B8G8R8A8_SRGBErik Faye-Lund2020-06-091-0/+1
| | | | | Reviewed-by: Mike Blumenkrantz <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5407>
* frontends/vdpau: Default destination rect to source rectThong Thai2020-06-091-0/+3
| | | | | | | | | mpv is passing in a NULL destination_video_rect, which results in a black screen when playing videos using VDPAU in some cases. Signed-off-by: Thong Thai <[email protected]> Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5386>
* radeonsi: require LLVM 11 for gfx10.3Marek Olšák2020-06-091-0/+6
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radeonsi: add support for Sienna CichlidMarek Olšák2020-06-091-1/+3
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* ac: align num_vgprs for gfx10.3Marek Olšák2020-06-091-1/+1
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radeonsi: don't set any XNACK options on gfx10.3Marek Olšák2020-06-091-2/+2
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radeonsi: set BIG_PAGE fields on gfx10.3Marek Olšák2020-06-092-3/+23
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radeonsi: move L2_CACHE_CONTROL registers into si_emit_framebuffer_stateMarek Olšák2020-06-091-29/+32
| | | | | | | the next commit will set more fields. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radeonsi: implement R9G9B9E5 render target and image store support on gfx10.3Marek Olšák2020-06-093-7/+22
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radeonsi: enable larger SDMA clears and copies on gfx10.3Marek Olšák2020-06-091-5/+11
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radeonsi: honor a user-specified pitch on gfx10.3Marek Olšák2020-06-091-6/+20
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* ac,radeonsi: start adding support for gfx10.3Marek Olšák2020-06-094-8/+22
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* ac,radeonsi: replace == GFX10 with >= GFX10 where it's neededMarek Olšák2020-06-092-8/+11
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* panfrost: Mark PIPE_BUFFER BOs as not renderableIcecream952020-06-091-1/+2
| | | | | | | | Without this, memory usage explodes by 16x due to height alignment. Closes: #2715 Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4451>
* winsys/radeon: do not cast bo->va as void*Pierre-Eric Pelloux-Prayer2020-06-093-11/+11
| | | | | | | | | | | | | Using a util_hash_table_create_ptr_keys to store bo->va address doesn't work on 32 bits. This commit makes radeon_drm_winsys::bo_vas a hash_table_u64 instead. Tested by Miklós Máté. CC: 20.1 <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3056 Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5380>
* gallium/u_vbuf: add a faster path for uploading non-interleaved attribsMarek Olšák2020-06-091-34/+83
| | | | | | | +1% higher FPS in torcs. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5304>
* gallium/u_vbuf: get rid of some pointer dereferencesMarek Olšák2020-06-091-9/+11
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5304>
* freedreno/a6xx: use nonbinning VS when GS is usedJonathan Marek2020-06-081-4/+5
| | | | | | | | | | | | | | The current "ds = state->bs" seems broken, and the "vs = state->bs" is unnecessary (already set above). Since it was added as part of a GS-related patch, I think this is what was intended. Note: tesselation disables GMEM rendering so we shouldn't have to worry about hs/ds + binning interaction. Fixes: 0eebedb6190fdab8956769 ("freedreno/a6xx: Emit program state for GS") Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5370>
* etnaviv: drop translate_blend(..)Christian Gmeiner2020-06-082-22/+9
| | | | | | | | PIPE_BLEND_* matches 1:1 the hardware defines. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4187>
* v3d_bufmgr: fix time_t printfPeter Seiderer2020-06-071-1/+1
| | | | | | | | | | Fixes: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘time_t’ {aka ‘long long int’} Signed-off-by: Peter Seiderer <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4279>
* vc4_bufmgr: fix time_t printfPeter Seiderer2020-06-071-1/+1
| | | | | | | | | | Fixes: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘time_t’ {aka ‘long long int’} Signed-off-by: Peter Seiderer <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4279>
* llvmpipe: do not enable tessellation shader without llvm coroutines supportCharmaine Lee2020-06-061-1/+2
| | | | | | | | | | | | | | | | Tessellation shader in llvmpipe depends on llvm coroutines support. So do not advertise tessellation shader support in llvmpipe if GALLIVM_HAVE_CORO is FALSE. This fixes assertion in LLVMTokenTypeInContext() running tessellation shader tests with llvm version < 6. Fixes: eb522717 "llvmpipe: add support for tessellation shaders" Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Neha Bhende <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5366>
* android: svga: fix build for GL4.1 supportMauro Rossi2020-06-061-0/+2
| | | | | | | | | | | | | | Fixes the following building errors: external/mesa/src/gallium/drivers/svga/svga_context.c:184: error: undefined reference to 'svga_init_ts_functions' external/mesa/src/gallium/drivers/svga/svga_context.c:100: error: undefined reference to 'svga_cleanup_tcs_state' out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_svga_intermediates/libmesa_pipe_svga.a(svga_state.o):svga_state.c:hw_draw_state_sm5: error: undefined reference to 'svga_hw_tes' out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_svga_intermediates/libmesa_pipe_svga.a(svga_state.o):svga_state.c:hw_draw_state_sm5: error: undefined reference to 'svga_hw_tcs' Fixes: ccb4ea5a "svga: Add GL4.1(compatibility profile) support in svga driver" Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5364>
* android: util: fix build for GL4.1 supportMauro Rossi2020-06-061-0/+2
| | | | | | | | | | | | Fixes the following building errors: external/mesa/src/gallium/drivers/svga/svga_state_tgsi_transform.c:154: error: undefined reference to 'tgsi_write_vpos' external/mesa/src/gallium/drivers/svga/svga_state_tgsi_transform.c:201: error: undefined reference to 'tgsi_remove_dynamic_indexing' Fixes: 48a7456f ("util: Add util functionality for GL4.1 support") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5364>
* freedreno/ir3: Stop shifting UBO 1 down to be UBO 0.Eric Anholt2020-06-052-7/+3
| | | | | | | | | | | It turns out the GL uniforms file is larger than the hardware constant file, so we need to limit how many UBOs we lower to constbuf loads. To do actual UBO loads, we'll need to be able to upload UBO 0's pointer or descriptor. No difference on nohw 1 UBO update drawoverhead case (n=35). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>
* freedreno: Upload gallium constbufs as needed when referenced as a UBO.Eric Anholt2020-06-052-6/+34
| | | | | | | | For now we never ask to set up UBO 0 as a real UBO, so this doesn't trigger, but it gets us ready for handling the case where UBO 0 is too big to be push constants in the HW. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>