aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir: add callback to nir_remove_dead_variables()Timothy Arceri2020-06-0323-51/+78
| | | | | | | | | | | | This allows us to do API specific checks before removing variable without filling nir_remove_dead_variables() with API specific code. In the following patches we will use this to support the removal of dead uniforms in GLSL. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
* nir: add glsl_get_ifc_packing() helperTimothy Arceri2020-06-032-0/+8
| | | | | | | | This will be used in the following patch. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
* pan/mdg: Don't double-replicate blend on T720Alyssa Rosenzweig2020-06-031-21/+1
| | | | | | | We already do this unconditionally in NIR. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5305>
* radv: Use common gfx10_format_table.hBas Nieuwenhuizen2020-06-035-300/+5
| | | | | | | Save some python code and build time, as well as some code duplication. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
* radv: Include gfx10_format_table.h only from a single source file.Bas Nieuwenhuizen2020-06-032-12/+11
| | | | | | | | The radeonsi variant has everything in the header, so lets not include it everywhere. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
* radeonsi: Define gfx10_format in the common header.Bas Nieuwenhuizen2020-06-036-17/+55
| | | | | | | | | | | | | So we don't have to have multiple definitions of the struct when sharing with radv. While at it put the table properly in a C file so we don't have to deal with multiple definitions, and the struct definition isn't in generated source. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
* amd/common,radeonsi: Move gfx10_format_table to common.Bas Nieuwenhuizen2020-06-038-32/+32
| | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
* radeonsi: Explicitly map Z16_UNORM_S8_UINT to None for GFX10.Bas Nieuwenhuizen2020-06-031-0/+1
| | | | | | | | | We should always use separate planes for textures with this format. Fixes: 273ead81f1a "util/format: Add VK_FORMAT_D16_UNORM_S8_UINT." Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
* zink: Use store_dest_raw instead of storing an uintErik Faye-Lund2020-06-021-2/+1
| | | | | | | | | I cleaned up the other similar call-sites, but somehow missed this one. There's nothing different with this, so let's also fix this. Fixes: 16339646f03 ("zink/spirv: rename functions a bit") Reviewed-by: Mike Blumenkrantz <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5250>
* radv: Explicitly cast TIMESTAMP_NOT_READY value to uin32_t where needed.Oschowa2020-06-021-2/+2
| | | | | | | Fixes a clang warning. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>
* aco: Use correct reference type in for-range-loop.Oschowa2020-06-021-1/+1
| | | | | | | | Fixes a clang warning. Reviewed-by: Rhys Perry <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>
* aco: Don't std::move temporary object.Oschowa2020-06-021-1/+1
| | | | | | | | | | | Fixes the following clang warning: mesa/src/amd/compiler/aco_optimizer.cpp:2928:15: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] ctx.uses = std::move(dead_code_analysis(program)); Reviewed-by: Rhys Perry <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>
* aco: Don't declare 'Block' as class, but define as struct.Oschowa2020-06-021-1/+1
| | | | | | | | Fixes clang warnings. Reviewed-by: Rhys Perry <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>
* radv: Don't take absolute value of unsigned type.Oschowa2020-06-021-2/+2
| | | | | | | Fixes clang warnings. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>
* radv/aco: Always enable subgroup shuffle.Timur Kristóf2020-06-021-8/+3
| | | | | | | | It is now supported by both backends on all hw. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223>
* aco: Implement subgroup shuffle on GFX6-7.Timur Kristóf2020-06-022-2/+46
| | | | | | | | | | | | | | GFX6 and GFX7 don't have the ds_bpermute (or permute) instruction, but we would like to support subgroup shuffle on these old GPUs. So we introduce a new pseudio instruction which will be lowered to an "unrolled loop" that emulates bpermute on GFX6 and GFX7 using readlane instructions, while also respecting the exec mask thanks to v_cmpx. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223>
* aco/gfx10: Refactor of GFX10 wave64 bpermute.Timur Kristóf2020-06-027-92/+113
| | | | | | | | | | | The emulated GFX10 wave64 bpermute no longer needs a linear_vgpr, so we don't consider it a reduction anymore. Additionally, the code is slightly reorganized in preparation for the GFX6 emulated bpermute. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223>
* radeonsi: add a hack to disable TRUNC_COORD for shadow samplersMarek Olšák2020-06-021-1/+2
| | | | | | | | | | | This fixes dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dshadow_vertex. This is probably a dEQP bug. Fixes: d573d1d82524b8a2e5f56938069cabc0f0176a0e Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
* radeonsi: pass at most 3 images and/or shader buffers via user SGPRs for computeMarek Olšák2020-06-028-3/+130
| | | | | | | This should slightly decrease shader lifetime. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
* radeonsi: remove const_buffers_declared hacksMarek Olšák2020-06-021-3/+1
| | | | | | | | | | | This was a bug that was uncovered by 4553fc66a5f23607c2e872d8ac8755c747bd0bd2. Piglit: spec@arb_uniform_buffer_object@maxblocks Fixes: 4553fc66a5f23607c2e872d8ac8755c747bd0bd2 Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
* radeonsi: remove unused leftover code for INDIRECT_BUFFER inside IBsMarek Olšák2020-06-022-16/+1
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
* nir: gather which images are MSAAMarek Olšák2020-06-024-10/+8
| | | | | | Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
* nir: gather which images are buffersMarek Olšák2020-06-022-1/+14
| | | | | | Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
* nir: don't count samplers and images in interface blocksMarek Olšák2020-06-022-4/+13
| | | | | | Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
* ac/nir: support v2f16 derivativesMarek Olšák2020-06-021-0/+2
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac/nir: set the second v_cvt_pkrtz argument to undef if it's unusedMarek Olšák2020-06-021-1/+1
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac/nir: select v_cvt_pkrtz for all conversions from f32 to f16 for radeonsiMarek Olšák2020-06-021-7/+36
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac/nir: handle nir_op_[fiu]2[fiu]mp opcodesMarek Olšák2020-06-021-0/+3
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac/nir: support 16-bit data in image opcodesMarek Olšák2020-06-023-6/+18
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac/nir: support 16-bit data in buffer_load_format opcodesMarek Olšák2020-06-025-7/+18
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac/nir: remove type and num_channels args from ac_build_buffer_store_commonMarek Olšák2020-06-024-19/+7
| | | | | | | They were only used for type overloading where we can just use the type of data. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac/nir: support vector types in the type suffix of overloaded intrinsicsMarek Olšák2020-06-022-13/+17
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac/nir: use more types from ac_llvm_contextMarek Olšák2020-06-024-17/+15
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* ac: rename has_double_rate_fp16 -> has_packed_math_16bitMarek Olšák2020-06-025-11/+11
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* gallium: add shader caps INT16 and FP16_DERIVATIVESMarek Olšák2020-06-0221-3/+54
| | | | | Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* glsl: lower samplers with highp coordinates correctlyMarek Olšák2020-06-022-6/+50
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* glsl: lower the precision of imageLoadMarek Olšák2020-06-023-6/+125
| | | | | | Acked-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* glsl: lower mediump partial derivativesMarek Olšák2020-06-024-6/+37
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* glsl: lower mediump integer types to int16 and uint16Marek Olšák2020-06-027-53/+837
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* glsl: handle int16 and uint16 types and add instructions for mediumpMarek Olšák2020-06-0212-73/+445
| | | | | | | | v2: add more changes to ir_validate.cpp Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* glsl: treat lowp as mediump when lowering builtinsMarek Olšák2020-06-021-2/+4
| | | | | | | | This seems to have been missed. Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* nir: add options::vectorize_vec2_16bit to limit vectorization to vec2 16Marek Olšák2020-06-022-15/+28
| | | | | | | | for hardware that is scalar but can do 2 16-bit operations on low and high 16 bits of registers at once. Acked-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* nir: fix lower_wpos for 16-bit fddyMarek Olšák2020-06-021-2/+5
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* nir: lower int16 and uint16 in nir_lower_mediump_outputsMarek Olšák2020-06-021-24/+36
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* nir: add int16 and uint16 type helpersMarek Olšák2020-06-024-0/+46
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* nir: add i2imp and u2ump opcodes for conversions to mediumpMarek Olšák2020-06-022-6/+21
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* nir: Fold f2f16(b2f32(x)) to b2f16(x)Alyssa Rosenzweig2020-06-021-0/+2
| | | | | | | | | | | | | By definition. This reduces register pressure on freedreno so that the noubo expected failure goes away. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* turnip: fix RENDER_COMPONENTS valueJonathan Marek2020-06-022-5/+16
| | | | | | | | | | | | | | | | | | This fixes render_components being 0 when mrt_count=8, because shift by 32 is UB and in arm64 it ends up shifting by 0. This fixes tests with 8 MRTs. Fixes the 3d path sysmem CmdClearAttachments to set RENDER_COMPONENTS, as it was previously relying on tu6_emit_mrt setting it, but it is now part of the pipeline state. Also switch back to the previous behavior of not setting render components for VK_ATTACHMENT_UNUSED attachments: we don't update the MRT state for such attachments so we definitely don't want to be trying writing to those. Fixes: 078aa9df8daff60e52a66d8f ("tu: Move RENDER_COMPONENTS setting to pipeline state") Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5292>
* vulkan-overlay/meson: use install_data instead of configure_fileDylan Baker2020-06-011-5/+4
| | | | | | | | | | | | | We don't want to copy the file into the build directory, we want to install it. That's what install_data is for. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2924 Fixes: 56ccea58ae7f6fd56cf4a1697d2cceb68866b552 ("vulkan/overlay: Add basic overlay control script.") Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* meson: use 2 space not 3 space indentDylan Baker2020-06-011-31/+33
| | | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>