mesa.git
13 months agoswr: fix build with mingw
Michel Zou [Tue, 1 Sep 2020 07:22:27 +0000 (09:22 +0200)]
swr: fix build with mingw

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Cc: mesa-stable
closes #3454

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

13 months agoradeonsi: kill point size VS output if it's not used by the rasterizer
Marek Olšák [Sun, 6 Sep 2020 05:22:01 +0000 (01:22 -0400)]
radeonsi: kill point size VS output if it's not used by the rasterizer

Fixed-func shaders can contain the output, because their generator
doesn't consider the current primitive type into account.

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

13 months agoradeonsi: deduplicate setting key.mono.u.vs_export_prim_id
Marek Olšák [Sun, 6 Sep 2020 04:55:57 +0000 (00:55 -0400)]
radeonsi: deduplicate setting key.mono.u.vs_export_prim_id

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

13 months agoradeonsi: use shader_info::cs::local_size_variable to clean up some code
Marek Olšák [Sun, 6 Sep 2020 15:38:53 +0000 (11:38 -0400)]
radeonsi: use shader_info::cs::local_size_variable to clean up some code

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

13 months agoradeonsi: remove redundant si_shader_info::uses_derivatives
Marek Olšák [Sun, 6 Sep 2020 15:31:18 +0000 (11:31 -0400)]
radeonsi: remove redundant si_shader_info::uses_derivatives

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

13 months agoradeonsi: remove redundant si_shader_selector::max_gs_stream
Marek Olšák [Sun, 6 Sep 2020 15:26:16 +0000 (11:26 -0400)]
radeonsi: remove redundant si_shader_selector::max_gs_stream

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

13 months agoradeonsi: remove redundant GS variables in si_shader_selector
Marek Olšák [Sun, 6 Sep 2020 15:23:13 +0000 (11:23 -0400)]
radeonsi: remove redundant GS variables in si_shader_selector

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

13 months agoradeonsi: remove redundant si_shader_info::writes_memory
Marek Olšák [Sun, 6 Sep 2020 15:19:58 +0000 (11:19 -0400)]
radeonsi: remove redundant si_shader_info::writes_memory

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

13 months agoradeonsi: rename num_memory_instructions -> num_memory_stores
Marek Olšák [Sun, 6 Sep 2020 15:18:39 +0000 (11:18 -0400)]
radeonsi: rename num_memory_instructions -> num_memory_stores

it only counts stores

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

13 months agoradeonsi: reduce type sizes in si_shader_selector
Marek Olšák [Sun, 6 Sep 2020 06:50:44 +0000 (02:50 -0400)]
radeonsi: reduce type sizes in si_shader_selector

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

13 months agoradeonsi: remove redundant si_shader_info::uses_kill
Marek Olšák [Sun, 6 Sep 2020 06:40:58 +0000 (02:40 -0400)]
radeonsi: remove redundant si_shader_info::uses_kill

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

13 months agoradeonsi: merge uses_persp_opcode_interp_sample/uses_linear_opcode_interp_sample
Marek Olšák [Sun, 6 Sep 2020 06:38:09 +0000 (02:38 -0400)]
radeonsi: merge uses_persp_opcode_interp_sample/uses_linear_opcode_interp_sample

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

13 months agoradeonsi: remove unused si_shader_info::uses_(vertexid|basevertex)
Marek Olšák [Sun, 6 Sep 2020 06:36:34 +0000 (02:36 -0400)]
radeonsi: remove unused si_shader_info::uses_(vertexid|basevertex)

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

13 months agoradeonsi: remove redundant si_shader_info:*(clip|cull)* fields
Marek Olšák [Sun, 6 Sep 2020 06:30:54 +0000 (02:30 -0400)]
radeonsi: remove redundant si_shader_info:*(clip|cull)* fields

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

13 months agoradeonsi: remove redundant si_shader_info::const_buffers_declared
Marek Olšák [Sun, 6 Sep 2020 06:15:51 +0000 (02:15 -0400)]
radeonsi: remove redundant si_shader_info::const_buffers_declared

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

13 months agoradeonsi: remove redundant si_shader_info::images_declared
Marek Olšák [Sun, 6 Sep 2020 06:15:51 +0000 (02:15 -0400)]
radeonsi: remove redundant si_shader_info::images_declared

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

13 months agoradeonsi: remove redundant si_shader_info::shader_buffers_declared
Marek Olšák [Sun, 6 Sep 2020 06:15:51 +0000 (02:15 -0400)]
radeonsi: remove redundant si_shader_info::shader_buffers_declared

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

13 months agoradeonsi: remove info::samplers_declared, image_buffers, msaa_images_declared
Marek Olšák [Sun, 6 Sep 2020 06:10:33 +0000 (02:10 -0400)]
radeonsi: remove info::samplers_declared, image_buffers, msaa_images_declared

They are redundant with shader_info.

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

13 months agoradeonsi: stop using TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS
Marek Olšák [Tue, 1 Sep 2020 22:41:36 +0000 (18:41 -0400)]
radeonsi: stop using TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS

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

13 months agoradeonsi: stop using TGSI_PROPERTY_CS_LOCAL_SIZE
Marek Olšák [Tue, 1 Sep 2020 22:38:37 +0000 (18:38 -0400)]
radeonsi: stop using TGSI_PROPERTY_CS_LOCAL_SIZE

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

13 months agoradeonsi: stop using TGSI_PROPERTY_FS_DEPTH_LAYOUT
Marek Olšák [Tue, 1 Sep 2020 22:27:11 +0000 (18:27 -0400)]
radeonsi: stop using TGSI_PROPERTY_FS_DEPTH_LAYOUT

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

13 months agoradeonsi: stop using TGSI_PROPERTY_FS_COORD_PIXEL_CENTER
Marek Olšák [Tue, 1 Sep 2020 22:22:24 +0000 (18:22 -0400)]
radeonsi: stop using TGSI_PROPERTY_FS_COORD_PIXEL_CENTER

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

13 months agoradeonsi: stop using TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE
Marek Olšák [Tue, 1 Sep 2020 22:20:09 +0000 (18:20 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL
Marek Olšák [Tue, 1 Sep 2020 22:17:41 +0000 (18:17 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_CS_*
Marek Olšák [Tue, 1 Sep 2020 22:14:57 +0000 (18:14 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_GS_*
Marek Olšák [Tue, 1 Sep 2020 22:08:05 +0000 (18:08 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_TES_VERTEX_ORDER_CW
Marek Olšák [Tue, 1 Sep 2020 22:05:52 +0000 (18:05 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_TES_SPACING
Marek Olšák [Tue, 1 Sep 2020 22:04:57 +0000 (18:04 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_TES_POINT_MODE / TES_PRIM_MODE
Marek Olšák [Tue, 1 Sep 2020 21:54:47 +0000 (17:54 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_TCS_VERTICES_OUT
Marek Olšák [Tue, 1 Sep 2020 21:53:10 +0000 (17:53 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION / VS_BLIT_SGPRS_AMD
Marek Olšák [Tue, 1 Sep 2020 21:50:59 +0000 (17:50 -0400)]
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>

13 months agoradeonsi: stop using TGSI_PROPERTY_NEXT_SHADER
Marek Olšák [Tue, 1 Sep 2020 21:48:44 +0000 (17:48 -0400)]
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>

13 months agolima/ppir: Skip instruction merge when having more than one successor
Andreas Baierl [Wed, 2 Sep 2020 09:27:10 +0000 (11:27 +0200)]
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>

13 months agoswr: Fix crashes on non-AVX hardware
jzielins [Wed, 2 Sep 2020 17:55:29 +0000 (19:55 +0200)]
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>

13 months agoamd/common: switch to 3-spaces style
Pierre-Eric Pelloux-Prayer [Mon, 7 Sep 2020 07:58:36 +0000 (09:58 +0200)]
amd/common: switch to 3-spaces style

Follow-up of !4319 using the same clang-format config.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5310>

13 months agoamd/llvm: switch to 3-spaces style
Pierre-Eric Pelloux-Prayer [Mon, 7 Sep 2020 07:56:01 +0000 (09:56 +0200)]
amd/llvm: switch to 3-spaces style

Follow-up of !4319 using the same clang-format config.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5310>

13 months agovulkan/device_select: don't pick a cpu driver as the default
Dave Airlie [Tue, 1 Sep 2020 23:08:52 +0000 (09:08 +1000)]
vulkan/device_select: don't pick a cpu driver as the default

This should stop apps using vallium by accident, when there
are better options.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6552>

13 months agoandroid: nv50/ir: Add nv50_ir_prog_info_out serialize and deserialize
Mauro Rossi [Sat, 5 Sep 2020 21:35:28 +0000 (23:35 +0200)]
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>

13 months agoci: Run deqp-gles3 and deqp-gles31 on RadeonSI
Tomeu Vizoso [Fri, 21 Aug 2020 08:49:51 +0000 (10:49 +0200)]
ci: Run deqp-gles3 and deqp-gles31 on RadeonSI

Only a fourth of the GLES3 tests and a fifth of the GLES31 tests for
now, as the machine is quite slow and there's a problem with dEQP
calling fesetround all the time and that being very expensive on x86_64.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6580>

13 months agoradeonsi: fix user fence space when MCBP is enabled
Qiang Yu [Thu, 3 Sep 2020 03:30:28 +0000 (11:30 +0800)]
radeonsi: fix user fence space when MCBP is enabled

When MCBP is enabled, IB maybe preempted which will also update
the preempted fence field of the user fence. So we need to reserve
enough space for each user fence.

Fixes: 89d2dac5548 "radeonsi: enable preemption if the kernel enabled it"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6577>

13 months agoradeonsi: fix syncobj wait timeout
Qiang Yu [Thu, 3 Sep 2020 09:39:41 +0000 (17:39 +0800)]
radeonsi: fix syncobj wait timeout

syncobj wait takes absolute timeout value.

Fixes: 162502370c7 "winsys/amdgpu: implement sync_file import/export"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6579>

13 months agoandroid: util: fix missing include path
Mauro Rossi [Sat, 5 Sep 2020 16:49:19 +0000 (18:49 +0200)]
android: util: fix missing include path

Fixes the following building error:

external/mesa/src/util/format/u_format_bptc.c:28:10:
fatal error: 'u_format_pack.h' file not found
         ^~~~~~~~~~~~~~~~~
1 error generated.

Fixes: 8d38b2578 ("util: Explicitly call the unpack functions from inside bptc pack/unpack.")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6619>

13 months agoandroid: amd/registers: switch to new generated register definitions
Mauro Rossi [Sat, 5 Sep 2020 15:59:48 +0000 (17:59 +0200)]
android: amd/registers: switch to new generated register definitions

Android building rules are aligned to meson ones

Fixes the following building error:

FAILED: ninja: 'external/mesa/src/amd/registers/amdgfxregs.json',
needed by 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_amd_common_intermediates/common/sid_tables.h',
missing and no known rule to make it

Fixes: b7a6333ee ("amd/registers: switch to new generated register definitions")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6618>

13 months agoac/llvm: fix b2f for v2f16
Marek Olšák [Sun, 6 Sep 2020 07:46:59 +0000 (03:46 -0400)]
ac/llvm: fix b2f for v2f16

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoac/llvm: add better code for fsign
Marek Olšák [Thu, 3 Sep 2020 09:31:36 +0000 (05:31 -0400)]
ac/llvm: add better code for fsign

There are 2 improvements:
- better code for 16, 32, and 64 bits
- vector support for 16 and 32 bits

Totals:
SGPRS: 2639738 -> 2625882 (-0.52 %)
VGPRS: 1534120 -> 1533916 (-0.01 %)
Spilled SGPRs: 3541 -> 3557 (0.45 %)
Spilled VGPRs: 33 -> 33 (0.00 %)
Private memory VGPRs: 256 -> 256 (0.00 %)
Scratch size: 292 -> 292 (0.00 %) dwords per thread
Code Size: 55640332 -> 55384892 (-0.46 %) bytes
Max Waves: 964785 -> 964857 (0.01 %)

Totals from affected shaders:
SGPRS: 377352 -> 363496 (-3.67 %)
VGPRS: 209800 -> 209596 (-0.10 %)
Spilled SGPRs: 1979 -> 1995 (0.81 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 256 -> 256 (0.00 %)
Scratch size: 256 -> 256 (0.00 %) dwords per thread
Code Size: 12549300 -> 12293860 (-2.04 %) bytes
Max Waves: 105762 -> 105834 (0.07 %)

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoac/llvm: add better code for isign
Marek Olšák [Thu, 3 Sep 2020 09:51:17 +0000 (05:51 -0400)]
ac/llvm: add better code for isign

There are 2 improvements:
- select v_med3_i32
- support vectors

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoac/llvm: remove dead code handling for fmod
Marek Olšák [Thu, 23 Jul 2020 02:05:45 +0000 (22:05 -0400)]
ac/llvm: remove dead code handling for fmod

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoac/llvm: fix bcsel for v2*16
Marek Olšák [Sat, 4 Jul 2020 20:49:52 +0000 (16:49 -0400)]
ac/llvm: fix bcsel for v2*16

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoac/llvm: fix amdgcn.rsq for v2f16
Marek Olšák [Thu, 23 Jul 2020 03:03:39 +0000 (23:03 -0400)]
ac/llvm: fix amdgcn.rsq for v2f16

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoac/llvm: fix amdgcn.fract for v2f16
Marek Olšák [Sat, 4 Jul 2020 20:50:06 +0000 (16:50 -0400)]
ac/llvm: fix amdgcn.fract for v2f16

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoac/llvm: fix amdgcn.rcp for v2f16
Marek Olšák [Sat, 4 Jul 2020 20:17:28 +0000 (16:17 -0400)]
ac/llvm: fix amdgcn.rcp for v2f16

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoac/llvm: remove stub prototype for fmed3
Marek Olšák [Thu, 3 Sep 2020 10:18:18 +0000 (06:18 -0400)]
ac/llvm: remove stub prototype for fmed3

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6284>

13 months agoRevert "ac: generate FMA for inexact instructions for radeonsi"
Marek Olšák [Tue, 1 Sep 2020 03:37:37 +0000 (23:37 -0400)]
Revert "ac: generate FMA for inexact instructions for radeonsi"

This reverts commit 4b9370cb0f3a2d9030e827f847f66bdefeaf08fd.

Fixes: 4b9370cb0f3a2d9030e827f847f66bdefeaf08fd
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3429
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>

13 months agoradeonsi: move nir_shader_compiler_options into si_screen
Marek Olšák [Sun, 3 May 2020 23:38:51 +0000 (19:38 -0400)]
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>

13 months agoradeonsi: remove redundant no-signed-zero-fp-math LLVM attribute
Marek Olšák [Thu, 3 Sep 2020 08:42:38 +0000 (04:42 -0400)]
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>

13 months agoegl/x11: Free memory allocated for reply structures on error
Andrey Vostrikov [Thu, 27 Aug 2020 06:32:48 +0000 (09:32 +0300)]
egl/x11: Free memory allocated for reply structures on error

This patch fixes memory leaks when reply is allocated and is not freed
on error execution path.

Found by enabling address sanitizer on simple EGL app.

```c

int main()
{
    EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    EGLint major;
    EGLint minor;

    if (!eglInitialize(display, &major, &minor))
    {
        return 1;
    }
    eglTerminate(display);
    return 0;
}
```

Compiled with: `gcc testme.c -o testme -fsanitize=address -lasan -lEGL`

Execution environment:
- Windows 10, VMWare Player 15.5.2 build-15785246 without 3D accelaration
- Guest OS: OpenSUSE Leap 15.2
- Mesa 19.3.4

Program output:

```sh
ASAN_OPTIONS=fast_unwind_on_malloc=0 ./testme

libEGL warning: DRI2: failed to authenticate
==52510==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7fa62315f500 in malloc (/usr/lib64/libasan.so.4+0xdc500)
    #1 0x7fa61e12d86b  (/usr/lib64/libxcb.so.1+0xf86b)
    #2 0x7fa61e12b5c7  (/usr/lib64/libxcb.so.1+0xd5c7)
    #3 0x7fa61e12cc3e  (/usr/lib64/libxcb.so.1+0xec3e)
    #4 0x7fa61e12cd4f in xcb_wait_for_reply (/usr/lib64/libxcb.so.1+0xed4f)
    #5 0x7fa61ebe02a5  (/usr/lib64/libEGL_mesa.so.0+0x202a5)
    #6 0x7fa61ebdb5ca  (/usr/lib64/libEGL_mesa.so.0+0x1b5ca)
    #7 0x7fa61ebd750c  (/usr/lib64/libEGL_mesa.so.0+0x1750c)
    #8 0x7fa61ebd7554  (/usr/lib64/libEGL_mesa.so.0+0x17554)
    #9 0x7fa61ebd1107  (/usr/lib64/libEGL_mesa.so.0+0x11107)
    #10 0x400856 in main (/home/user/testme+0x400856)
    #11 0x7fa622ad8349 in __libc_start_main (/lib64/libc.so.6+0x24349)
    #12 0x4006e9 in _start (/home/user/testme+0x4006e9)

SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s).
```

Signed-off-by: Andrey Vostrikov <av.linux.dev@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6611>

13 months agoglsl_to_nir: fix crashes with int16 shifts
Marek Olšák [Thu, 3 Sep 2020 13:27:58 +0000 (09:27 -0400)]
glsl_to_nir: fix crashes with int16 shifts

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6613>

13 months agoAt this commit driver skeleton is able to dump spirv and nir
Vivek Pandya [Sun, 6 Sep 2020 09:05:54 +0000 (14:35 +0530)]
At this commit driver skeleton is able to dump spirv and nir
for first shader being inserted in pipeline.

13 months agoAt this stage after adding few more stubs driver fails at
Vivek Pandya [Sun, 6 Sep 2020 04:36:57 +0000 (10:06 +0530)]
At this stage after adding few more stubs driver fails at
libresoc_CreateGraphicsPipelines().

13 months agoMaking SWAPChain exntesions work.
Vivek Pandya [Sat, 5 Sep 2020 11:48:28 +0000 (17:18 +0530)]
Making SWAPChain exntesions work.
There is lots of commented code.

13 months agoImplement libresoc_DeviceWaitIdle() libresoc_QueueWaitIdle().
Vivek Pandya [Sun, 30 Aug 2020 15:48:06 +0000 (21:18 +0530)]
Implement libresoc_DeviceWaitIdle() libresoc_QueueWaitIdle().

13 months agoImplement GetDeviceQueue()
Vivek Pandya [Sun, 30 Aug 2020 15:26:32 +0000 (20:56 +0530)]
Implement GetDeviceQueue()

13 months agoAdd implementation for libresoc_CreatePipelineCache().
Vivek Pandya [Sun, 30 Aug 2020 12:13:53 +0000 (17:43 +0530)]
Add implementation for libresoc_CreatePipelineCache().
At this commit test fails at libresoc_GetDeviceQueue() which is yet to be implemented.

13 months agoAdd code to few more essential methods in libresoc_device.c
Vivek Pandya [Sun, 30 Aug 2020 08:17:17 +0000 (13:47 +0530)]
Add code to few more essential methods in libresoc_device.c
Currently code failes in libresoc_CreateDevice() because it requires
implementation for libresoc_CreatePipelineCache().

13 months agoCreate very primitive physical device and instance.
Vivek Pandya [Fri, 28 Aug 2020 16:37:54 +0000 (22:07 +0530)]
Create very primitive physical device and instance.

13 months agoLibreSoc Vulkan Driver Initial Commit
Vivek Pandya [Tue, 25 Aug 2020 14:52:38 +0000 (20:22 +0530)]
LibreSoc Vulkan Driver Initial Commit
  - This commit mostly includes copy & paste code from other vulkan driver.
  - Python scripts to generate extensions, entrypoints and icd.
  - Meson file updates.

13 months agospirv: fix emitting switch cases that directly jump to the merge block
Samuel Pitoiset [Thu, 3 Sep 2020 20:02:01 +0000 (22:02 +0200)]
spirv: fix emitting switch cases that directly jump to the merge block

As shown in the valid SPIR-V below, if one switch case statement
directly jumps to the merge block, it has no branches at all and
we have to reset the fall variable. Otherwise, it creates an
unintentional fallthrough.

       OpSelectionMerge %97 None
       OpSwitch %96 %97 1 %99 2 %100
%100 = OpLabel
%102 = OpAccessChain %_ptr_StorageBuffer_v4float %86 %uint_0 %uint_37
%103 = OpLoad %v4float %102
%104 = OpBitcast %v4uint %103
%105 = OpCompositeExtract %uint %104 0
%106 = OpShiftLeftLogical %uint %105 %uint_1
       OpBranch %97
 %99 = OpLabel
       OpBranch %97
 %97 = OpLabel
%107 = OpPhi %uint %uint_4 %75 %uint_5 %99 %106 %100

This fixes serious corruption in Horizon Zero Dawn.

v2: Changed the code to skip the entire if-block instead of resetting
    the fallthrough variable.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3460
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6590>

13 months agocompiler/types: Fix deserializing structs with >= 15 members
Jason Ekstrand [Fri, 4 Sep 2020 19:06:29 +0000 (14:06 -0500)]
compiler/types: Fix deserializing structs with >= 15 members

This was a typo in a0b82c24b6d08c where we used the wrong struct member
to decide whether or not to read the explicit_alignment.

Fixes: a0b82c24b6d08c "nir/glsl: Add an explicit_alignment field to glsl_type"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3487
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6605>

13 months agofreedreno/regs: add 7nm DSI PHY/PLL regs
Jonathan Marek [Fri, 4 Sep 2020 17:36:22 +0000 (13:36 -0400)]
freedreno/regs: add 7nm DSI PHY/PLL regs

This is for the kernel driver.

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

13 months agogallivm: add InstSimplify pass
Roland Scheidegger [Wed, 2 Sep 2020 02:04:50 +0000 (04:04 +0200)]
gallivm: add InstSimplify pass

This is the recommended replacement for the removed ConstantPropagation
pass, and llvm now added c binding for it.

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

13 months agointel/compiler: fix typo in a comment
Marcin Ślusarz [Thu, 2 Jul 2020 16:57:08 +0000 (18:57 +0200)]
intel/compiler: fix typo in a comment

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6602>

13 months agointel/compiler: print dispatch width when shader fails to compile
Marcin Ślusarz [Thu, 2 Jul 2020 11:37:10 +0000 (13:37 +0200)]
intel/compiler: print dispatch width when shader fails to compile

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6602>

13 months agointel/compiler: move extern C functions out of namespace brw
Marcin Ślusarz [Fri, 26 Jun 2020 18:15:35 +0000 (20:15 +0200)]
intel/compiler: move extern C functions out of namespace brw

brw_compile_gs and brw_compile_tcs are extern C functions, but are
defined inside of brw namespace, which somehow works but confuses
Eclipse CDT's code analysis.

Move these functions out of brw namespace and fix references to
objects from brw namespace.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6602>

13 months agointel/compiler: use the same name for nir shaders in brw_compile_* functions
Marcin Ślusarz [Fri, 4 Sep 2020 16:43:35 +0000 (18:43 +0200)]
intel/compiler: use the same name for nir shaders in brw_compile_* functions

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6602>

13 months agointel/compiler: match brw_compile_* declarations with their definitions
Marcin Ślusarz [Fri, 26 Jun 2020 17:54:29 +0000 (19:54 +0200)]
intel/compiler: match brw_compile_* declarations with their definitions

Current state confuses Eclipse CDT's code analysis.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6602>

13 months agonir/algebraic: add 16-bit versions of a few 32-bit patterns
Marek Olšák [Tue, 1 Sep 2020 06:30:13 +0000 (02:30 -0400)]
nir/algebraic: add 16-bit versions of a few 32-bit patterns

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6599>

13 months agonir/algebraic: trivially enable existing 32-bit patterns for all bit sizes
Marek Olšák [Tue, 11 Aug 2020 22:49:37 +0000 (18:49 -0400)]
nir/algebraic: trivially enable existing 32-bit patterns for all bit sizes

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6599>

13 months agonir: get ffma support from NIR options for nir_lower_flrp
Marek Olšák [Thu, 23 Jul 2020 02:13:16 +0000 (22:13 -0400)]
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>

13 months agoiris: Better determine map_would_stall for Z/S
Nanley Chery [Tue, 23 Jun 2020 17:23:12 +0000 (10:23 -0700)]
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>

13 months agoiris: Drop a use of the need_resolve boolean
Nanley Chery [Tue, 23 Jun 2020 16:46:38 +0000 (09:46 -0700)]
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>

13 months agoiris: Avoid resolving Z/S reads in transfer_map
Nanley Chery [Wed, 24 Jun 2020 16:41:16 +0000 (09:41 -0700)]
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>

13 months agoiris: Make iris_has_color_unresolved more generic
Nanley Chery [Tue, 23 Jun 2020 16:52:47 +0000 (09:52 -0700)]
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>

13 months agoiris: Fold a condition into no_gpu for consistency
Nanley Chery [Wed, 24 Jun 2020 14:45:49 +0000 (07:45 -0700)]
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>

13 months agoaco: handle unaligned loads on GFX10.3
Samuel Pitoiset [Fri, 4 Sep 2020 10:02:50 +0000 (03:02 -0700)]
aco: handle unaligned loads on GFX10.3

Same as GFX10.

Cc: 20.2 mesa-stable
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/6594>

13 months agonir/load_store_vectorizer: Add unit tests for alignment handling.
Eric Anholt [Fri, 21 Aug 2020 23:59:33 +0000 (16:59 -0700)]
nir/load_store_vectorizer: Add unit tests for alignment handling.

The alignment upgrading logic is pretty tricky, but this gives me good
confidence that it actually works.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4710>

13 months agonir/load_store_vectorizer: Use more imm helpers in the tests.
Eric Anholt [Fri, 21 Aug 2020 23:49:13 +0000 (16:49 -0700)]
nir/load_store_vectorizer: Use more imm helpers in the tests.

It's a lot more readable this way, I think.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4710>

13 months agonir/load_store_vectorize: rework alignment calculation
Rhys Perry [Thu, 23 Apr 2020 15:13:10 +0000 (16:13 +0100)]
nir/load_store_vectorize: rework alignment calculation

It now also updates align_offset and creates better alignment information
with a constant 0 offset.

shader-db (Navi):
Totals from 63 (0.05% of 127638) affected shaders:
SGPRs: 3072 -> 3064 (-0.26%)
VGPRs: 2736 -> 2740 (+0.15%)
CodeSize: 325180 -> 324336 (-0.26%); split: -0.27%, +0.01%
Instrs: 63555 -> 63413 (-0.22%); split: -0.24%, +0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4710>

13 months agoaco: fix byte_align_scalar for 3 dword vectors
Rhys Perry [Mon, 24 Aug 2020 19:00:10 +0000 (20:00 +0100)]
aco: fix byte_align_scalar for 3 dword vectors

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: fe08f0ccf94a7315bded5868b4f6a8bae744de79
   ('aco: add byte_align_scalar() & trim_subdword_vector() helper functions')

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

13 months agointel/fs: add hint how to get more info when shader validation fails
Marcin Ślusarz [Wed, 2 Sep 2020 12:26:41 +0000 (14:26 +0200)]
intel/fs: add hint how to get more info when shader validation fails

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

13 months agointel: add INTEL_DEBUG=shaders
Marcin Ślusarz [Wed, 2 Sep 2020 12:25:54 +0000 (14:25 +0200)]
intel: add INTEL_DEBUG=shaders

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

13 months agoac/llvm: fix unaligned VS input loads on gfx10.3
Marek Olšák [Fri, 4 Sep 2020 10:38:15 +0000 (06:38 -0400)]
ac/llvm: fix unaligned VS input loads on gfx10.3

Fixes: a23802bcb9a
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6595>

13 months agonir: fix const-cast warning on MSVC
Erik Faye-Lund [Thu, 3 Sep 2020 13:21:23 +0000 (15:21 +0200)]
nir: fix const-cast warning on MSVC

We're casting pointers to const memory to const pointers. MSVC complains
about this with the following warning:

warning C4090: 'initializing': different 'const' qualifiers

In this case, we can easily use both constnesses, because all we do is
read here. So let's avoid the warning by adding another const-keyword.

Fixes: 193765e26ba ("nir/lower_goto_if: Sort blocks in select_fork")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6582>

13 months agomeson: drop leftover PTHREAD_SETAFFINITY_IN_NP_HEADER
Eric Engestrom [Tue, 1 Sep 2020 20:09:43 +0000 (22:09 +0200)]
meson: drop leftover PTHREAD_SETAFFINITY_IN_NP_HEADER

55765f80 replaced this with a check for the header itself.

Fixes: 55765f80b9ce7cce4ec6 ("util/u_thread: include pthread_np.h if found")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6548>

13 months agoradv,aco: disable opts if VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT
Samuel Pitoiset [Fri, 28 Aug 2020 06:41:20 +0000 (08:41 +0200)]
radv,aco: disable opts if VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT

Sounds useful to determine if ACO breaks a specific pipeline
because of various optimizations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6487>

13 months agopanfrost: Fix gnu-empty-initializer errors.
Vinson Lee [Tue, 1 Sep 2020 23:21:47 +0000 (16:21 -0700)]
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>

13 months agoiris: Fix aux assertion in resource_get_handle
Nanley Chery [Wed, 17 Jul 2019 20:19:43 +0000 (13:19 -0700)]
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: e81392868e6 ("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>

13 months agoci/bare-metal: Use python for handling fastboot booting and parsing
Eric Anholt [Mon, 31 Aug 2020 20:00:14 +0000 (13:00 -0700)]
ci/bare-metal: Use python for handling fastboot booting and parsing

Modeling after what I did for cros_servo_run.py, this gives us easy
support for restarting the test run a530 when we detect a spontaneous
reboot.  I had to touch up serial_buffer.py to handle buffering in from a
file instead of a serial device, to support the upcoming etnaviv CI
(tested by running it against a serial log from db410c and seeing it step
to calling "fastboot")

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

13 months agoci/bare-metal: Fix capturing of serial output as job artifacts.
Eric Anholt [Mon, 31 Aug 2020 20:04:28 +0000 (13:04 -0700)]
ci/bare-metal: Fix capturing of serial output as job artifacts.

I tried to put them in the wrong directory -- everything needs to go in
results/, which we want clean and ready before we start our job.

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

13 months agoci/bare-metal: Log why our run restarts when it does.
Eric Anholt [Mon, 31 Aug 2020 20:41:57 +0000 (13:41 -0700)]
ci/bare-metal: Log why our run restarts when it does.

It would be confusing to see a job quietly restart itself in the middle.

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

13 months agoci/bare-metal: Include a timestamp in our serial reads.
Eric Anholt [Mon, 31 Aug 2020 19:41:57 +0000 (12:41 -0700)]
ci/bare-metal: Include a timestamp in our serial reads.

gitlab CI doesn't include timestamps in its logs by default, but it's
really useful for finding delays in our CI so stuff one in on the lines
coming in from serial and being output to the gitlab log.  The artifacts
file is still the raw serial output.

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