Tomeu Vizoso
e933ac21cb
ci: Generate MinIO credentials within LAVA jobs
...
As these credentials are valid only for 15 minutes, generate them closer
to when they are going to be used.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6124 >
2020-07-30 14:42:15 +02:00
Eric Anholt
cb82274538
ci/bare-metal: Capture the first devcoredump a job produces.
...
Connor recently ran into an issue where the chezas were hanging where his
GPUs weren't, and was blocked on getting some feedback on what was
happening. A devcoredump will help non-cheza-having devs debug (or
hopefully with other intermittent fails).
Closes : #3187
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6036 >
2020-07-30 11:41:57 +00:00
Tomeu Vizoso
3120b4dcd3
ci: Print URL to image diff when a trace replay fails
...
Developers can see how the rendering differed from the executed value.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6113 >
2020-07-30 13:18:54 +02:00
Tomeu Vizoso
bea34a0853
ci: Upload reference images for traces
...
After a trace succeeds, check if the rendered image already exists in
the repository of reference images, and upload it if it doesn't.
This image will be used for comparing with failed retraces.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6113 >
2020-07-30 13:18:35 +02:00
Marcin Ślusarz
cb19fe24d3
intel/vec4: fix out of bounds read
...
NIR_MAX_VEC_COMPONENTS was bumped from 4 to 16 in a8ec4082
(2019.03.09, merged 2019.12.21)
float[4] array was added in acd7796a
(2019.06.11, merged 2019.07.11)
Found by Coverity.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3014
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Fixes: a8ec4082a4
("nir+vtn: vec8+vec16 support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Marcin Ślusarz
56228b0393
iris: quiet down static analyzers
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Marcin Ślusarz
c3a251f254
mesa: quiet down static analyzers
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Marcin Ślusarz
0906d5d504
mesa: fix out of bounds access in glGetFramebufferParameterivEXT
...
ColorDrawBuffer is an array of MAX_DRAW_BUFFERS == 8.
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Fixes: 7534c536ca
("mesa: add EXT_dsa (Named)Framebuffer functions")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Marcin Ślusarz
28f2585365
util/format: initialize non-important components to 0
...
Avoids copying random garbage from the stack.
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Marcin Ślusarz
f13042ec7e
util: fix possible buffer overflow in util_get_process_exec_path
...
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Fixes: f8f1413070
("util/u_process: add util_get_process_exec_path")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Marcin Ślusarz
59bb0ff945
glsl: catch out of bounds access in the debug version
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Marcin Ślusarz
eac0ba7fc1
util: fix possible fd leaks in os_socket_listen_abstract
...
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Fixes: ef5266ebd5
("util/os_socket: Add socket related functions.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Alejandro Piñeiro
62bfc700f7
vulkan/util: add struct vk_pipeline_cache_header
...
Header is defined at vkGetPipelineCacheData spec, in any vulkan
version, and anv, tu and radv were using the same struct, and v3dv was
about to do the same.
Defining the same struct four times seemed odd, so let's define on a
common place.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Acked-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6058 >
2020-07-30 11:44:21 +02:00
Rob Clark
b5558f2d2a
freedreno/a6xx: fixup draw state earlier
...
`fixup_draw_state()` was updating `ctx->dirty` after it had already been
copied into the emit struct, which had the result that we were not re-
emitting the rast state when primitive_restart changes.
Fixes: 4d8f42c851
("freedreno/a6xx: separate rast stateobj for prim restart")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3067
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6117 >
2020-07-29 20:22:05 +00:00
Rob Clark
82b419fefd
freedreno/a6xx: don't emit a bogus size for empty cb slots
...
Noticed that asphalt9 had no uniforms bound, so cb[0] is null. In
theory shouldn't cause a problem, since nothing is doing `ldc` against
cb[0], but to be safe we should use SIZE=0.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6117 >
2020-07-29 20:22:05 +00:00
Rob Clark
ba9d502d24
freedreno/ir3: add missing track_ubo_use()
...
We could lower *some* accesses to a UBO but not others. In this case,
we would have a valid range, but would have skipped tracking that the
UBO is accessed as a UBO rather than push constants.
Fixes one issue with asphalt9, that was a result of having `ldc` without
having emit UBO state.
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3067
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6117 >
2020-07-29 20:22:05 +00:00
Frank Binns
d0e32e5f81
egl/dri2: only take a dri2_dpy reference when binding a new context/surfaces
...
This effectively reverts part of 2907faee
, which changed dri2_make_current() to
always take a dri2_dpy reference regardless of whether or not a new context or
surface(s) were being bound. This led to a reference count imbalance as there
was no corresponding code added to drop a reference on the dri2_dpy. As a
consequence, any application that called eglInitialize() on a default/native
display after having called eglTerminate() would always get back the old
dri2_dpy, inheriting its previous state.
As the reference count is there to prevent the dri2_dpy from being destroyed
between eglTerminate() and eglInitialize() calls when a context is still bound,
a reference should only be taken when a successful call to
dri2_dpy->core->bindContext() has been made. Fix the issue by restoring the old
reference counting behaviour.
Fixes: 4e8f95f64d
("egl_dri2: Always unbind old contexts")
Fixes: 2907faee7a
("egl/dri2: try to bind old context if bindContext failed")
Signed-off-by: Frank Binns <frank.binns@imgtec.com >
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Tested-by: Nicolas Cortes <nicolas.g.cortes@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3328
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6105 >
2020-07-29 20:01:14 +00:00
Rob Clark
b9391c1d50
freedreno/decode: cffdec warnings cleanup
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6118 >
2020-07-29 19:32:51 +00:00
Rob Clark
20e703b7e6
freedreno/rnn: headergen2 warnings cleanup
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6118 >
2020-07-29 19:32:51 +00:00
Kenneth Graunke
128cbcd3a7
iris: Delete shader variants when deleting the API-facing shader
...
We were space-leaking iris_compiled_shader objects, leaving them around
basically forever - long after the associated iris_uncompiled_shader was
deleted. Perhaps even more importantly, this left the BO containing the
assembly referenced, meaning those were never reclaimed either. For
long running applications, this can leak quite a bit of memory.
Now, when freeing iris_uncompiled_shader, we hunt down any associated
iris_compiled_shader objects and pitch those (and their BO) as well.
One issue is that the shader variants can still be bound, because we
haven't done a draw that updates the compiled shaders yet. This can
cause issues because state changes want to look at the old program to
know what to flag dirty. It's a bit tricky to get right, so instead
we defer variant deletion until the shaders are properly unbound, by
stashing them on a "dead" list and tidying that each time we try and
delete some shader variants.
This ensures long running programs delete their shaders eventually.
Fixes: ed4ffb9715
("iris: rework program cache interface")
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6075 >
2020-07-29 11:34:01 -07:00
Rhys Perry
9a49d4c2db
aco: remove isel for GLSL-style barriers
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5980 >
2020-07-29 17:57:13 +00:00
Rhys Perry
cc3bc9493c
radv: use scoped barriers
...
fossil-db (LLVM, Navi):
Totals from 843 (0.62% of 135820) affected shaders:
SGPRs: 40456 -> 40480 (+0.06%); split: -0.10%, +0.16%
VGPRs: 39648 -> 39688 (+0.10%); split: -0.01%, +0.11%
CodeSize: 2936164 -> 2932508 (-0.12%); split: -0.21%, +0.09%
MaxWaves: 10828 -> 10827 (-0.01%)
fossil-db changes seem to be due to SPIR-V -> NIR emitting a workgroup
scope shared memory barrier instead of a group_memory_barrier.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5980 >
2020-07-29 17:57:13 +00:00
Rhys Perry
a8f8c02e7e
ac/nir: implement scoped_barrier
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5980 >
2020-07-29 17:57:13 +00:00
Rhys Perry
6b99cf6064
nir/load_store_vectorize: fix indentation
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5980 >
2020-07-29 17:57:13 +00:00
Caio Marcelo de Oliveira Filho
1a42e7dae9
nir: Filter modes of scoped memory barrier in nir_opt_load_store_vectorize
...
Otherwise a scoped memory barrier containing nir_var_mem_ubo (which
memoryBarrier() does lower to) would incorrectly prevent the
optimization to happen in UBOs.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5980 >
2020-07-29 17:57:13 +00:00
Jason Ekstrand
5c5555a862
nir: Add a find_variable_with_[driver_]location helper
...
We've hand-rolled this loop 10 places and those are just the ones I
found easily.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
fc1363cc60
nir/gl_nir_linker: Call add_vars_with_modes once for GL_PROGRAM_INPUT
...
Now that nir_foreach_variable_with_modes can handle multiple modes at
one time, we can simplify things a bit and only walk the list once.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
789ec95dcd
nir/split_per_member_structs: Inline split_variables_in_list
...
This lets us do one list walk instead of three.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
d70fff99c5
nir: Use a single list for all shader variables
...
Instead of having separate lists of variables, roughly sorted by mode,
use a single list for all shader-level NIR variables. This makes a few
list walks a bit longer here and there but list walks aren't a very
common thing in NIR at all. On the other hand, it makes a lot of things
like validation, printing, etc. way simpler. Also, there are a number
of cases where we move variables from inputs/outputs to globals and this
makes it way easier because we no longer have to move them between
lists. We only have to deal with that if moving them from the shader to
a nir_function_impl.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
473b0fc25d
gallium/ttn: Use variable create/add helpers
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
a41a84d362
mesa/ptn: Use nir_variable_create
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
e5536e4a78
aco: Use nir_foreach_variable_with_modes to walk SSBOs
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
a61be312e2
panfrost: Use nir_foreach_variable_with_modes in pan_compile
...
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
94f0bae4de
panfrost/midgard: Make search_var take a nir_shader and mode
...
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
568022be75
r600/sfn: Use nir_foreach_variable_with_modes in IO vectorization
...
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
cc51cec9c0
r600/sfn/lower_tex: Get rid of the lower_sampler vector
...
We can get the result type information easily from nir_tex_instr itself
by looking at dest_type. There's no reason to construct a vector and
try to index into it.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
929673077c
r600/sfn/lower_tess_io: Rework get_tcs_varying_offset
...
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
e4d812db10
freedreno/ir3_cmdline: Rework i/o variable fixup
...
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
ce6e59b3d3
lima/standalone: Rework i/o variable fixup
...
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
52dd84a12e
freedreno/ir3_lower_tess: Rework var list helpers
...
They now take a nir_shader and a nir_variable_mode
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
77c41ce04b
nir/gl_nir_linker: Use nir_foreach_variable_with_modes
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
c256cd900e
nir/lower_variable_initializers: Restrict the modes we lower
...
This is not a functional change because these are the only modes we
handle. All others get silently ignored.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
4d7e064623
nir/split_per_member_structs: Use nir_variable_with_modes_safe
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
90cf4709d9
nir/lower_uniforms_to_ubo: Use nir_foreach_variable_with_modes
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
d0d5ef6139
nir/lower_two_sided_color: Use nir_variable_create
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
bb3994cfe7
nir/io_to_vector: Use nir_foreach_variable_with_modes
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
0a77c67442
nir/lower_io_to_temporaries: Use a separate list for new inputs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
cd66005b23
nir: Use a nir_shader and mode in lower_clip_cull_distance_arrays
...
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
d5d15c301e
nir/lower_amul: Add a variable mode check
...
This loop should only apply to UBOs and SSBOs because max_slot is never
used for normal uniforms.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00
Jason Ekstrand
3be0be7d54
nir: Split nir_index_vars into two functions
...
We also very slightly change the semantics. It no longer is one index
per list for global variables and is a single index over-all.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00