Eric Anholt
5ec3747fbe
freedreno/ir3: Use RESINFO for a6xx image size queries.
...
The closed GL driver uses resinfo on images with the writeonly flag (using
the texture-path's getsize only for readonly images). The closed vulkan
driver seems to use resinfo regardless. Using resinfo doesn't need any
fixups after the instruction. It also avoids one of the needs for the
TEX_CONST state for the image, which is awkward to set up in the GL
driver.
The new handler goes into ir3_a6xx to be next to the other current image
code, but the a4xx version is left in place because it wants a bunch of
sampler helpers.
Fixes assertion failure in dEQP-VK.image.image_size.buffer.readonly_32.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501 >
2020-05-26 18:17:46 +00:00
Eric Anholt
2ec4c53ef9
freedreno/ir3: Move handle_bindless_cat6 to compiler_nir and reuse.
...
There was an open coded version for ldc, and now we can drop that. I
needed to do it for resinfo as well.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501 >
2020-05-26 18:17:46 +00:00
Eric Anholt
2068b01430
freedreno/ir3: Refactor out IBO source references.
...
All the users of the unsigned result just wanted an ir3_instruction to
reference. Move a6xx's helpers to ir3_image.c and inline the old unsigned
results version.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501 >
2020-05-26 18:17:46 +00:00
Eric Anholt
00b9099dd5
freedreno: Set the immediate flag in a4/a5xx resinfos.
...
Noticed comparing our RESINFO asm to qcom's for the same test, and if I
drop this bit their disasm switches from immediate to reg. ldgb seems to
have the same behavior.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501 >
2020-05-26 18:17:46 +00:00
Eric Anholt
ae00da5ddb
freedreno: Fix resinfo asm, which doesn't have srcs besides IBO number.
...
In the process, clarify what's going on with the LDC/LDIB case.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501 >
2020-05-26 18:17:46 +00:00
Eric Anholt
c1cb75678d
freedreno: Add more resinfo/ldgb testcases.
...
Since I'm going to start using the resinfo opcode, make sure we can disasm
the blob's instances of it that I've found. And, since resinfo disasm
will impact ldgb on pre-a6xx, include some of those too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501 >
2020-05-26 18:17:46 +00:00
Eric Anholt
5d4a911d8c
freedreno: Fix printing of unused src in disasm of cat6 RESINFO.
...
Compare to QC's disasm right next to ours, and we clearly had an extra src
that wouldn't make sense.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501 >
2020-05-26 18:17:46 +00:00
Eric Anholt
4f02b48071
freedreno/a6xx: Fix the size of buffer image views.
...
We were using the size of the underlying buffer (in R8 elements), while we
need to be using the size of the image view (which may be a subset of the
underlying buffer, and may be in a different format from R8).
This fix means less dereferencing off of the end of shader image views for
buffer images, but more importantly is needed to get the right answer from
resinfo if we are to switch to that.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501 >
2020-05-26 18:17:46 +00:00
Connor Abbott
3987e25c03
tu: Add missing storage image/texel buffer bits
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5122 >
2020-05-26 11:16:09 +00:00
Connor Abbott
439a4ac025
tu: Respect VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
...
This came up with some image tests that are enabled by the next commit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5122 >
2020-05-26 11:16:09 +00:00
Connor Abbott
08d22bb908
tu: Fix IBO descriptor for cubes
...
They act the same as 2D arrays when used as storage images, and we're
supposed to override the IBO descriptor to reflect this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5122 >
2020-05-26 11:16:09 +00:00
Marcin Ślusarz
f7ab9c4eb1
glsl: cleanup vertex shader input checks
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5133 >
2020-05-26 10:15:17 +00:00
Marcin Ślusarz
e89d34aaca
glsl_to_tgsi: add fallthrough comments
...
All those cases are supposed to hit an assert in ir_binop_bit_or case.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5133 >
2020-05-26 10:15:17 +00:00
Marek Olšák
38a4b86145
radeonsi/gfx10: implement most performance counters
...
PAL has all of them.
GE perf counters don't work - no idea why.
I only tested the few that I like to use.
There is no documentation, though most of the enums had already been
in the headers.
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184 >
2020-05-26 06:00:54 -04:00
Marek Olšák
2a3806ffa3
amd: replace SH -> SA (shader array) in comments
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184 >
2020-05-26 06:00:54 -04:00
Marek Olšák
2cf46f2e3d
ac/gpu_info: replace num_good_cu_per_sh with min/max_good_cu_per_sa
...
Perf counters use the new max number.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184 >
2020-05-26 06:00:54 -04:00
Marek Olšák
8c3fe285c9
radeonsi: don't hardcode most perf counter block counts
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184 >
2020-05-26 06:00:54 -04:00
Erik Faye-Lund
f3c1833b77
docs/features: mark GL_ARB_texture_multisample as done for zink
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5159 >
2020-05-26 07:55:17 +00:00
Erik Faye-Lund
cd1639cbe3
zink: expose PIPE_CAP_TEXTURE_MULTISAMPLE
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5159 >
2020-05-26 07:55:17 +00:00
Erik Faye-Lund
4f90e818c8
zink: implement nir_texop_txf_ms
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5159 >
2020-05-26 07:55:17 +00:00
Gert Wollny
caa83e4d79
r600/sfn: remove debug output leftover
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187 >
2020-05-26 06:17:42 +00:00
Gert Wollny
cead23cb8a
r600/sfn: Correctly update the number of literals when forcing a new
...
group
When forcing a new instruction group by adding a ALU_OP_NOP, the
literals for the instruction that triggered this must be taken into
account for the next group, so update the number of literals
accordingly.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187 >
2020-05-26 06:17:42 +00:00
Gert Wollny
12381a0410
r600/sfn: use modern c++ in printing LDS read instruction
...
Closes #3021
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187 >
2020-05-26 06:17:42 +00:00
Gert Wollny
eccf939b6f
r600/sfn: Fix mapping for f32tof64 and f64tof32
...
We define the mapping based on the vector unit opcode.
Closes #3013
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187 >
2020-05-26 06:17:42 +00:00
Gert Wollny
901793d558
r600: Fix duplicated subexpression in r600_asm.c
...
Fixes: 4422ce1b04
r600: force new CF with TEX only if any texture value is written
Closes #3012
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187 >
2020-05-26 06:17:42 +00:00
Rob Clark
ceab349483
freedreno/drm: disallow exported buffers in bo cache
...
Otherwise we can MADVISE(WONTNEED) a bo that someone else is still
using. We already handled that in the dma-buf and flink-name export
paths.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5204 >
2020-05-25 20:47:24 +00:00
Vinson Lee
1241f8cb4c
r600/sfn: Use correct setter method.
...
Fix warning reported by Coverity Scan.
Useless call (USELESS_CALL)
side_effect_free: Calling v->pin_to_channel() is only useful for its
return value, which is ignored.
Fixes: 5d10e3ec60
("r600/nir: Pin interpolation results to channel")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5197 >
2020-05-25 20:34:36 +00:00
Erik Faye-Lund
ed1fd7bcc6
zink: pass batch instead of context for queries
...
This makes things a bit more consistent IMO.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141 >
2020-05-25 20:20:49 +00:00
Erik Faye-Lund
43c691b5b0
zink: do not dig into resource for nr_samples
...
The pipe_surface also know this, so no point in digging so deep.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141 >
2020-05-25 20:20:49 +00:00
Erik Faye-Lund
e38513e828
zink: use samples from state
...
There's no reason to compute this, when it's already passed in.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141 >
2020-05-25 20:20:49 +00:00
Alyssa Rosenzweig
fcbc022787
nir: Add un/pack_32_4x8 opcodes
...
Complement the existing un/pack_32_2x16 opcodes. These are useful for
8-bit format packing. On Midgard, they are equivalent to just a 32-bit
move, but other GPUs could lower to other packs if needed.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5107 >
2020-05-25 20:03:52 +00:00
Dmitriy Nester
46d5b07c5c
util: delete fnv1a hash function
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2405
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Dmitriy Nester
bf4d652f3f
zink: replace fnv1a hash function with xxhash
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Dmitriy Nester
33fd35e2d3
r600: replace fnv1a hash function with xxhash
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Dmitriy Nester
387176829b
util/hash_table: replace fnv1a hash function with xxhash
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Dmitriy Nester
013df58498
i965: replace fnv1a hash function with xxhash
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Dmitriy Nester
edd62619a1
freedreno: replace fnv1a hash function with xxhash
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Dmitriy Nester
0e9af02323
nir: replace fnv1a hash function with xxhash
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Alyssa Rosenzweig
1d647b1c48
panfrost: Only run batch debug when specifically asked
...
It's expensive and in a hot path; even for general debug builds we won't
need this, only if we're specifically hacking on batch code.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5202 >
2020-05-25 16:01:18 +00:00
Alyssa Rosenzweig
4c5d1e2860
panfrost: Add debug print before query flushes
...
Just so we know if they're happening.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5202 >
2020-05-25 16:01:18 +00:00
Bas Nieuwenhuizen
be784cc77b
radv: Implement vkGetSwapchainGrallocUsage2ANDROID.
...
This was implemented in version 6 of the VK_ANDROID_native_buffer
extension and we only implement version 5. However, the Android
Vulkan loader only checks whether vkGetInstanceProcAddr for the
function is not NULL.
This all went wrong when we switched to the layer code from ANV.
Because the function may now be different per device, it adds fallback
functions that dispatch to the dispatch table. So if we didn't implement
the function we still returned a pointer to the dispatch function,
which made the Android Vulkan loader believe it was supported.
Dispatch functions:
d555794f30/src/amd/vulkan/radv_entrypoints_gen.py (L328)
Fixes: d555794f30
"radv: update entrypoints generation from ANV"
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2936
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5198 >
2020-05-25 15:34:44 +00:00
Simon Ser
9a74746bd1
EGL: sync headers with Khronos
...
Taken from EGL-Registry commit 90b78b0662e2f0548cfd1926fb77bf628933541b.
With this update EGL_WL_bind_wayland_display and
EGL_WL_create_wayland_buffer_from_image are now in the registry, so we
don't need to define them in eglmesaext.h anymore.
The eglSwapBufferWithDamage* functions now take a const rects argument.
The eglapi.c function signature is updated accordingly.
Signed-off-by: Simon Ser <contact@emersion.fr >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4953 >
2020-05-25 14:06:38 +00:00
Danylo Piliaiev
045267d1e6
st/mesa: Clear texture's views when texture is removed from Shared->TexObjects
...
If texture is shared between several contexts, calling glDeleteTextures
will remove it from ctx->Shared->TexObjects - which makes impossible for
contexts, when destroyed, to release their views to this texture. Which
leaves dangling pointers to destroyed contexts.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2960
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5106 >
2020-05-25 12:32:16 +00:00
Bas Nieuwenhuizen
a51ab5f956
radv: Do not close fd -1 when NULL-winsys creation fails.
...
Fixes: cd6ec2b1ab
"radv: implement a dummy winsys for creating devices without AMDGPU"
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181 >
2020-05-25 11:12:07 +00:00
Bas Nieuwenhuizen
cd0c5b64cc
radv: Remove dead code.
...
pool is always non-NULL, and is also accessed before this check
in the function, so remove the pool = NULL case.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181 >
2020-05-25 11:12:07 +00:00
Bas Nieuwenhuizen
cd61f5234d
radv: Handle failing to create .cache dir.
...
Fixes: f4e499ec79
"radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181 >
2020-05-25 11:12:07 +00:00
Bas Nieuwenhuizen
906435fb0e
radv/winsys: Remove extra sizeof multiply.
...
The pointer is already uint64_t*, so the sizeof was too much ...
Fixes: eeff7e1154
"radv: Add userspace fence buffer per context."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181 >
2020-05-25 11:12:07 +00:00
Michel Dänzer
6c99de98ec
gitlab-ci: Enable -Werror in meson-s390x
job
...
It's warning-clean.
v2:
* Prevent -Werror from being enabled in `meson-ppc64le` job as well
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5185 >
2020-05-25 08:49:25 +00:00
Samuel Pitoiset
b3c0f82841
radv: advertise VK_AMD_texture_gather_bias_lod
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5147 >
2020-05-25 08:51:10 +02:00
Samuel Pitoiset
2e265b94a2
radv: add support for querying which formats support texture gather LOD
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5147 >
2020-05-25 08:51:10 +02:00