Timothy Arceri
bc79442f3f
nir: add glsl_get_ifc_packing() helper
...
This will be used in the following patch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797 >
2020-06-03 02:22:23 +00:00
Alyssa Rosenzweig
7ac617c117
pan/mdg: Don't double-replicate blend on T720
...
We already do this unconditionally in NIR.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5305 >
2020-06-03 00:32:24 +00:00
Bas Nieuwenhuizen
edd56bad94
radv: Use common gfx10_format_table.h
...
Save some python code and build time, as well as some code duplication.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291 >
2020-06-03 00:17:00 +00:00
Bas Nieuwenhuizen
560f095dd5
radv: Include gfx10_format_table.h only from a single source file.
...
The radeonsi variant has everything in the header, so lets not
include it everywhere.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291 >
2020-06-03 00:17:00 +00:00
Bas Nieuwenhuizen
b351a50763
radeonsi: Define gfx10_format in the common header.
...
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 <marek.olsak@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291 >
2020-06-03 00:17:00 +00:00
Bas Nieuwenhuizen
c98e52f88a
amd/common,radeonsi: Move gfx10_format_table to common.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291 >
2020-06-03 00:17:00 +00:00
Bas Nieuwenhuizen
d936f69677
radeonsi: Explicitly map Z16_UNORM_S8_UINT to None for GFX10.
...
We should always use separate planes for textures with this format.
Fixes: 273ead81f1 "util/format: Add VK_FORMAT_D16_UNORM_S8_UINT."
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291 >
2020-06-03 00:17:00 +00:00
Daniel Stone
415c88eebc
Revert "CI: Disable Panfrost T720/T760"
...
Switches have been rewired, VLANs have been reconfigured, network
elements with non-functional remote management have been removed from
racks and thrown on desks in anger.
This reverts commit ae6e1aee7d1bd49ae494b8a25ca33d092a3a145a.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5301 >
2020-06-02 23:16:05 +00:00
Christian Gmeiner
2dfc241e36
ci: bare-metal: make it possible to use a script for serial
...
Makes it possible to use e.g. a ser2net script to talk to the devices.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5268 >
2020-06-02 22:20:46 +00:00
Erik Faye-Lund
a21966837a
zink: Use store_dest_raw instead of storing an uint
...
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: 16339646f0 ("zink/spirv: rename functions a bit")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5250 >
2020-06-02 21:45:30 +00:00
Oschowa
c310677a75
radv: Explicitly cast TIMESTAMP_NOT_READY value to uin32_t where needed.
...
Fixes a clang warning.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228 >
2020-06-02 21:31:17 +00:00
Oschowa
663e8cb4e6
aco: Use correct reference type in for-range-loop.
...
Fixes a clang warning.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228 >
2020-06-02 21:31:17 +00:00
Oschowa
7b1bc460fd
aco: Don't std::move temporary object.
...
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 <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228 >
2020-06-02 21:31:17 +00:00
Oschowa
536339b0dd
aco: Don't declare 'Block' as class, but define as struct.
...
Fixes clang warnings.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228 >
2020-06-02 21:31:17 +00:00
Oschowa
c2a778ef0f
radv: Don't take absolute value of unsigned type.
...
Fixes clang warnings.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228 >
2020-06-02 21:31:17 +00:00
Timur Kristóf
7d2fe60f1c
radv/aco: Always enable subgroup shuffle.
...
It is now supported by both backends on all hw.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223 >
2020-06-02 21:12:13 +00:00
Timur Kristóf
045c9ffa7d
aco: Implement subgroup shuffle on GFX6-7.
...
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 <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223 >
2020-06-02 21:12:12 +00:00
Timur Kristóf
14a5021aff
aco/gfx10: Refactor of GFX10 wave64 bpermute.
...
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 <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223 >
2020-06-02 21:12:12 +00:00
Marek Olšák
fe3947632c
radeonsi: add a hack to disable TRUNC_COORD for shadow samplers
...
This fixes dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dshadow_vertex.
This is probably a dEQP bug.
Fixes: d573d1d825
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209 >
2020-06-02 20:47:49 +00:00
Marek Olšák
85a6bcca61
radeonsi: pass at most 3 images and/or shader buffers via user SGPRs for compute
...
This should slightly decrease shader lifetime.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209 >
2020-06-02 20:47:49 +00:00
Marek Olšák
877c56bfdc
radeonsi: remove const_buffers_declared hacks
...
This was a bug that was uncovered by 4553fc66a5 .
Piglit: spec@arb_uniform_buffer_object@maxblocks
Fixes: 4553fc66a5
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209 >
2020-06-02 20:47:49 +00:00
Marek Olšák
ce4575b3b5
radeonsi: remove unused leftover code for INDIRECT_BUFFER inside IBs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209 >
2020-06-02 20:47:49 +00:00
Marek Olšák
cac24bee62
nir: gather which images are MSAA
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209 >
2020-06-02 20:47:49 +00:00
Marek Olšák
6503e4be13
nir: gather which images are buffers
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209 >
2020-06-02 20:47:49 +00:00
Marek Olšák
f8ef15c061
nir: don't count samplers and images in interface blocks
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209 >
2020-06-02 20:47:49 +00:00
Marek Olšák
c6c8a9bd55
ac/nir: support v2f16 derivatives
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
7c423dd721
ac/nir: set the second v_cvt_pkrtz argument to undef if it's unused
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
bfb95725aa
ac/nir: select v_cvt_pkrtz for all conversions from f32 to f16 for radeonsi
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
1d80015eaf
ac/nir: handle nir_op_[fiu]2[fiu]mp opcodes
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
70b6d54011
ac/nir: support 16-bit data in image opcodes
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
c3e0ba52a0
ac/nir: support 16-bit data in buffer_load_format opcodes
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
b819ba949b
ac/nir: remove type and num_channels args from ac_build_buffer_store_common
...
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 >
2020-06-02 16:29:25 -04:00
Marek Olšák
b98df7bf50
ac/nir: support vector types in the type suffix of overloaded intrinsics
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
e5ea87cde8
ac/nir: use more types from ac_llvm_context
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
116ec85012
ac: rename has_double_rate_fp16 -> has_packed_math_16bit
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003 >
2020-06-02 16:29:25 -04:00
Marek Olšák
1af8fe4ed5
gallium: add shader caps INT16 and FP16_DERIVATIVES
...
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
733bee57eb
glsl: lower samplers with highp coordinates correctly
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
0c0803c32f
glsl: lower the precision of imageLoad
...
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
1192989533
glsl: lower mediump partial derivatives
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
6fe20ebaaa
glsl: lower mediump integer types to int16 and uint16
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
a052a9c277
glsl: handle int16 and uint16 types and add instructions for mediump
...
v2: add more changes to ir_validate.cpp
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
9c14a87839
glsl: treat lowp as mediump when lowering builtins
...
This seems to have been missed.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
116e006693
nir: add options::vectorize_vec2_16bit to limit vectorization to vec2 16
...
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 <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
a6916d1ce8
nir: fix lower_wpos for 16-bit fddy
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
92333c6d1a
nir: lower int16 and uint16 in nir_lower_mediump_outputs
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
6f2e95f24d
nir: add int16 and uint16 type helpers
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Marek Olšák
f798513f91
nir: add i2imp and u2ump opcodes for conversions to mediump
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Alyssa Rosenzweig
f3310cb3e1
nir: Fold f2f16(b2f32(x)) to b2f16(x)
...
By definition.
This reduces register pressure on freedreno so that the noubo expected
failure goes away.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002 >
2020-06-02 20:01:18 +00:00
Eric Engestrom
d32144602c
meson: remove "empty array"/"array of an empty string" confusion
...
Until Meson 0.47, setting `-D arrayoption=` was not the same as setting
`-D arrayoption=[]`; the latter cleared the array, while the former
filled it with an empty string option.
Since Meson 0.47 [1], the former maps to the latter, so empty items can
only be set by explicitly giving an array containing an empty string,
ie. `-D arrayoption="['']"`; however note that this is *not* what we
want in any of the current Mesa code anyway.
This makes the code handling array options a bit more complicated, and
a lot more error-prone, so let's get rid of the confusion by removing
the empty-string option.
[1] f3a8f9c34d
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/386 >
2020-06-02 19:36:12 +00:00
Jonathan Marek
a2903dd767
turnip: fix RENDER_COMPONENTS value
...
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: 078aa9df8d ("tu: Move RENDER_COMPONENTS setting to pipeline state")
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5292 >
2020-06-02 18:42:09 +00:00