platform/upstream/mesa.git
4 years agoradeonsi: restructure si_pipe_set_constant_buffer
Marek Olšák [Tue, 29 Sep 2020 21:39:14 +0000 (17:39 -0400)]
radeonsi: restructure si_pipe_set_constant_buffer

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6948>

4 years agoradeonsi: call nir_lower_bool_to_int32 last because it breaks nir_opt_if
Marek Olšák [Tue, 29 Sep 2020 21:32:21 +0000 (17:32 -0400)]
radeonsi: call nir_lower_bool_to_int32 last because it breaks nir_opt_if

The new place is where shader variants are generated.

This is a prerequisite for inlinable uniforms.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6948>

4 years agoradeonsi: use staging buffer uploads for most VRAM buffers
Marek Olšák [Sun, 27 Sep 2020 17:26:01 +0000 (13:26 -0400)]
radeonsi: use staging buffer uploads for most VRAM buffers

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6948>

4 years agoradeonsi: move si_set_active_descriptors_for_shader into si_update_common_shader_state
Marek Olšák [Sun, 27 Sep 2020 01:28:55 +0000 (21:28 -0400)]
radeonsi: move si_set_active_descriptors_for_shader into si_update_common_shader_state

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6948>

4 years agoradeonsi: kill disabled clip distances and planes at per-channel granularity
Marek Olšák [Sat, 26 Sep 2020 18:39:23 +0000 (14:39 -0400)]
radeonsi: kill disabled clip distances and planes at per-channel granularity

Apps often enable only 1 plane for gl_ClipVertex, which means 1 scalar
clip distance.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6948>

4 years agoradeonsi: simplify NGG culling enablement and add radeonsi_shader_culling option
Marek Olšák [Fri, 25 Sep 2020 20:45:22 +0000 (16:45 -0400)]
radeonsi: simplify NGG culling enablement and add radeonsi_shader_culling option

Add a vertex count threshold into si_shader_selector to simplify
the draw_vbo code.

The new option is supposed to be used in 00-mesa-defaults.conf and should be
tweaked for best performance unlike the AMD_DEBUG experimental options.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6948>

4 years agointel/blorp: Conditionally clear full surface depth and stencil
Sagar Ghuge [Fri, 25 Sep 2020 01:09:38 +0000 (18:09 -0700)]
intel/blorp: Conditionally clear full surface depth and stencil

We should set "Full Surface Depth and Stencil Clear" field of WM_HZ_OP
3DSTATE packet, only when application requires the entire depth surface
to be cleared.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6549>

4 years agoanv: Skip HiZ and CCS ambiguates which preceed fast-clears
Jason Ekstrand [Tue, 7 Jul 2020 19:43:09 +0000 (14:43 -0500)]
anv: Skip HiZ and CCS ambiguates which preceed fast-clears

This gets rid of multiple HiZ ambiguate operations per frame in
Witcher 3.

v2:
- Fix typo (Tapani)

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6549>

4 years agoanv: Use more temp vars in cmd_buffer_begin_subpass
Jason Ekstrand [Tue, 7 Jul 2020 19:35:18 +0000 (14:35 -0500)]
anv: Use more temp vars in cmd_buffer_begin_subpass

This is a mostly cosmetic change but there is one subtle functional
issue:  If we ever render to a 3D depth image, we are now handling the
base layer and number of layers correctly.  I'm not sure rendering to 3D
depth is even allowed but we can theoretically handle it now.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6549>

4 years agoanv: Allow HiZ clears for multi-view
Jason Ekstrand [Tue, 7 Jul 2020 19:10:21 +0000 (14:10 -0500)]
anv: Allow HiZ clears for multi-view

Now that we're enabling HiZ on multi-layer images, there's no reason why
we can't enable HiZ clears for multi-view.  The only reason I can think
of why we didn't before was because no one thought to and the old code
didn't.  Enabling this means that an attachment will get HiZ cleared if
and only if att_state->fast_clear.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6549>

4 years agoradeonsi: support for external buffers (ext_external_objects)
Eleni Maria Stea [Tue, 22 Sep 2020 11:23:22 +0000 (14:23 +0300)]
radeonsi: support for external buffers (ext_external_objects)

So far, the callback to create a resource from a memory object had code
for importing textures only. Modified it to allow importing buffers too.

Fixes the following piglit tests:
- ext_external_objects/vk-buf-exchange
- ext_external_objects/vk-pix-buf-update-errors
- ext_external_objects/vk-vert-buf-update-errors
- ext_external_objects/vk-vert-buf-reuse

v2: Used si_alloc_buffer_struct instead of CALLOC
v3: Fixed indentation issue, removed free in case of unsuccessful
allocation, joined two if conditions together

Signed-off-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6364>

4 years agoradv/aco: lower IO for all stages outside of ACO
Samuel Pitoiset [Mon, 28 Sep 2020 15:16:40 +0000 (17:16 +0200)]
radv/aco: lower IO for all stages outside of ACO

Lowering IO for VS, TCS, TES and GS still have to be done for LLVM.

No fossils-db change on NAVI10.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6897>

4 years agoradv: gather output usage mask from store_output for VS, TES and GS
Samuel Pitoiset [Mon, 28 Sep 2020 15:36:24 +0000 (17:36 +0200)]
radv: gather output usage mask from store_output for VS, TES and GS

IO are now lowered before the shader info pass is called and the
output usage masks have to be gathered from store_output instead.

This is currently only used by ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6897>

4 years agottn: Fix number of components for IF/UIF
Connor Abbott [Thu, 1 Oct 2020 09:02:41 +0000 (11:02 +0200)]
ttn: Fix number of components for IF/UIF

NIR if statements only take one component, but TGSI registers are vec4.
We're supposed to compare the x component, per
https://docs.mesa3d.org/gallium/tgsi.html#opcode-IF.

Fixes: f103bded ("ttn: Use nir control flow insertion helpers")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Leo Liu <leo.liu@amd.com>
Closes: #3585
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6956>

4 years agoac/nir: fix nir_intrinsic_shared_atomic_fadd
Samuel Pitoiset [Wed, 30 Sep 2020 11:52:19 +0000 (13:52 +0200)]
ac/nir: fix nir_intrinsic_shared_atomic_fadd

This was completely broken.

Fixes dEQP-VK.glsl.atomic_operations.add_float32_compute_shared.

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/6936>

4 years agoac/llvm: fix invalid use of unreachable in ac_build_atomic_rmw()
Samuel Pitoiset [Wed, 30 Sep 2020 11:33:58 +0000 (13:33 +0200)]
ac/llvm: fix invalid use of unreachable in ac_build_atomic_rmw()

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/6936>

4 years agoradv: fix gathering writes_memory for global store/atomic operations
Samuel Pitoiset [Wed, 30 Sep 2020 11:19:32 +0000 (13:19 +0200)]
radv: fix gathering writes_memory for global store/atomic operations

Because global operations are lowered before the shader info pass now
we have to adjust the gathering code.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3578
Fixes: 1588644543d ("radv: lower deref operations for global memory for both backends")
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/6934>

4 years agolavapipe: rename vallium to lavapipe
Dave Airlie [Tue, 29 Sep 2020 19:29:04 +0000 (05:29 +1000)]
lavapipe: rename vallium to lavapipe

Just a cooler name, and a lot easier to search for. thanks Marek

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6921>

4 years agoradeonsi: Fix dead lock with aux_context_lock in si_screen_clear_buffer.
Olsak, Marek [Wed, 30 Sep 2020 16:19:05 +0000 (12:19 -0400)]
radeonsi: Fix dead lock with aux_context_lock in si_screen_clear_buffer.

After disable SDMA on Arcturus(gfx9), dead lock with aux_context_lock is
detected since si_screen_clear_buffer is called recursively before
release lock.

The call trace is:
si_clear_render_target->si_compute_clear_render_target->
si_launch_grid_internal->si_launch_grid->si_emit_cache_flush->
si_prim_discard_signal_next_compute_ib_start->u_suballocator_alloc->
si_resource_create->si_buffer_create->si_alloc_resource->
si_screen_clear_buffer->simple_mtx_lock->
si_sdma_clear_buffer->si_pipe_clear_buffer->
si_clear_buffer->si_compute_do_clear_or_copy->
si_launch_grid_internal->si_launch_grid->si_emit_cache_flush->
si_prim_discard_signal_next_compute_ib_start->u_suballocator_alloc->
si_resource_create->si_buffer_create->si_alloc_resource->
si_screen_clear_buffer->simple_mtx_lock

Fixes: 07a49bf5976 "radeonsi: disable SDMA on gfx9"
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6941>

4 years agoadd one last 20.1 release to coincide with expected 20.2.1
Eric Engestrom [Wed, 30 Sep 2020 19:57:19 +0000 (21:57 +0200)]
add one last 20.1 release to coincide with expected 20.2.1

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6943>

4 years agodocs: update calendar and link releases notes for 20.1.9
Eric Engestrom [Wed, 30 Sep 2020 19:20:29 +0000 (21:20 +0200)]
docs: update calendar and link releases notes for 20.1.9

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6943>

4 years agodocs: add release notes for 20.1.9
Eric Engestrom [Wed, 30 Sep 2020 18:08:22 +0000 (20:08 +0200)]
docs: add release notes for 20.1.9

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6943>

4 years agofreedreno/ir3: Enable the i/o vectorizer on UBOs.
Eric Anholt [Thu, 20 Aug 2020 20:29:58 +0000 (13:29 -0700)]
freedreno/ir3: Enable the i/o vectorizer on UBOs.

This will merge loads of UBO components together into vec4 loads.  At the
same time, it improves the alignment information on our loads, fixing the
regression from the vec3 loads fix.

shader-db results:
total instructions in shared programs: 12829370 -> 8755851 (-31.75%)
total cat6 in shared programs: 145840 -> 97027 (-33.47%)

Overall results from before the vec3 fix:
total instructions in shared programs: 8019997 -> 8755851 (9.18%)
total cat6 in shared programs: 87683 -> 97027 (10.66%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agonir: Make nir_lower_ubo_vec4() handle non-vec4-aligned loads.
Eric Anholt [Tue, 8 Sep 2020 18:55:58 +0000 (11:55 -0700)]
nir: Make nir_lower_ubo_vec4() handle non-vec4-aligned loads.

It turns out I had missed a case in my enumeration of why everything
currently was vec4-aligned.

Fixes a simple testcase of loading from a vec3[2] array in freedreno with
IR3_SHADER_DEBUG=nouboopt.

Initial shader-db results look devastating:

total instructions in shared programs: 8019997 -> 12829370 (59.97%)
total cat6 in shared programs: 87683 -> 145840 (66.33%)

Hopefully this will recover once we introduce the i/o vectorizer, but that
was blocked on getting the vec3 case fixed.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agonir: Drop the high_offset argument to the load_store_vectorizer filter.
Eric Anholt [Tue, 8 Sep 2020 18:12:56 +0000 (11:12 -0700)]
nir: Drop the high_offset argument to the load_store_vectorizer filter.

Nothing uses it, and it's not clear to me what it provides over
alignment/num_components/bit_size.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agonir: Make the load_store_vectorizer provide align_mul + align_offset.
Eric Anholt [Tue, 8 Sep 2020 17:58:49 +0000 (10:58 -0700)]
nir: Make the load_store_vectorizer provide align_mul + align_offset.

It was passing an encoding of the two that wasn't good for ensuring "Don't
combine loads that would make us straddle a vec4 boundary" for
nir_lower_ubo_vec4.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agonir/gl_nir_lower_buffers: Set up align_mul/offset on UBOs.
Eric Anholt [Tue, 8 Sep 2020 19:44:30 +0000 (12:44 -0700)]
nir/gl_nir_lower_buffers: Set up align_mul/offset on UBOs.

nir_lower_to_explicit_io will give us good alignments if we have the
cast's alignment information known, and it's trivial: Just the offset of
the UBO variable that is at the base of the deref.  Otherwise, explicit io
assumes the load is aligned just to the size of a scalar value in it.

The change in freedreno is in the noise.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agonir/nir_lower_uniforms_to_ubo: Set better alignments on our new instructions.
Eric Anholt [Wed, 9 Sep 2020 17:21:49 +0000 (10:21 -0700)]
nir/nir_lower_uniforms_to_ubo: Set better alignments on our new instructions.

The change on freedreno is in the noise.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agonir: Print the alignment information on casts.
Eric Anholt [Tue, 8 Sep 2020 19:50:34 +0000 (12:50 -0700)]
nir: Print the alignment information on casts.

I wanted it for debugging GL alignment.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agonir: Document a bit about how align_mul/offset work.
Eric Anholt [Tue, 8 Sep 2020 20:07:56 +0000 (13:07 -0700)]
nir: Document a bit about how align_mul/offset work.

Introduces a #define for the maximum valid align_mul that's used in the
load_store_vectorizer tests (currently, though it will be used more soon).

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agofreedreno/ir3: Make sure we run the opt loop after lowering UBOs to vec4.
Eric Anholt [Mon, 14 Sep 2020 20:13:47 +0000 (13:13 -0700)]
freedreno/ir3: Make sure we run the opt loop after lowering UBOs to vec4.

The lowering pass may introduce vector bcsels that we need to scalarize
back out.  It's unusual to have UBOs and not get any lowered to push
constants, so the flag was usually set anyway.

Fixes: 2b2524099379 ("freedreno/ir3: Replace our custom vec4 UBO intrinsic
with the shared lowering.")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

4 years agoturnip: implement legacy API functions separately
Jonathan Marek [Tue, 29 Sep 2020 16:04:17 +0000 (12:04 -0400)]
turnip: implement legacy API functions separately

Move legacy API functions to a separate file, and implement them by calling
the new API functions, like tu_CreateRenderPass was already doing.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6920>

4 years agoRevert "nir/lower_goto_if: Add a route::outside set"
Jason Ekstrand [Thu, 24 Sep 2020 14:12:38 +0000 (09:12 -0500)]
Revert "nir/lower_goto_if: Add a route::outside set"

This reverts commit d57573dcd4aa2160f3153df466b01f377484a3fa.  The
actual bug was an issue with prev_frontiers which has been properly
fixed in the previous commit.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>

4 years agonir/lower_goto_ifs: Always include level dom_frontiers in prev_frontier
Jason Ekstrand [Wed, 23 Sep 2020 20:54:08 +0000 (15:54 -0500)]
nir/lower_goto_ifs: Always include level dom_frontiers in prev_frontier

When we come in from some other level or from the parent, we need to
ensure that the reach set is in prev_frontier but we also need to
consider the dominance frontier of our level.  Otherwise, we may end up
leaving out possible blocks when computing the reach of a level.

Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>

4 years agonir/lower_goto_ifs: Add asserts for SSA forks
Jason Ekstrand [Wed, 23 Sep 2020 21:52:18 +0000 (16:52 -0500)]
nir/lower_goto_ifs: Add asserts for SSA forks

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>

4 years agonir/lower_goto_ifs: Use rzalloc
Jason Ekstrand [Thu, 24 Sep 2020 02:54:05 +0000 (21:54 -0500)]
nir/lower_goto_ifs: Use rzalloc

In particular, SSA forks weren't always getting properly initialized
which was causing asserts to fail.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>

4 years agospirv: Only run repair_ssa if structured
Jason Ekstrand [Thu, 17 Sep 2020 14:11:19 +0000 (09:11 -0500)]
spirv: Only run repair_ssa if structured

We shouldn't need it if we're unstructured and the pass assumes
structure so attempting to run it will assert-fail.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>

4 years agonir/dominance: Use _mesa_set_clear instead ofhand-rolling it
Jason Ekstrand [Wed, 16 Sep 2020 19:37:28 +0000 (14:37 -0500)]
nir/dominance: Use _mesa_set_clear instead ofhand-rolling it

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>

4 years agonir/lower_goto_ifs: Don't destroy SSA form in the process
Jason Ekstrand [Wed, 16 Sep 2020 17:49:15 +0000 (12:49 -0500)]
nir/lower_goto_ifs: Don't destroy SSA form in the process

There are two issues here:

 1. If there are any phi nodes, we'll make complete hash of them.  This
    isn't likely actually a problem because spirv_to_nir doesn't
    generate any actual phi nodes today.  However, if we start doing any
    other passes before this, we may have a problem.

 2. Even without phi nodes, we may still break SSA form.  This can
    happen if we ever have to stick a block inside a conditional to
    satisfy weird CFG constraints.  Doing so can cause it to no longer
    look like it dominates some of its uses even though, at runtime,
    it's guaranteed to be run first.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>

4 years agonir/validate: Improve the validation of blocks
Jason Ekstrand [Tue, 15 Sep 2020 16:28:43 +0000 (11:28 -0500)]
nir/validate: Improve the validation of blocks

This commit adds a number of new validation checks:

 1. We now check that every block pointer in the IR points to a block
    that actually exists in a block list that's reachable from the
    nir_function_impl.

 2. We assert that nir_function_impl::body is non-empty

 3. We assert that the start block has no predecessors.  This is
    important because we tend to put run-once code there.

 4. We now validate some stuff on the end block.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>

4 years agogallium/util: remove empty file u_half.h
Marek Olšák [Sat, 19 Sep 2020 18:11:02 +0000 (14:11 -0400)]
gallium/util: remove empty file u_half.h

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>

4 years agogallium/util: remove redundant util_float_to_half_rtz
Marek Olšák [Fri, 18 Sep 2020 10:00:06 +0000 (06:00 -0400)]
gallium/util: remove redundant util_float_to_half_rtz

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>

4 years agoutil: remove util_float_to_half and util_half_to_float wrappers
Marek Olšák [Fri, 18 Sep 2020 09:53:56 +0000 (05:53 -0400)]
util: remove util_float_to_half and util_half_to_float wrappers

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>

4 years agoutil: move util_half_to_float code into _mesa_half_to_float_slow
Marek Olšák [Fri, 18 Sep 2020 09:48:05 +0000 (05:48 -0400)]
util: move util_half_to_float code into _mesa_half_to_float_slow

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>

4 years agoutil: implement f16c - fast half<->float conversions
Marek Olšák [Fri, 18 Sep 2020 09:21:09 +0000 (05:21 -0400)]
util: implement f16c - fast half<->float conversions

This also happens to fix bptc-float-modes on llvmpipe.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>

4 years agonir/cf: Better handle intra-block splits
Jason Ekstrand [Fri, 25 Sep 2020 04:50:24 +0000 (23:50 -0500)]
nir/cf: Better handle intra-block splits

In the case where end was a instruction-based cursor, we would mix up
our blocks and end up with block_begin pointing after the second split.
This causes a segfault as the cf_node list walk at the end of the
function never terminates properly.  There's also a possibility of
mix-up if begin is an instruction-based cursor which was found by
inspection.

Fixes: fc7f2d2364a9 "nir/cf: add new control modification API's"
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agonir: Disallow goto and goto_if in clone and [de]serialize
Jason Ekstrand [Thu, 24 Sep 2020 23:55:09 +0000 (18:55 -0500)]
nir: Disallow goto and goto_if in clone and [de]serialize

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agonir/copy_propagate: Copy-prop into jump conditions
Jason Ekstrand [Thu, 24 Sep 2020 23:21:58 +0000 (18:21 -0500)]
nir/copy_propagate: Copy-prop into jump conditions

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agonir/opt_if: Use early returns in opt_if_merge()
Connor Abbott [Tue, 16 Apr 2019 17:39:11 +0000 (19:39 +0200)]
nir/opt_if: Use early returns in opt_if_merge()

We would've had to add yet another level of indentation, or duplicated
finding the if conditions in the next commit. Refactor this function to
use early returns like our other optimizations, so that this isn't an
issue.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agonir/opt_if: Remove open-coded nir_ssa_def_rewrite_uses()
Connor Abbott [Tue, 16 Apr 2019 17:31:45 +0000 (19:31 +0200)]
nir/opt_if: Remove open-coded nir_ssa_def_rewrite_uses()

So that we don't have to change these two places later.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agonir/lower_returns: Use nir control flow insertion helpers
Connor Abbott [Wed, 10 Apr 2019 09:34:57 +0000 (11:34 +0200)]
nir/lower_returns: Use nir control flow insertion helpers

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agottn: Use nir control flow insertion helpers
Connor Abbott [Tue, 9 Apr 2019 20:31:50 +0000 (22:31 +0200)]
ttn: Use nir control flow insertion helpers

As a side effect, we can delete the whole control flow stack thing.

v2 (Jason Ekstrand):
 - Drop the ttn_if helper and just inline it in the two uses

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agoradv: Use nir control flow insertion helpers
Connor Abbott [Tue, 9 Apr 2019 20:31:06 +0000 (22:31 +0200)]
radv: Use nir control flow insertion helpers

v2 (Jason Ekstrand):
 - Rebased and tweaked a few cases
 - Use the helpers in build_timestamp_query_shader

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agointel/nir: Use nir control flow helpers
Connor Abbott [Tue, 9 Apr 2019 20:16:26 +0000 (22:16 +0200)]
intel/nir: Use nir control flow helpers

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>

4 years agoradeonsi: Fix imports with displayable DCC.
Bas Nieuwenhuizen [Tue, 29 Sep 2020 16:41:31 +0000 (18:41 +0200)]
radeonsi: Fix imports with displayable DCC.

Otherwise we reset the displayable DCC on import.

Fixes: c6c1fa9a263 "radeonsi: Put retile map in separate buffers."
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3577
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6918>

4 years agobin/gen_release_notes.py: escape special rST characters
Eric Engestrom [Fri, 25 Sep 2020 19:19:10 +0000 (21:19 +0200)]
bin/gen_release_notes.py: escape special rST characters

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/6869>

4 years agodocs: cpu -> CPU
Erik Faye-Lund [Tue, 29 Sep 2020 17:15:32 +0000 (19:15 +0200)]
docs: cpu -> CPU

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: Sandybridge -> Sandy Bridge
Erik Faye-Lund [Tue, 29 Sep 2020 17:09:35 +0000 (19:09 +0200)]
docs: Sandybridge -> Sandy Bridge

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: vmware -> VMWare
Erik Faye-Lund [Tue, 29 Sep 2020 17:07:15 +0000 (19:07 +0200)]
docs: vmware -> VMWare

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: ubuntu -> Ubuntu
Erik Faye-Lund [Tue, 29 Sep 2020 17:03:28 +0000 (19:03 +0200)]
docs: ubuntu -> Ubuntu

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: scons -> SCons
Erik Faye-Lund [Tue, 29 Sep 2020 17:01:13 +0000 (19:01 +0200)]
docs: scons -> SCons

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: quote "git log"
Erik Faye-Lund [Tue, 29 Sep 2020 16:58:22 +0000 (18:58 +0200)]
docs: quote "git log"

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: git -> Git
Erik Faye-Lund [Tue, 29 Sep 2020 16:57:33 +0000 (18:57 +0200)]
docs: git -> Git

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: android -> Android
Erik Faye-Lund [Tue, 29 Sep 2020 16:49:33 +0000 (18:49 +0200)]
docs: android -> Android

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: drm -> DRM
Erik Faye-Lund [Tue, 29 Sep 2020 16:48:24 +0000 (18:48 +0200)]
docs: drm -> DRM

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: wayland -> Wayland
Erik Faye-Lund [Tue, 29 Sep 2020 16:47:22 +0000 (18:47 +0200)]
docs: wayland -> Wayland

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: x11 -> X11
Erik Faye-Lund [Tue, 29 Sep 2020 16:46:58 +0000 (18:46 +0200)]
docs: x11 -> X11

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: cmake -> CMake
Erik Faye-Lund [Tue, 29 Sep 2020 16:44:21 +0000 (18:44 +0200)]
docs: cmake -> CMake

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: gpu -> GPU
Erik Faye-Lund [Tue, 29 Sep 2020 16:41:52 +0000 (18:41 +0200)]
docs: gpu -> GPU

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: visual studio -> Visual Studio
Erik Faye-Lund [Tue, 29 Sep 2020 16:38:30 +0000 (18:38 +0200)]
docs: visual studio -> Visual Studio

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: windows -> Windows
Erik Faye-Lund [Tue, 29 Sep 2020 16:37:11 +0000 (18:37 +0200)]
docs: windows -> Windows

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: linux -> Linux
Erik Faye-Lund [Tue, 29 Sep 2020 16:34:46 +0000 (18:34 +0200)]
docs: linux -> Linux

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: microsoft -> Microsoft
Erik Faye-Lund [Tue, 29 Sep 2020 16:32:10 +0000 (18:32 +0200)]
docs: microsoft -> Microsoft

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: mingw -> MinGW
Erik Faye-Lund [Tue, 29 Sep 2020 16:30:44 +0000 (18:30 +0200)]
docs: mingw -> MinGW

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: ninja -> Ninja
Erik Faye-Lund [Tue, 29 Sep 2020 16:29:50 +0000 (18:29 +0200)]
docs: ninja -> Ninja

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: chocolatey -> Chocolatey
Erik Faye-Lund [Tue, 29 Sep 2020 16:28:16 +0000 (18:28 +0200)]
docs: chocolatey -> Chocolatey

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: mako -> Mako
Erik Faye-Lund [Tue, 29 Sep 2020 16:27:03 +0000 (18:27 +0200)]
docs: mako -> Mako

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: bison -> Bison
Erik Faye-Lund [Tue, 29 Sep 2020 16:26:25 +0000 (18:26 +0200)]
docs: bison -> Bison

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: flex -> Flex
Erik Faye-Lund [Tue, 29 Sep 2020 16:25:14 +0000 (18:25 +0200)]
docs: flex -> Flex

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: python3 -> Python 3
Erik Faye-Lund [Tue, 29 Sep 2020 16:22:55 +0000 (18:22 +0200)]
docs: python3 -> Python 3

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: meson -> Meson
Erik Faye-Lund [Tue, 29 Sep 2020 16:20:24 +0000 (18:20 +0200)]
docs: meson -> Meson

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: correct reference to meson.build
Erik Faye-Lund [Tue, 29 Sep 2020 16:18:37 +0000 (18:18 +0200)]
docs: correct reference to meson.build

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: llvm -> LLVM
Erik Faye-Lund [Tue, 29 Sep 2020 16:13:03 +0000 (18:13 +0200)]
docs: llvm -> LLVM

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: bpp -> BPP
Erik Faye-Lund [Mon, 28 Sep 2020 12:57:37 +0000 (14:57 +0200)]
docs: bpp -> BPP

While we're at it, make sure we always have a space between the number
and "BPP", for easier reading.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: webservice -> web service
Erik Faye-Lund [Tue, 29 Sep 2020 17:26:06 +0000 (19:26 +0200)]
docs: webservice -> web service

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: existant -> existent
Erik Faye-Lund [Tue, 29 Sep 2020 17:19:29 +0000 (19:19 +0200)]
docs: existant -> existent

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agodocs: softwara -> software
Erik Faye-Lund [Tue, 29 Sep 2020 13:51:50 +0000 (15:51 +0200)]
docs: softwara -> software

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>

4 years agospirv: Delete the legacy offset/index UBO/SSBO lowering
Jason Ekstrand [Sat, 30 May 2020 05:50:56 +0000 (00:50 -0500)]
spirv: Delete the legacy offset/index UBO/SSBO lowering

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5275>

4 years agovallium: Stop using lower_ubo_ssbo_access_to_offsets
Jason Ekstrand [Mon, 21 Sep 2020 22:34:23 +0000 (17:34 -0500)]
vallium: Stop using lower_ubo_ssbo_access_to_offsets

This legacy path needs to die.  Drivers shouldn't be using it anymore.
While we're here, we also implement the resource_reindex intrinsic which
doesn't come up in most direct-access cases but can depending on how the
OpAccessChains are structured.  It comes up all the time in the variable
pointers world.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5275>

4 years agospirv: Use derefs for push constants
Jason Ekstrand [Wed, 27 May 2020 22:23:45 +0000 (17:23 -0500)]
spirv: Use derefs for push constants

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5275>

4 years agoanv,radv,tu,val: Call nir_lower_io for push constants
Jason Ekstrand [Wed, 27 May 2020 22:09:33 +0000 (17:09 -0500)]
anv,radv,tu,val: Call nir_lower_io for push constants

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5275>

4 years agonir/lower_io: Add support for push constants
Jason Ekstrand [Wed, 27 May 2020 22:08:28 +0000 (17:08 -0500)]
nir/lower_io: Add support for push constants

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5275>

4 years agonir: Allow creating variables with nir_var_mem_push_const.
Jason Ekstrand [Wed, 27 May 2020 21:51:04 +0000 (16:51 -0500)]
nir: Allow creating variables with nir_var_mem_push_const.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5275>

4 years agollvmpipe: use an alternate env var to enable clover.
Dave Airlie [Mon, 28 Sep 2020 22:35:20 +0000 (08:35 +1000)]
llvmpipe: use an alternate env var to enable clover.

This can be used outside debug contexts.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>

4 years agogallivm/nir: handle non-32-bit mul high
Dave Airlie [Tue, 29 Sep 2020 07:10:07 +0000 (17:10 +1000)]
gallivm/nir: handle non-32-bit mul high

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>

4 years agogallivm/nir: fix up non 32-bit load stores
Dave Airlie [Tue, 29 Sep 2020 07:16:01 +0000 (17:16 +1000)]
gallivm/nir: fix up non 32-bit load stores

This fixes a bunch of opencl tests.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>

4 years agogallivm: fix 64-bit CL intrinsics.
Dave Airlie [Tue, 29 Sep 2020 06:27:58 +0000 (16:27 +1000)]
gallivm: fix 64-bit CL intrinsics.

This fixes a bunch of bad casts in piglit tests

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>

4 years agoturnip: signal fence and semaphore in AcquireNextImage2KHR
Jonathan Marek [Tue, 15 Sep 2020 23:46:24 +0000 (19:46 -0400)]
turnip: signal fence and semaphore in AcquireNextImage2KHR

As a result of doing semaphores correctly, this is needed for things to
work correctly.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>

4 years agoturnip: share code between semaphores/fences + fence import/export
Jonathan Marek [Mon, 14 Sep 2020 23:51:25 +0000 (19:51 -0400)]
turnip: share code between semaphores/fences + fence import/export

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>

4 years agoturnip: remove remaining uses of drmSyncobj helpers
Jonathan Marek [Tue, 29 Sep 2020 03:02:53 +0000 (23:02 -0400)]
turnip: remove remaining uses of drmSyncobj helpers

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>