aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* turnip: drop linking libfreedreno_drmRob Clark2020-06-151-1/+0
| | | | | | | Now that it is no longer required. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5476>
* freedreno/ir3: move the libdrm dependency out of shared codeRob Clark2020-06-153-19/+45
| | | | | | | | | | | | | The only reason for this dependency was the fd_bo used for the uploaded shader. But this isn't used by turnip. Now that we've unified the cleanup path from gallium, it isn't hard to pull the fd_bo upload/free parts into ir3_gallium. This cleanup has the added benefit that the shader disk-cache will not have to deal with it. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5476>
* freedreno/ir3: unify shader create/delete pathsRob Clark2020-06-155-10/+9
| | | | | | | | | In particular, to move the fd_bo create/delete (which is unneeded by turnip) out of the shared ir3 code, it is useful to have a single delete path. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5476>
* zink: rework input/output location emissionMike Blumenkrantz2020-06-151-55/+107
| | | | | | | | | | | | | | | | glsl builtins that have no analog in spirv are emitted as regular varyings, which means they take up a slot. we need to ensure that there's no conflict between these regular varying slots (from user-defined varyings) and the glsl translated builtins, so we do that by "reserving" the max number of varying slots that can be used by a given stage, then remapping all glsl builtins with no spirv builtin to a packed layout location that can be consistent across stages sort of addresses mesa/mesa#3113 except now there's 10 fewer varying slots Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5432>
* zink: handle more glsl->spirv builtin translationMike Blumenkrantz2020-06-151-14/+22
| | | | | | | | this should be all of them, though the check for vertex shader stage needs to be changed to !fragment stage at some point Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5432>
* spirv: fix using OpSampledImage with OpUndef instead of OpType{Image,Sampler}Samuel Pitoiset2020-06-151-4/+22
| | | | | | | | | | | | | | This seems valid per the SPIR-V spec to use OpSampledImage with OpUndef instead of OpTypeImage or OpTypeSampler. When the image operand is undefined, SPIRV->NIR emits an undef instruction that can be removed later by the compiler. This fixes shader compilation crashes with Red Dead Redemption II. Cc: [email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5230>
* pan/mdg: Precolour blend inputsAlyssa Rosenzweig2020-06-155-5/+26
| | | | | | | | | | | | | | | | | | | Instead of requiring an explicit unoptimized move, we can implicitly colour the blend input intrinsic to r0, where it will be preloaded; this is a simple task for RA, and does not conflict with anything. If there are multiple duplicate loads, the latter ones can just be simple moves which will be copypropped. We don't need to include a explicit synthetic load, since (scanning backwards) the read will cause the input to become live at the right time and the lack of an explicit write will keep it live from the beginning of the shader. So no need to make it more complicated than it needs to be. Saves a cycle in blend shaders. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5449>
* nvir: don't use designated initialisers in C++ codeYevhenii Kolesnikov2020-06-151-100/+100
| | | | | | | | | | | This feature only available since C++20. Fixes: fa0a241b335 ("nvir/nir: move nir options to codegen") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3114 Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5430>
* ac: add ac_choose_spi_color_formats() to common codeSamuel Pitoiset2020-06-154-221/+147
| | | | | | | | It's similar between RADV and RadeonSI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5436>
* freedreno/ir3: fix ir3_nir_move_varying_inputsJonathan Marek2020-06-141-10/+5
| | | | | | | | | | | | | | ir3_nir_move_varying_inputs is broken when there a load input outside of the first block which depends on the result of a previous load input. This simplification/rework avoids the problem, and should also be faster. Fixes this dEQP-VK test: dEQP-VK.pipeline.multisample_interpolation.offset_interpolate_at_pixel_center.128_128_1.samples_2 Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5465>
* intel/tools: make test aware of the meson test wrapperEric Engestrom2020-06-131-7/+32
| | | | | | | Suggested-by: Dylan Baker <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5155>
* intel/tools: rewrite run-test.sh in pythonEric Engestrom2020-06-133-40/+69
| | | | | | | | | | | | | | Old script created files in the source directory, which is generally considered bad form. The rewrite to python instead of duct-taping around in the shell script goes towards the goal of only having cross-platform python scripts, which is also harder to make mistakes in than shell scripts. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Sagar Ghuge <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5155>
* radv: update internal referenceErik Faye-Lund2020-06-131-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4630>
* iris: drop dead #include "config.h"Eric Engestrom2020-06-131-4/+0
| | | | | | | | | | There hasn't been a config.h in a long time (it was an artifact of the autotool build). Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5350>
* i965: drop dead #include "config.h"Eric Engestrom2020-06-131-4/+0
| | | | | | | | | | There hasn't been a config.h in a long time (it was an artifact of the autotool build). Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5350>
* intel/genxml: replace gen_sort_tags.py MIT licence with SPDX equivalentEric Engestrom2020-06-131-20/+1
| | | | | | | | Much more readable with the same information :) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5362>
* intel/genxml: drop python 2 support for gen_sort_tags.pyEric Engestrom2020-06-131-4/+1
| | | | | | | | | Python 2 is dead and this script is only run by devs, all of which have had python3 available for basically forever. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5362>
* v3d: add missing unlock() in error pathEric Engestrom2020-06-131-1/+2
| | | | | | | | | CoverityID: 1435701 Fixes: e5a81ac70431502bc592 ("broadcom/vc5: Don't forget to get the BO offset when opening a dmabuf.") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5263>
* turnip: remove some dead/redundant codeJonathan Marek2020-06-138-540/+35
| | | | | | | A bit of cleanup to reduce noise in the codebase. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5447>
* panfrost: Tiled to linear layout conversionIcecream952020-06-122-8/+51
| | | | | | | | | | | | | | | | | | Tiling is expensive, so this patch converts textures that appear to be used for streaming to a linear layout. Performance of mpv is significantly improved, with software-decoded 1080p mp4 playback on RK3288 going from 30fps to 50fps when testing with `--untimed --no-audio`. To keep things simple, conversion only happens when updating the whole texture and no mipmapping is used. v2: Make it clear that the heuristic doesn't rely on a texture being uninitialized, since layout switching code can get confusing (Alyssa). Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4628>
* panfrost: Create a new sampler view bo when the layout changesIcecream952020-06-123-3/+21
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4628>
* panfrost: Move sampler view bo creation to a separate functionIcecream952020-06-122-40/+53
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4628>
* intel/compiler: Drop opt_sampler_eot()Matt Turner2020-06-122-101/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gen9 and Cherryview have the ability to mark texture instructions with the End-of-thread bit under some conditions, which allows the texture result to be written to the render target directly, rather than returning to the EU. In order to handle overlapping primitives correctly, we have to use the 'sendc' instruction which stalls until other threads potentially writing to the same locations in the render target are retired. Unfortunately, this stall happens before the texture is sampled (rather than in parallel with stall), so for some literal edge cases (like the diagonal edge between two triangles forming a rectangle) there can be a performance penalty. As a result, it's probably not a good idea to use this optimization in general. I had planned to leave it enabled only for BLORP, where we use rectangle primitives and are typically clearing/blitting an entire render target without any overlapping primitives, but I noticed that the optimization wasn't applied in some normal cases anyway. For example, in the piglit test tests/shaders/glsl-fs-texture2d-bias.shader_test it is applied to one BLORP-blit shader but not another due to some kind of mishandling of register types (the destination register type of the texture operation is UD while the color source of the render target write is F). Additionally the instruction scheduler assumed that the combined texture and render target write operation took 0 cycles, leading to cycle estimates that are wildly inaccurate. Since the optimization was not implemented for SIMD32 and our decision whether to use the SIMD32 program is made by comparing the estimated performance with that of the SIMD16 shader, we wrongly threw out a bunch of SIMD32 programs that are likely profitable. total cycles in shared programs: 472807891 -> 473784245 (0.21%) cycles in affected programs: 108277 -> 1084631 (901.72%) helped: 0 HURT: 1290 total sends in shared programs: 998955 -> 1000245 (0.13%) sends in affected programs: 1400 -> 2690 (92.14%) helped: 0 HURT: 1290 LOST: 0 GAINED: 33 This patch shows no performance changes in Intel's Mesa performance CI. Given the problems, the lack of evidence that the pass improves performance, and the fact that the hardware feature was removed from subsequent GPU generations, I think that the pass is not valuable and should be removed. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5412>
* pan/mdg: Prefer type over regmode for schedule constraintsAlyssa Rosenzweig2020-06-121-2/+2
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5443>
* pan/mdg: Analyze types for 64-bitness in RAAlyssa Rosenzweig2020-06-121-1/+15
| | | | | | | Instead of reg_mode. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5443>
* pan/mdg: Explicitly type 64-bit uniform movesAlyssa Rosenzweig2020-06-121-0/+2
| | | | | | | Instead of relying on reg_mode. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5443>
* turnip: add emit renderpass cache flushes for sysmem 3D CmdClearAttachmentsJonathan Marek2020-06-123-1/+8
| | | | | | | This clear path behaves like a draw, it needs the same flush as tu_draw. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5426>
* turnip: add layered 3D path clear for CmdClearAttachmentsJonathan Marek2020-06-122-42/+142
| | | | | | | | | | | | | | | This fixes cases where the 3D path is used with layered rendering. Fixes dEQP-VK.renderpass.suballocation.multisample_resolve.layers* failures Note the blob's 3D fallback path behaves differently, and uses the framebuffer information to clear each layer individually (changing the MRT state each time). But that's not possible in all cases, and the blob fails to clear properly in dEQP-VK.geometry.layered.*.secondary_cmd_buffer cases. So this clear path is not based on the blob's behavior. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5426>
* turnip: share code between 3D blit/clear path and tu_pipelineJonathan Marek2020-06-124-135/+108
| | | | | | | | Instead of filling out registers manually, fill out ir3 structs and re-use code from tu_pipeline. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5426>
* turnip: pipeline program state refactorJonathan Marek2020-06-121-339/+217
| | | | | | | | | | | | This refactor simplifies things a bit, and will make it easier to share some logic with tu_clear_blit (see next patches). This changes the order in which some things are emitted, and emits less for disabled shader stages. There's also as extra write to SP_GS_PRIM_SIZE that is removed. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5426>
* panfrost: Demote mediump varyings to fp16Alyssa Rosenzweig2020-06-121-2/+16
| | | | | | | Likewise lowp. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Override varying format to minimal precisionAlyssa Rosenzweig2020-06-121-5/+22
| | | | | | | Spec allows this! Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Use shader_info harderAlyssa Rosenzweig2020-06-122-18/+5
| | | | | | | We already have this metadata.. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Only store varying formatsAlyssa Rosenzweig2020-06-123-53/+10
| | | | | | | This reduces linking complexity. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Allow R/RG/RGB varyingsAlyssa Rosenzweig2020-06-122-4/+15
| | | | | | | This can be a bandwidth savings. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Remove unused routinesAlyssa Rosenzweig2020-06-121-51/+0
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Use new varying linkingAlyssa Rosenzweig2020-06-121-227/+54
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Add high-level varying emitAlyssa Rosenzweig2020-06-121-0/+94
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Add helper to determine if we are capturingAlyssa Rosenzweig2020-06-121-0/+15
| | | | | | | That is, is the varying setup for xfb *and* is there a buffer for it? Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Emit xfb recordsAlyssa Rosenzweig2020-06-121-0/+45
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Emit special varyingsAlyssa Rosenzweig2020-06-121-0/+18
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Emit unlinked varyingsAlyssa Rosenzweig2020-06-121-0/+30
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Determine varying buffer presenceAlyssa Rosenzweig2020-06-121-0/+39
| | | | | | | | Essentially the same logic as before, but the assumptions are much more explicit. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Introduce bitfields for tracking varyingsAlyssa Rosenzweig2020-06-121-0/+43
| | | | | | | | | | Rather than having all sorts of random state flyng about with varying emission, we can use a simple present mask and general stride to encode everything we need for non-XFB cases, and layer XFB on top easily enough. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Add panfrost_streamout_offset helperAlyssa Rosenzweig2020-06-121-0/+7
| | | | | | | | Calculates the bias required for an xfb record in the src_offset field to account for truncating the address to force alignment. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Calculate varying size by formatAlyssa Rosenzweig2020-06-122-0/+28
| | | | | | | Will enable <16-byte varyings. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* pan/mdg: Avoid fusing ld_vary_16 with non-zero componentAlyssa Rosenzweig2020-06-121-0/+5
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* aco: fix shared subdword loadsDaniel Schürmann2020-06-121-1/+1
| | | | | | | | | Shared subdword loads don't need byte alignment as they are split into multiple loads if necessary. Fixes: 5cde4989d3c8c25b0ba2a11ec450625e30092b16 ('aco: remove unnecessary split- and create_vector instructions for subdword loads') Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5441>
* radv: enable radv_enable_mrt_output_nan_fixup for RAGE 2Samuel Pitoiset2020-06-121-0/+4
| | | | | | | | | To fix game artifacts. It's always sad to have to fix game bugs inside drivers ... Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5359>
* radv/llvm: implement radv_enable_mrt_output_nan_fixup workaroundSamuel Pitoiset2020-06-121-0/+24
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5359>