Rob Clark
5d217774f2
freedreno/ir3: Fix initial_variants_synchronous() condition
...
This was meant to be an || rather than &&, although it didn't matter for
shaderdb because both conditions would be true. But it did matter if
you were trying to force synchronous compile to avoid having nir/ir3
prints interleaved from multiple threads.
While at it, add a more specific debug flag to force initial variant
compile to be synchronous, because at some point the 'shaderdb' flag
itself will not force this.
Fixes: 75b0c4b5e1 ("freedreno/ir3: Async shader compile")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264 >
2021-02-25 20:09:44 +00:00
Rob Clark
1b2a35509e
freedreno: Fix think-o in fd_resource_wait()
...
Fixes: dabec19b05 ("freedreno: Add perf_debug logging for bo stalls")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264 >
2021-02-25 20:09:44 +00:00
Mauro Rossi
97b7786e6b
android: pan/bi: reorder static dependencies in gallium/dri
...
libpanfrost_lib depends on libpanfrost_bifrost for 'bifrost_compile_shader_nir' symbol
libpanfrost_lib depends on libpanfrost_bifrost_disasm for 'disassemble_bifrost' symbol
LOCAL_STATIC_LIBRARIES requires proper ordering to make the symbols available
Fixes the following building error happening with Android P:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
external/mesa/src/panfrost/lib/decode.c:534: error: undefined reference to 'disassemble_bifrost'
external/mesa/src/panfrost/lib/pan_shader.c:145: error: undefined reference to 'bifrost_compile_shader_nir'
Cc: 20.3 21.0 <mesa-stable@lists.freedesktop.org >
Fixes: 166630f ("android: pan/bi: Separate disasm/compiler targets")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9265 >
2021-02-25 20:31:44 +01:00
Eric Anholt
f65a7a8aa3
freedreno/a5xx: Fix cube image load/stores.
...
This is the same thing we do on a6xx for cubes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9270 >
2021-02-25 19:11:19 +00:00
Dave Airlie
5d4a035c1c
ci: try building lavapipe on windows
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9121 >
2021-02-26 04:29:52 +10:00
James Park
98c622a96e
vulkan: Update dispatch table gen for Windows
...
Update entry null test to deal with MSVC not supporting weak functions.
Also fix warnings for returning from void functions.
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9121 >
2021-02-26 04:29:52 +10:00
James Park
10244fe76e
vulkan: Fix source list for vulkan_wsi on Windows
...
I don't think link_whole works right for VS project generation, but MSVC
doesn't support GCC weak functions anyway, so work around it.
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9121 >
2021-02-26 04:29:52 +10:00
Mike Blumenkrantz
bc8e770856
zink: fix dynamic bo lowering for ssbo stores
...
there are no piglit tests for this, so naturally it would not have worked
fixes KHR-GL46.compute_shader.resources-max
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9113 >
2021-02-25 18:03:04 +00:00
Jesse Natalie
3955dd077b
meson/gallium: Add an option to not use LLVM for gallium draw module
...
We'd like to use one Mesa build environment which builds our CL compiler
stack (which needs Clang/LLVM) and which builds our GL driver. The GL
driver doesn't really need LLVM support, and since we're statically
linking LLVM, removing it from the driver drastically reduces our DLL
size on disk.
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9259 >
2021-02-25 17:48:16 +00:00
Roman Stratiienko
3adac6affc
egl: android: use num_planes param in createImageFromDmaBufs()
...
Fixes 972f36d8fa ("egl/android: Call createImageFromDmaBufs directly")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9278 >
2021-02-25 16:15:24 +00:00
Michel Zou
5a2b930014
meson/xmlconfig: win32 regex fallback
...
xmlconfig now uses regex fonctions even without xml support
Fixes: c83400e6
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9261 >
2021-02-25 14:03:27 +00:00
Mike Blumenkrantz
f08670b4ea
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9232 >
2021-02-25 08:38:56 -05:00
Mike Blumenkrantz
190b4ad18e
zink: relax tessellation shader reqs
...
vk memory model isn't actually required for tcs io semantics due
to how control barriers are emitted in GL
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9232 >
2021-02-25 08:38:56 -05:00
Qiang Yu
4aac98f8a6
lima: fix xserver page flip fail for full screen client
...
Need to import client buffer to display drm device, otherwise
get following xserver error log:
[ 190.982] (WW) modeset(0): Page flip failed: No such file or directory
[ 190.982] (EE) modeset(0): present flip failed
With this fix, full screen x11 client can display its window
buffer directly without a copy. Tested on Allwinner H3, 1080p
full screen glxgears go from 163FPS to 173FPS.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Zan Dobersek <zdobersek@igalia.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9038 >
2021-02-25 12:16:12 +00:00
Jose Fonseca
d7184aa15b
wgl: Match opengl32.dll export ordinals.
...
Some apps import GL/WGL symbols by ordinal. See
https://github.com/apitrace/apitrace/issues/652
This is not an issue when Mesa is used as an OpenGL ICD, but it might
create troubles when used as a drop-in opengl32.dll replacement.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7372 >
2021-02-25 10:47:59 +00:00
Daniel Schürmann
690ac7409a
aco/value_numbering: use can_eliminate() function to avoid unnecessary hashmap lookups
...
No fossil-db changes.
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9195 >
2021-02-25 11:35:42 +01:00
Daniel Schürmann
fbf791e70c
aco: value number VOPC instructions with different exec masks
...
This becomes possible as long as we do
val = s_and_b32/64 exec, val
before any subgroup operations.
This precautional instruction can be removed by the
optimizer if 'val' was computed by a VOPC instruction
using the same exec mask.
Totals from 59 (0.04% of 146267) affected shaders (Navi10):
VGPRs: 2808 -> 2816 (+0.28%)
CodeSize: 340888 -> 340852 (-0.01%); split: -0.20%, +0.19%
Instrs: 61733 -> 61625 (-0.17%); split: -0.18%, +0.01%
Cycles: 470636 -> 469112 (-0.32%); split: -0.33%, +0.01%
VMEM: 8091 -> 7993 (-1.21%)
SMEM: 2736 -> 2719 (-0.62%); split: +0.29%, -0.91%
VClause: 1745 -> 1741 (-0.23%)
SClause: 2394 -> 2392 (-0.08%); split: -0.25%, +0.17%
Copies: 3249 -> 3253 (+0.12%); split: -0.62%, +0.74%
Branches: 1210 -> 1206 (-0.33%)
PreSGPRs: 3126 -> 3176 (+1.60%); split: -0.16%, +1.76%
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9195 >
2021-02-25 11:35:42 +01:00
Aaron Watry
e6ff50f7d3
clover: implement CL_IMAGE_NUM_MIP_LEVELS and CL_IMAGE_NUM_SAMPLES
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Serge Martin <edb@sigluy.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Edward O'Callaghan
44e11aa7b4
clover: Implement CL_MEM_OBJECT_IMAGE1D
...
v2: Consider surface height as valid when unused by using 1.
Fixup width boundary checking.
v3 (Karol): Pull in changes from later commits
Fix validation
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Karol Herbst
f5284a36f9
clover: rework quering image max sizes
...
The 3D one was always wrongly used, also the consumers always wanted the
size, not the levels. This should make it easier to use the interface and
also prevent future bugs like the 3D one.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Aaron Watry
60173853c2
clover: implement CL_IMAGE_ELEMENT_SIZE
...
v2 (Karol Herbst): extracted from other commit
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Serge Martin <edb@sigluy.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Karol Herbst
2afaa60b42
clover: simplify image arguments
...
We don't care how many dimensions the image arg has, so drop it otherwise
we would have to add a lot of variants for arrays, msaa and depth
combinations. Yes, image2d_array_msaa_depth_t is a thing.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Serge Martin <edb@sigluy.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Serge Martin
4cb9df49c2
clover: return CL_INVALID_VALUE when origin or region are NULL
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Samuel Pitoiset
8a47422d97
radv: do not scale the depth bias for D16_UNORM depth surfaces
...
Scaling the depth bias doesn't seem correct with Vulkan. This is
probably the root cause of the shadow artifacts differences between
RADV and AMDVLK/AMDGPU-PRO.
Fix dEQP-VK.rasterization.depth_bias.d16_unorm.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2217
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/9249 >
2021-02-25 08:17:27 +01:00
Mike Blumenkrantz
9af40b824d
zink: hook up nir_texop_query_levels
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9275 >
2021-02-25 05:18:11 +00:00
Mike Blumenkrantz
7fe5937906
zink: add spirv builder methods for OpImageQueryLevels
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9275 >
2021-02-25 05:18:11 +00:00
Mike Blumenkrantz
0e1742ba02
zink: do batch-program tracking after possibly cycling batch in update_descriptors()
...
ensure we have the right batch here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
c7da40b2eb
zink: increment batch->descs_used during update_descriptors flushing
...
ensure that this actually flushes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
4412d2b69d
zink: properly size descriptorset layout binding stack array
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
f840057700
zink: unref programs last in batch reset
...
we're going to want to make sure all other resources have been handled
at this point so that we can make some better decisions in this block
based on descriptor usage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
992ddf7e4b
zink: ralloc zink program structs
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
747caaa83d
zink: use zink_program in zink_batch_reference_program()
...
this is a little nicer
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
5503ffecfb
zink: add zink_program struct as a base class for compute/gfx structs
...
this is going to be useful for managing descriptors
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Vinson Lee
50ca42dc43
zink: Remove leftover dead code.
...
Fix defect reported by Coverity Scan.
Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached: return progress;
Fixes: d550c5780f ("zink: use nir_shader_instructions_pass for draw params pass")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9182 >
2021-02-25 04:41:53 +00:00
Vinson Lee
9b54272425
gv100/ir: Initialize CodeEmitterGV100 members in constructor.
...
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member prog is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member insn is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9183 >
2021-02-25 04:36:52 +00:00
Vinson Lee
7b934d1ecd
nir/lower_tex: Change coord type to int.
...
nir_tex_instr_src_index returns an int.
Fix defect reported by Coverity Scan.
Macro compares unsigned to 0 (NO_EFFECT)
unsigned_compare: This greater-than-or-equal-to-zero comparison of an unsigned value is always true. coord >= 0U.
Fixes: b154a4154b ("nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9181 >
2021-02-25 04:15:07 +00:00
Vinson Lee
816d28f4a1
llvmpipe: Fix typos.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8542 >
2021-02-25 04:04:28 +00:00
Vinson Lee
6fc3363368
r600: Fix typos.
...
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/8293 >
2021-02-25 03:55:43 +00:00
Michel Zou
2944b4b6b4
gallium: remove DROP_PIPE_LOADER_MISC
...
not needed since these code paths are always enabled
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Michel Zou
951f328723
lavapipe: set empty dll prefix
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Michel Zou
e8d63375d2
lavapipe: add mingw32 def file
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Michel Zou
8af568e4ae
vulkan: implement wsi_win32 backend
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Dave Airlie
6c0546f466
lavapipe: use null probe path on win32
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Timothy Arceri
fbabd2163d
util/disk_cache: fix crash in fossilize_db
...
We don't need to close the file here check_files_opened_successfully()
already does that for us if needed.
This fixes a crash when invalid filename/paths are provided to the
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS environment variable.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9251 >
2021-02-25 03:27:14 +00:00
Mike Blumenkrantz
ba4bc54dea
zink: rename zink_context::buffers -> vertex_buffers (and usage mask)
...
this is more descriptive
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9272 >
2021-02-24 21:41:05 -05:00
Mike Blumenkrantz
cfc669585b
zink: use dynamic vertex buffer strides
...
this removes another case of needing to rehash/create a new pipeline
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9272 >
2021-02-24 21:41:05 -05:00
Mike Blumenkrantz
9d0434bf64
zink: make dynamic state usage in pipeline creation more explicit/flexible
...
we'll be expanding this, so we want to have it very easy to update and read
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9272 >
2021-02-24 21:41:05 -05:00
Mike Blumenkrantz
51e527a9ba
zink: setup CmdBindVertexBuffers2EXT member in screen for dynamic state
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9272 >
2021-02-24 21:41:05 -05:00
Marek Olšák
f827b29234
nouveau_vieux: use align_calloc for the context to fix m32 crashes
...
Fixes: 3175b63a0d "mesa: don't allocate matrices with malloc"
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220 >
2021-02-25 02:33:12 +00:00
Marek Olšák
81cf4bef7e
radeon,r200: use align_calloc for the context to fix m32 crashes
...
Fixes: 3175b63a0d "mesa: don't allocate matrices with malloc"
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220 >
2021-02-25 02:33:12 +00:00