aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* freedreno/ir3: avoid applying (sat) on bary.fIlia Mirkin2020-05-172-3/+5
| | | | | | | | | | This causes failures on a3xx resulting in the non-sensical dEQP failures on packUnorm2x16. The same test uses ldlv on a4xx+, so just disallow (sat) on bary.f on all generations. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5074>
* freedreno/a3xx: reinstate rgb10_a2ui texture formatIlia Mirkin2020-05-172-20/+1
| | | | | | | | | | | Rendering doesn't work, but having the format in place avoids an assert when selecting the texture format in st_format. I believe it's required for GLES3, so more tracing is required to determine what bit we're missing to make rendering work. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5073>
* freedreno/a3xx: there's no r8i/ui rb format, only rg8i/rg8uiIlia Mirkin2020-05-173-145/+10
| | | | | | | | | | | | | | This fixes a number of dEQP tests: dEQP-GLES3.functional.fbo.blit.conversion.r8* dEQP-GLES3.texture.specification.basic_teximage2d.r8* and others. The reason why this enum showed up in traces for R8 is that it was an "upgraded" texture to R8G8. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5073>
* radv: use util_float_to_half_rtzChristopher Egert2020-05-171-1/+1
| | | | | | | | | | | | | | | Since commit 8b8af6d398a94cb07015c695fdfdb5c157aa72cf there is a performance regression in dirt 4 on picasso APUs. The game ends up feeding a large value into this which overflows on the conversion to 16bit float. With the old implementation (which now lives in util_float_to_half_rtz) it would be clamped to inf-1, while the new one returns inf. This causes a performance hit somehow at some point down the line. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Fixes: 8b8af6d398a "gallium/util: Switch util_float_to_half to _mesa_float_to_half()'s impl." Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5062>
* lima/ppir: optimize tex loads with single successorErico Nunes2020-05-162-2/+18
| | | | | | | | These don't need a mov, and can be used directly with pipeline output. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4975>
* lima/ppir: rework tex loweringErico Nunes2020-05-163-63/+66
| | | | | | | | | Move steps from lowering to emit, since they can be done earlier in a single place, rather than in two-steps. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4975>
* lima/ppir: improve handling for successors in other blocksErico Nunes2020-05-163-8/+12
| | | | | | | | | | | | | | | | | | ppir doesn't register successors in other blocks, and causes ppir_node_has_single_succ to be unreliable as it might return true for nodes with successors in other blocks. This is bad for optimization passes that try to pipeline registers or avoid insertion of movs, as that can generally only be done for nodes with a single user. As of now, ppir can't just start adding successors in other blocks as that breaks the scheduling code. So this patch is a little hacky but enables pipelining optimizations during lowering. It can hopefully be removed during future scheduler rework. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4975>
* lima/ppir: handle failures on all ppir_emit_cf_list pathsErico Nunes2020-05-161-3/+7
| | | | | | | | | | | | In some paths where ppir_emit_cf_list is called, compilation errors such as in unsupported features were not being handled, allowing compilation to continue and fail at some random point later. Handle them properly so compilation aborts in the expected way rather than what may look like a compiler crash/bug. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4975>
* util/rand_xor: extend the urandom path to all non-Windows platformsEric Engestrom2020-05-161-2/+4
| | | | | | | | Any system that provides `/dev/urandom` should be allowed to try to use it. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emmanuel Gil Peyrot <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
* util/rand_xor: fallback Linux to time-based instead of fixed seedEric Engestrom2020-05-161-22/+14
| | | | | | | | | When the caller asked for a randomised_seed, we should fall back to the time-based seed instead of the fixed seed. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emmanuel Gil Peyrot <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
* util/rand_xor: drop unused headerEric Engestrom2020-05-161-1/+0
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emmanuel Gil Peyrot <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
* util/rand_xor: make it clear that {,s_}rand_xorshift128plus take *exactly 2* ↵Eric Engestrom2020-05-162-4/+4
| | | | | | | | uint64_t Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emmanuel Gil Peyrot <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
* gitlab-ci: exclude scripts that don't affect the buildEric Engestrom2020-05-161-1/+4
| | | | | | | | | | | | | | | | All the other files in bin/ are not used by any build system and as such cannot affect the build. I've been working on maintainer tools lately and it's frustrating to have the CI wait for 45 minutes to rebuild everything and not even read/run the files in the MR when it could've just been merged and moved on to the next MR 45 minutes ago. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Tapani Pälli <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5046>
* gallium/auxiliary/vl: Fix compute shader scaling for non-square pixelsThong Thai2020-05-161-1/+2
| | | | | | | | Calculate the scale_y parameter instead of assuming square pixels. Signed-off-by: Thong Thai <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5057>
* gallium/u_threaded: execute transfer_unmap with THREAD_SAFE directlyMarek Olšák2020-05-151-0/+15
| | | | | | | | | | | | | This was the original intention, but it wasn't fully implemented. Fixes: 7f22e0fd29369f478da1d36520049f001cd698d1 Closes: #2953 Tested by: John Galt <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5030>
* radeonsi: test uncached clear/copy buffer performance with compute shadersMarek Olšák2020-05-151-13/+19
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: compute perf tests - don't test 1 wave/SA limit, test no limit firstMarek Olšák2020-05-151-1/+1
| | | | | | | 1 wave/SA is always slow and thus not useful Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: disable the L2 cache for CPU read mappings of buffersMarek Olšák2020-05-151-2/+3
| | | | | | | for faster copying over PCIe and no need to flush L2 Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: disable the L2 cache for most CPU mappings of texturesMarek Olšák2020-05-153-2/+25
| | | | | | | for faster blits over PCIe and no need to flush L2 Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* winsys/amdgpu: add RADEON_FLAG_UNCACHED for faster blits over PCIeMarek Olšák2020-05-152-20/+72
| | | | | | | Small blits benefit more. Good access pattern is required. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: use display_dcc_offset for setting displayable_dcc_cb_maskMarek Olšák2020-05-151-1/+1
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: use vi_dcc_enabled instead of using tex->surface.dcc_offset directlyMarek Olšák2020-05-154-11/+15
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: rename SI_RESOURCE_FLAG_TRANSFER to FORCE_LINEARMarek Olšák2020-05-152-7/+7
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: simplify setting resource usage for si_init_temp_resource_from_boxMarek Olšák2020-05-151-4/+5
| | | | | | | usage was set twice, once in the function, and then after the function Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: tweak clear/copy_buffer limits when to use computeMarek Olšák2020-05-151-6/+43
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: optimize access pattern for compute blits with linear texturesMarek Olšák2020-05-152-11/+18
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: use correct clear value size for EQAA in expand_fmaskMarek Olšák2020-05-151-1/+2
| | | | | | | based on the fmask_expand_values array. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* ac/nir: honor ACCESS_STREAM_CACHE_POLICY for L1 and L0 caches tooMarek Olšák2020-05-151-1/+1
| | | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>
* radeonsi: Use TRUNC_COORD on samplersJoshua Ashton2020-05-151-0/+3
| | | | | | | | | | | | | | | | The default behaviour (0) is: "round-nearest-even to n.6 and drop fraction when point sampling" whereas the OpenGL spec simply wants us to floor it (1) "truncate when point sampling". See 8.14.2 in the OpenGL spec: https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf The Direct3D spec also mandates this (https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm#7.18.7%20Point%20Sample%20Addressing) On WineD3D: This fixes some point-sampling texture precision issues in some Direct3D 9 titles such as Guild Wars 2 and htoL#NiQ: The Firefly Diary that are not present on other vendors. CC: <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3953>
* iris: Use modfiy disables for 3DSTATE_WM_DEPTH_STENCIL commandSagar Ghuge2020-05-152-4/+32
| | | | | | | | | | | | | | | | | | | | Add new IRIS_DIRTY_STENCIL_REF dirty flag which would help us to trigger separate 3DSTATE_WM_DEPTH_STENCIL packet using modify disable fields. Instead of merging two packets into one in order to build 3DSTATE_WM_DEPTH_STENCIL state, set_stencil_ref can use IRIS_DIRTY_STENCIL_REF bit and bind_zsa_state can use IRIS_DIRTY_WN_DEPTH_STENCIL, both could cause packet to happen with available information using modify disable bits which allow us to construct packet by ignoring set of fields. v2: (Kenneth Graunke) - Fix condition ordering. - Club GEN cases. Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3688>
* radeon: Fix whitespacesThong Thai2020-05-155-264/+264
| | | | | | | | Minor adjustment to whitespace to align text since the indentation changed Signed-off-by: Thong Thai <[email protected]> Acked-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3523>
* radeonsi: don't expose 16xAA on chips with 1 RB due to an occlusion query issueMarek Olšák2020-05-151-9/+9
| | | | | | | | Only Stoney and Raven2 are affected. Cc: 20.0 20.1 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5047>
* spirv: handle OpCopyObject correctly with any typesSamuel Pitoiset2020-05-153-6/+37
| | | | | | | | | | | | | | | | This implements OpCopyObject as a blind copy and propagates the access mask properly even if the source object type isn't a SSA value. This fixes some recent dEQP-VK.descriptor_indexing.* failures since CTS changed and now apply nonUniformEXT after constructing a combined image/sampler. Original patch is from Jason Ekstrand. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4909>
* etnaviv: retarget transfer to render resource when necessaryLucas Stach2020-05-151-1/+12
| | | | | | | | | | | | | | If we have a separate render resource, it may contain more up-to-date data than what is available in the base resource, so we need to retarget the transfer to this resource. As the most likely reason for the existence of the render resource is a multi-tiled render layout we need to allow this transfer to go through the resolve/blit copy path, as we can't de-/tile those layouts in software. Fixes: b96277653033 (etnaviv: rework compatible render base) Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5051>
* intel: Store the aperture size in devinfo.Rafael Antognolli2020-05-158-45/+20
| | | | | | | | | | | | We will later use the devinfo from iris_bufmgr, where we don't have access to the screen pointer. And since we are moving it, we can reuse it in Anv and i965. v2: return error code and check for it on Anv (Lionel). v3: Remove anv_gem_get_aperture() from anv_private.h and stubs (Lionel). Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5043>
* st/nine: Handle full pSourceRect betterAxel Davy2020-05-151-13/+13
| | | | | | | | | | | | Some apps do set pSourceRect to the full area even if not needed. Filtering out this case is helpful, as we currently do not handle properly resizing (pDestRect or window size not of the size of the resource) when pSourceRect is set. Indeed in this case pSourceRect needs to be modified before being passed to the presentation backend. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Ignore pDirtyRegionAxel Davy2020-05-151-1/+5
| | | | | | | | | We supported it, but it's not much useful. Besides it gets more complicated to handle right when you support resizing before display. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Improve pDestRect handlingAxel Davy2020-05-151-3/+18
| | | | | | | | | | | | | | | | pSourceRect and pDestRect allows to: A) display a crop of the backbuffer B) display the content in a subregion (after an offset) C) resize the content before displaying Before this patch, only features A and B were supported. This patch adds C, but breaks A, which current support relied on C not being implemented. I think C is more important than A, and A can be added later. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Retry allocations after freeing some spaceAxel Davy2020-05-156-8/+68
| | | | | | | | | Managed resources can be released whenever we need. When we have an allocation failure, free them and retry. Try also to flush the csmt queue in case there were some things released. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Increase available GPU memoryAxel Davy2020-05-151-6/+7
| | | | | | | | | | | | | | | | This patch caps to 4GB the limit of GPU memory accessible only for 32bits build. This would deserve some tests on windows, so we might change that behaviour in the future. For example, it's possible that GetAvailableTextureMem is capped to 4GB on 64bits build. We cap to a bit less than 4GB, which might help https://github.com/iXit/Mesa-3D/issues/323 In addition, increase from 80% to 95% the allocation limit above which we fail allocating. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Add missing NULL checksAxel Davy2020-05-151-3/+48
| | | | | | | | | | | | | Ideally apps shouldn't make buggy calls. Still if some do, let's avoid crashing. Without this patch, if some calls are invalid, for example if replaying a trace of a game needing a lot of VRAM on a card with not much VRAM, it can crash. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Fix a crash if the state is not initializedAxel Davy2020-05-153-0/+8
| | | | | | | | | | | | I don't remember exactly the conditions of the crash, but I had a trace which was crashing in the gallium driver before doing any rendering (something about viewports being not initialized). It's not the first time we hit such a problem, so rather than investigating that crash, I chose to just initialize every states at device creation. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Fix uninitialized variable in BEM()Axel Davy2020-05-151-1/+1
| | | | | | | tmp was not initialized. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Improve return error code in CheckDeviceFormatAxel Davy2020-05-151-1/+3
| | | | | | | This seems suspicious, but is better than what we currently do. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Pass more adapter formats for CheckDepthStencilMatchAxel Davy2020-05-151-1/+24
| | | | | | | | | | | | | It seems CheckDepthStencilMatch should accept A8R8G8B8 as adapter format. Given the lack of clarity of the doc relative to the difference between display format and adapter format (== display format modulo alpha bits), for now just accept display formats with and without alpha bits. Fixes: https://github.com/iXit/Mesa-3D/issues/317 Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Do not return invalidcall on getrenderstateAxel Davy2020-05-151-2/+6
| | | | | | | | To be fair I don't remember why I wrote this patch, but it seems reasonable. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Return error when setting invalid depth bufferAxel Davy2020-05-151-0/+3
| | | | | | | | Prevents a crash with the trace of https://github.com/iXit/wine-nine-standalone/issues/40 Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* st/nine: Add checks for pure deviceAxel Davy2020-05-152-1/+21
| | | | | | | Some Get* functions are forbidden for pure device. Signed-off-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
* zink: implement i2b1Erik Faye-Lund2020-05-151-0/+7
| | | | | | | | | | | This shuold really have been implemented before starting to use these, but I guess I missed them. Fixes a crash when starting a game in Warzone 2100. Fixes: 7f6a491eec0 ("zink: lower b2b to b2i") Reviewed-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5053>
* util/rand_xor: use getrandom() when availableEmmanuel Gil Peyrot2020-05-152-2/+12
| | | | | | | | | | | | | | This function has been added in glibc 2.25, and the related syscall in Linux 3.17, in order to avoid requiring the /dev/urandom to exist, and doing the open()/read()/close() dance on it. We pass GRND_NONBLOCK so that it doesn’t block if not enough entropy has been gathered to initialise the /dev/urandom source, and fallback to the next source in any error case. Signed-off-by: Emmanuel Gil Peyrot <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2026>