Boris Brezillon
42f97f8ce3
nir/glsl: Consider block interfaces as structs when it comes to size/align calculation
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472 >
2020-09-03 18:02:50 +00:00
Boris Brezillon
be68de81ab
glsl: Propagate packed info in get_explicit_type_for_size_align()
...
Right now, when calling get_explicit_type_for_size_align() on a packed
struct, the packed attribute is lost and field offsets are wrong.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472 >
2020-09-03 18:02:50 +00:00
Boris Brezillon
d0c2958f88
spirv: Propagate packed information to glsl_type
...
We need to parse the CPacked decoration early enough to apply it when
calculating field offsets and creating the struct type.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472 >
2020-09-03 18:02:50 +00:00
Boris Brezillon
938d6ceb83
spirv: Don't accept CPacked decoration on struct members
...
CPacked decoration is only allowed on struct definitions, not struct
members.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472 >
2020-09-03 18:02:50 +00:00
Jason Ekstrand
bcfeead5f3
clover: Call nir_lower_mem_constant_vars
...
Fixes: 26a4c8f375
"clover/nir: Use nir_var_mem_constant for..."
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472 >
2020-09-03 18:02:50 +00:00
Jason Ekstrand
9414cbc13c
nir: Don't bail too early in lower_mem_constant_vars
...
If there were no constant variables, we would bail out entirely.
However, we may still have constant input pointers coming in from the
client.
Fixes: 4360a8a2b3
"nir/lower_io: Add support for nir_var_mem_constant"
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472 >
2020-09-03 18:02:50 +00:00
Jason Ekstrand
a7a0315d7f
intel/nir: Stop using nir_lower_vars_to_scratch
...
Instead, we do a limited indirect deref lowering and then use
nir_lower_vars_to_explicit_types and nir_lower_explicit_io to lower it
as if it were SSBO or global memory access. Among other things, this
should enable pointer arithmetic on local variables. Fun!
The only shader-db change from this change on ICL was a few tiny cycle
count changes in 7 Aztec Ruins compute shaders.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5909 >
2020-09-03 14:26:49 +00:00
Jason Ekstrand
38a83a3048
nir/lower_indirect_derefs: Add a threshold
...
Instead of always lowering everything, we add a threshold such that if
the total indirected array size (AoA size) is above that threshold, it
won't lower. It's assumed that the driver will sort things out somehow
by, for instance, lowering to scratch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5909 >
2020-09-03 14:26:49 +00:00
Jason Ekstrand
c897cd0278
intel/compiler: Handle all indirect lowering choices in brw_nir.c
...
Since everything flows through NIR and we're doing all of our indirect
deref lowering there now, there's no reason to keep making those
decisions in brw_compiler and stuffing them in the GLSL compiler
structs.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5909 >
2020-09-03 14:26:49 +00:00
Mike Blumenkrantz
9005c9cae4
zink: generically handle matrix types
...
there's a bunch of glsl 1.10 tests for this
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6268 >
2020-09-03 14:01:09 +00:00
Erik Faye-Lund
2c5c55e72a
gallium/util: use uint sampler for stencil-reads
...
Some drivers can't use float-samplers to read integer textures, so let's
make sure the stenicil-sampler has the right type.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6512 >
2020-09-03 10:06:50 +00:00
Marek Olšák
98e866c669
radeonsi: optimize out the loop in si_get_ps_input_cntl
...
Use a remap table from a semantic to an index instead of searching
for the correct index.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
6ecb8b6899
radeonsi: replace TGSI_SEMANTIC with VARYING_SLOT and FRAG_RESULT
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
a803008c7f
radeonsi: replace TGSI_INTERPOLATE with INTERP_MODE
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
99fe3ef8ba
compiler: add INTERP_MODE_COLOR for radeonsi
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
6925401a38
radeonsi: remove si_shader_selector::type
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
23fdb79e92
radeonsi: change PIPE_SHADER to MESA_SHADER (si_dump_descriptors)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
966307983b
radeonsi: precompute si_*_descriptors_idx in si_shader_selector
...
It helps remove one use of sel->type.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
cbfc13b27c
radeonsi: change PIPE_SHADER to MESA_SHADER (si_shader_dump_disassembly)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
62aaa0d0b7
radeonsi: remove unused si_shader_context::type
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
5151421ad0
radeonsi: change PIPE_SHADER to MESA_SHADER (si_get_shader_part)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
a90d1df820
radeonsi: change PIPE_SHADER to MESA_SHADER (si_compile_llvm)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
3c54d73e4b
radeonsi: change PIPE_SHADER to MESA_SHADER (debug flags)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
b4b323c81e
radeonsi: change PIPE_SHADER to MESA_SHADER (si_shader_context::type)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
b1cb72c449
radeonsi: change PIPE_SHADER to MESA_SHADER (si_shader_selector::type)
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
14391533f8
radeonsi: simplify handling color interp modes in si_emit_spi_map
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
562b8c1a47
radeonsi: don't execute LDS stores for TCS outputs that are never read
...
This is a per-component version of the previous mechanism.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340 >
2020-09-02 23:03:00 -04:00
Marek Olšák
08ee72100f
radeonsi: don't lower indirect IO in GLSL
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6445 >
2020-09-02 22:45:38 -04:00
Marek Olšák
f4d0565f52
radeonsi: remove in/out/uniform variables from NIR after lowering IO
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6445 >
2020-09-02 22:45:38 -04:00
Marek Olšák
81d106d6ec
radeonsi: lower IO intrinsics - complete rewrite of input/output scanning
...
Input and output info is gathered from intrinsics. nir_variables are
ignored (and we'll remove them anyway).
This is a prerequisite for ACO, but also makes the IR prettier.
The ac_nir_to_llvm change has to be in this commit.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6445 >
2020-09-02 22:45:38 -04:00
Marek Olšák
408fc4e3ac
ac/nir: handle all lowered IO intrinsics
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6445 >
2020-09-02 22:45:38 -04:00
Marek Olšák
44eaee688b
radeonsi: clean up code for loading VS inputs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6445 >
2020-09-02 22:45:38 -04:00
Marek Olšák
ed9391df3f
radeonsi: get color interpolation info from shader_info
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6445 >
2020-09-02 22:45:38 -04:00
Marek Olšák
0464ee7f9d
radeonsi: don't crash if input_usage_mask is 0 for a VS input
...
This will start happening with the lowered IO intrinstics and new scanning
code.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6445 >
2020-09-02 22:45:38 -04:00
Rob Clark
bf23ff83e6
freedreno: fence_server_sync() fixes
...
Two potential problems, batch re-ordering doesn't really play nicely
with fence_server_sync(), so when we switch away from one batch, detect
the case that we need to sync, and if so flush. The alternative of
trying to track that later batches depend on an earlier batch that had
an in-fence is hairy, and the normal use-case would be to sync at the
beginning of the frame.
But this brings up the second problem, which is that typically we'll get
told to sync on an in-fence before the first draw, which means before
mesa/st flushes down the framebuffer state to the driver. Which means
we don't yet have the correct batch to attach the fence to. So we need
to track the in-fence on the context, and transfer it to the batch
before draws, etc.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6575 >
2020-09-03 00:06:36 +00:00
Rob Clark
aae1e68637
freedreno: Fix missing rsc->seqno updates
...
There were a couple paths where we weren't getting valid seqno's, which
are supposed to be updated whenever the backing bo is set/changed. So
wrap that up in a helper to make it harder to mess up.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6575 >
2020-09-03 00:06:36 +00:00
Eric Engestrom
e953f6c001
docs: shift 20.2 rc dates by two weeks to match reality
...
The release candidates have slipped by a couple of weeks, so let's fix
the dates in the calendar.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6574 >
2020-09-02 20:48:18 +00:00
Eric Engestrom
cdb666bc8f
docs: update calendar and link releases notes for 20.1.7
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6573 >
2020-09-02 20:43:58 +00:00
Eric Engestrom
aca2bda967
docs: add release notes for 20.1.7
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6573 >
2020-09-02 20:43:58 +00:00
Jason Ekstrand
bbaa62e4e1
iris: Re-emit push constants if we have a varying workgroup size
...
Fixes: 33c61eb2f1
"iris: Implement ARB_compute_variable_group_size"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6570 >
2020-09-02 20:38:22 +00:00
Jason Ekstrand
fe18a0fd45
intel/nir: Lower load_num_work_groups to 32-bit if needed
...
For OpenCL-style kernels, this builtin is 64-bit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6570 >
2020-09-02 20:38:22 +00:00
Jason Ekstrand
5799da47c7
intel/fs: Use a single untyped surface read for load_num_work_groups
...
There's no good reason to split this into three. Sure, CS indirects are
only guaranteed by the spec to be DWORD aligned, but that's all untyped
surface reads require anyway.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6570 >
2020-09-02 20:38:22 +00:00
Jason Ekstrand
8e8701b43a
intel/fs: Don't copy-propagate stride=0 sources into ddx/ddy
...
This can come up if, for instance, the shader does a derivative of a
uniform or flat input. Ideally, NIR would use divergence analysis to
get rid of the derivative in this case but it doesn't right now. This
fixes a crash in F1 2017.
Cc: mesa-stable@lists.freedesktop.org
Reported-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6564 >
2020-09-02 20:31:32 +00:00
Marek Olšák
95415a54c0
st/mesa: fix lowered IO - don't call st_nir_assign_vs_in_locations twice
...
If IO is lowered, the second call is a no-op, which breaks:
spec@!opengl 1.1@gl-1.1-color-material-unused-normal-array
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6540 >
2020-09-02 20:05:05 +00:00
Marek Olšák
8c43edf9f9
nir: fix a bug in is_dual_slot in nir_io_add_const_offset_to_base
...
Fixes: 01ab308edc
"nir: update IO semantics in nir_io_add_const_offset_to_base"
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6540 >
2020-09-02 20:05:05 +00:00
Jason Ekstrand
536727c465
iris: Patch constant data pointers into shaders
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6244 >
2020-09-02 19:48:44 +00:00
Jason Ekstrand
5ee3242837
anv: Patch constant data pointers into shaders with using softpin
...
When we have softpin, we know the address of the shader constant data at
shader upload time because it's sitting at the end of the shader. This
commit changes ANV to use patch constants to embed the address in the
shader patch the right address in at upload time. This allows us to
avoid having to set up a UBO binding on-the-fly for shader constants.
This commit uses an A64 message but it's quite possible that we could
also use an A32 message and make the dataport do the 64-bit add for us.
However, load_global is what we have right now so it was easier to just
use that.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6244 >
2020-09-02 19:48:44 +00:00
Jason Ekstrand
a06955f4ef
nir/builder: Add load/store_global helpers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6244 >
2020-09-02 19:48:44 +00:00
Jason Ekstrand
a5acf3d8c3
anv: Properly cache brw_stage_prog_data::relocs
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6244 >
2020-09-02 19:48:44 +00:00
Jason Ekstrand
91becd84ae
intel/fs: Add support for a new load_reloc_const intrinsic
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6244 >
2020-09-02 19:48:44 +00:00