aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* pan/mdg: Move r1.w writeout to branch->destIcecream952020-06-102-6/+6
| | | | | | | | There will need to be sources for depth and stencil writeout, so something has to be moved to the dest of the writeout branch. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Add a macro for printing instruction source informationIcecream952020-06-101-21/+12
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* nir: Remove nir_intrinsic_output_u8_as_fp16_panAlyssa Rosenzweig2020-06-101-6/+0
| | | | | | | Now unused in favour of nir_intrinsic_load_output, happily. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5287>
* ac/surface: fix epitch when modifying surf_pitchPierre-Eric Pelloux-Prayer2020-06-101-2/+6
| | | | | | | | | This is needed otherwise it can cause bad rendering of UYVY files. The align(..., 256 / surf->bpe) constraint comes from addrlib. Fixes: 69aadc49331 ("radeonsi: fix surf_pitch for subsampled surface") Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5314>
* ac/surface: set SCANOUT if surf->is_displayablePierre-Eric Pelloux-Prayer2020-06-101-0/+3
| | | | | | Fixes: ba10fb3f7f4 ("radeonsi: preserve the scanout flag for shared resources on gfx9 and gfx10") Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5314>
* 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>
* ac/nir: fix integer comparisons with pointersSamuel Pitoiset2020-06-101-0/+11
| | | | | | | | | | If we get a comparison between a pointer and an integer, LLVM complains if the operands aren't of the same type. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3085 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5397>
* 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>
* glsl: fix crash on glsl macro redefinitionAndrii Simiklit2020-06-101-0/+3
| | | | | | | | | | | | | | In case shader contains two equal macro defines, first one with trailing spaces and the second one without. `#define A 1 ` `#define A 1` The parser crashes Fixes: 0346ad37741b11d640c1c4970b275c1f0c7f9e75 ("glsl: ignore trailing whitespace when define redefined") Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Andrii Simiklit <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5312>
* anv/allocator: Compare to start_offset in state_pool_free_no_vgJason Ekstrand2020-06-091-3/+6
| | | | | | | | | | | | | | | | | In d11e4738a86ec, we started using a start_offset to allow us to allocate pools where the base address isn't at the start of the pool. This is useful for binding table pools which want to be relative to surface state base address (more or less), among other things. However, we had a bug where, if you have a negative offset, everything returned to the pool would end up being returned to the "back" of the pool. This isn't what we want for binding tables in the softpin world. This was causing us to never actually re-use any binding table blocks. How this passed CTS, I have no idea. Closes: #3100 Fixes: d11e4738a86ec "anv/allocator: Add a start_offset to anv_state_pool" Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5395>
* 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>
* radv/aco: enable shaderInt8 and VK_KHR_shader_float16_int8 on GFX6-GFX7Samuel Pitoiset2020-06-093-5/+3
| | | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* radv/aco: enable shaderInt16 on GFX6-GFX7Samuel Pitoiset2020-06-092-5/+5
| | | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* radv/aco: enable 8-bit/16-bit storage on GFX6-GFX7Samuel Pitoiset2020-06-093-10/+10
| | | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: remove unnecessary split- and create_vector instructions for subdword loadsDaniel Schürmann2020-06-091-79/+66
| | | | | | | This helps GFX6/7 by removing unnecessary shuffle code. Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: fix alignment of vectors with 4 elementsSamuel Pitoiset2020-06-091-2/+5
| | | | | | | | | | | | I think this case was just missing. This fixes a bunch of 16-bit storage related CTS failures like dEQP-VK.ssbo.phys.layout.single_basic_type.std430.u16vec4. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: implement 8-bit/16-bit conversions on GFX6-GFX7Samuel Pitoiset2020-06-091-13/+17
| | | | | | | | | | Use v_bfe to implement small bitsize conversions because the compiler probably optimizes this better. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: optimize packing of 16bit subdword registers on GFX6/7Daniel Schürmann2020-06-091-0/+51
| | | | | Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: skip partial copies on first iteration when lowering to hwDaniel Schürmann2020-06-091-27/+15
| | | | | | | | | | | | Helps some Detroit : Become Human shaders. Totals from affected shaders: (VEGA) Code Size: 47693912 -> 47670212 (-0.05 %) bytes Instructions: 9183788 -> 9177863 (-0.06 %) Copies: 910052 -> 904127 (-0.65 %) Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: coalesce copies more aggressively when lowering to hwDaniel Schürmann2020-06-091-0/+20
| | | | | | | | | | | | Helps some Detroit : Become Human shaders. Totals from affected shaders: (VEGA) Code Size: 9880420 -> 9879088 (-0.01 %) bytes Instructions: 1918553 -> 1918220 (-0.02 %) Copies: 177783 -> 177450 (-0.19 %) Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: add and use scratch SGPR to lower subdword p_create_vector on GFX6/7Daniel Schürmann2020-06-092-8/+25
| | | | | | | | | This is needed to lower some corner cases correctly, in case the same operand occurs multiple times: e.g. v0 = p_create_vector(v0[0:8], v0[0:8], v0[0:8], v0[0:8]) Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: adjust GFX6 subdword lowering workarounds for 8bitDaniel Schürmann2020-06-091-17/+21
| | | | | Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: Workarounds subdword lowering on GFX6/7Daniel Schürmann2020-06-091-0/+43
| | | | | | | | As there are no SDWA instructions, we need to take care not to overwrite the upper bits of other copy_operation's operands. Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: use full-register instructions to implement subdword packing on GFX6/7Daniel Schürmann2020-06-091-1/+25
| | | | | | | On GFX6/7, there are no SDWA instructions. Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: simplify statistics collection for copiesDaniel Schürmann2020-06-091-9/+5
| | | | | Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* aco: fix register assignment for p_create_vector on GFX6/7Daniel Schürmann2020-06-091-24/+32
| | | | | | | In case, some operand was already placed in the definition space, it could happen that it wasn't considered for live-range splits. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* 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>
* turnip: Expose robustBufferAccess.Eric Anholt2020-06-091-1/+1
| | | | | | | | It is a required device feature, and all enabled tests in dEQP-VK.robustness.* pass. Reviewed-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266>
* turnip: Fix crashes in compute with no descriptors to load.Eric Anholt2020-06-091-1/+3
| | | | | | | Found when trying to rebase cheza VK CI on top of this change. Fixes: 334204823eee ("tu: Fix context faults loading unused descriptor sets") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266>
* 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-096-2/+19
| | | | | 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-096-5/+23
| | | | | 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-092-4/+4
| | | | | 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-094-9/+51
| | | | | 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-092-8/+15
| | | | | 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/surface: add displayable DCC code for gfx10.3Marek Olšák2020-06-091-7/+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-098-17/+64
| | | | | 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-093-9/+12
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radeonsi: enable ARB_sparse_bufferMarek Olšák2020-06-091-4/+1
| | | | | | | | | This seems to be working now, but it wasn't working before. I don't know what fixed this. Tested on Raven and Navi14. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5402>
* tu: Fix context faults loading unused descriptor setsConnor Abbott2020-06-093-0/+28
| | | | | | | | | | | The app is allowed to never bind descriptor sets that are statically unused by the pipeline, which would've caused a context fault since CP_LOAD_STATE6 would try to load the descriptors that don't exist. Fix this by not preloading descriptors from unused descriptor sets. We could do more fine-grained accounting of which descriptors are used, but this is enough to fix the problem. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5400>
* i965: Work around incorrect usage of glDrawRangeElements in UE4Danylo Piliaiev2020-06-091-0/+20
| | | | | | | | | | | | | | | | | | | | | | | Unreal Engine 4 has a bug in usage of glDrawRangeElements, causing it to be called with a number of vertices in place of "end" parameter (which specifies the maximum array index contained in indices). Since there is unknown amount of games affected and we could not identify that a game is built with UE4 - we are forced to make a blanket workaround, disregarding max_index in range calculations. Fortunately all such calls look like: glDrawRangeElements(GL_TRIANGLES, 0, 3, 3, ...); So we are able to narrow down this workaround. This was uncovered after b684030c3a656ffdbc93581856034e0982db46fd broke a bunch of UE4 games. Cc: 20.1 <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2917 Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5203>
* tu: Rewrite flushing to use barriersConnor Abbott2020-06-094-154/+1049
| | | | | | | | | | | | | | | | | | | | | | Replace the various ad-hoc flushes that we've inserted, copied from freedreno, etc. with a unified system that uses the user-supplied information via vkCmdPipelineBarrier() and subpass dependencies. There are a few notable differences in behavior: - We now move setting RB_CCU_CNTL up a little in the gmem case, but hopefully that won't matter too much. This matches what the Vulkan blob does. - We properly implement delayed setting of events, completing our implementaton of events. - Finally, of course, we should be a lot less flush-happy. We won't emit useless CCU/cache flushes with multiple copies, renderpasses, etc. that don't depend on each other, and also won't flush/invalidate the cache around renderpasses unless we actually need to. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4964>