Marek Olšák
c597e394d4
radeonsi: stop using TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
5aeaf3d7bc
radeonsi: stop using TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
ba7b87a8a2
radeonsi: stop using TGSI_PROPERTY_CS_*
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
e627528e27
radeonsi: stop using TGSI_PROPERTY_GS_*
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
a8e7024792
radeonsi: stop using TGSI_PROPERTY_TES_VERTEX_ORDER_CW
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
eeea2f52c7
radeonsi: stop using TGSI_PROPERTY_TES_SPACING
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
34b8e60cb8
radeonsi: stop using TGSI_PROPERTY_TES_POINT_MODE / TES_PRIM_MODE
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
af59f06918
radeonsi: stop using TGSI_PROPERTY_TCS_VERTICES_OUT
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
a37d897d69
radeonsi: stop using TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION / VS_BLIT_SGPRS_AMD
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Marek Olšák
46bb051bc2
radeonsi: stop using TGSI_PROPERTY_NEXT_SHADER
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624 >
2020-09-07 11:15:40 +00:00
Andreas Baierl
4c5f5d238b
lima/ppir: Skip instruction merge when having more than one successor
...
ppir_do_one_node_to_instr merges instructions and uses a pipeline reg
to save a reg. It tests if ppir_node_has_single_src_succ, but it should
check if ppir_node_has_single_succ.
The following deqp tests run into this issue because they have a node
with 2 successors in different blocks, where one was merged into the same
instruction and the second one is pointing to a missing predecessor then.
Fixes the following deqp tests:
dEQP-GLES2.functional.shaders.loops.do_while_dynamic_iterations.vector_counter_fragment
dEQP-GLES2.functional.shaders.loops.for_dynamic_iterations.vector_counter_fragment
dEQP-GLES2.functional.shaders.loops.while_dynamic_iterations.vector_counter_fragment
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6555 >
2020-09-07 09:55:06 +00:00
jzielins
927a395f04
swr: Fix crashes on non-AVX hardware
...
Compilers may use vector instructions in calculating
hash values of std::string. This happens usualy when
high optimalization level is enabled. SWR had two
static std::map<std::string, T> variables which
lead to crashes on non-AVX systems during the initialization
of those variables. This commit makes those variables
dynamically allocated and fixes this AVX instruction
leak.
Closes : #3077
Closes : #198
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6565 >
2020-09-07 09:24:39 +00:00
Mauro Rossi
be31398d22
android: nv50/ir: Add nv50_ir_prog_info_out serialize and deserialize
...
Fixes the following building errors:
ld.lld: error: undefined symbol: nv50_ir_prog_info_serialize
>>> referenced by nvc0_program.c:647 (external/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_program.c:647)
>>> nvc0_program.o:(nvc0_program_translate) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_nouveau_intermediates/libmesa_pipe_nouveau.a
ld.lld: error: undefined symbol: nv50_ir_prog_info_out_deserialize
>>> referenced by nvc0_program.c:656 (external/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_program.c:656)
>>> nvc0_program.o:(nvc0_program_translate) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_nouveau_intermediates/libmesa_pipe_nouveau.a
ld.lld: error: undefined symbol: nv50_ir_prog_info_out_serialize
>>> referenced by nvc0_program.c:674 (external/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_program.c:674)
>>> nvc0_program.o:(nvc0_program_translate) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_nouveau_intermediates/libmesa_pipe_nouveau.a
Fixes: f20a210dc ("nv50/ir: Add nv50_ir_prog_info_out serialize and deserialize")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6627 >
2020-09-07 07:05:11 +00:00
Marek Olšák
a407123789
radeonsi: move nir_shader_compiler_options into si_screen
...
so that they can be different depending on the GPU (for 16-bit support)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284 >
2020-09-06 14:36:20 +00:00
Marek Olšák
1476bea764
radeonsi: remove redundant no-signed-zero-fp-math LLVM attribute
...
Already set by AC_FLOAT_MODE_DEFAULT_OPENGL.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284 >
2020-09-06 14:36:20 +00:00
Marek Olšák
ac55b1a9a6
nir: get ffma support from NIR options for nir_lower_flrp
...
This also fixes the inverted last parameter of nir_lower_flrp in most drivers.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6599 >
2020-09-04 17:06:22 +00:00
Nanley Chery
efd439e0d6
iris: Better determine map_would_stall for Z/S
...
Use iris_has_invalid_primary to determine if mapping a depth or stencil
surface would lead to a stall due to resolving.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6192 >
2020-09-04 15:29:57 +00:00
Nanley Chery
2c30079628
iris: Drop a use of the need_resolve boolean
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6192 >
2020-09-04 15:29:57 +00:00
Nanley Chery
5b82d8ce8b
iris: Avoid resolving Z/S reads in transfer_map
...
Resolves are destructive for depth and stencil surfaces, so avoid
resolving them for reads.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6192 >
2020-09-04 15:29:57 +00:00
Nanley Chery
2982d7c63b
iris: Make iris_has_color_unresolved more generic
...
Replace iris_has_color_unresolved with iris_has_invalid_primary.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6192 >
2020-09-04 15:29:57 +00:00
Nanley Chery
e7908a95f9
iris: Fold a condition into no_gpu for consistency
...
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6192 >
2020-09-04 15:29:57 +00:00
Vinson Lee
bb80ed8873
panfrost: Fix gnu-empty-initializer errors.
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3473
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6551 >
2020-09-03 18:47:49 -07:00
Nanley Chery
3cf6325e72
iris: Fix aux assertion in resource_get_handle
...
iris_resource_get_handle currently asserts that the resource has an aux
state that is suitable for sharing. However, the caller of this function
can pass a flag to specify that it will handle flushing/resolving the
resource as needed for sharing. Take this flag into account when
asserting the state of the aux buffer.
Fixes: e81392868e ("iris/resource: Drop redundant checks for aux support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/128
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1371 >
2020-09-03 23:43:02 +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
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
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
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
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