Commit Graph

132287 Commits

Author SHA1 Message Date
Juan A. Suarez Romero 1ebdeb3c43 v3d: store number of color buffers in job
Avoids requiring to calculate in other places.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7816>
2020-12-09 12:25:31 +00:00
Juan A. Suarez Romero e3d0abcb2a v3d: make set tile buffer size function public
This will be used later when implementing Tile-based blit function.

v1:
 - Fix commit title (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7816>
2020-12-09 12:25:31 +00:00
Juan A. Suarez Romero 01aafb2859 v3d: force alpha to 1 when rendering RGBX formats
This adds an enum to the load tile buffer that forces the alpha channel
to be set to 1. This will be required later to load RGBX formats.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7816>
2020-12-09 12:25:31 +00:00
Juan A. Suarez Romero b243ccb060 util: function to check for rgbX format
Function that checks if the format has its alpha component forced to 1.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7816>
2020-12-09 12:25:31 +00:00
Marcin Ślusarz aff845da67 intel/tools/aubinator_error_decode: fix small memory leaks
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7994>
2020-12-09 12:15:56 +00:00
Marcin Ślusarz 00cd3f7d13 intel/tools/aubinator_error_decode: cleanup path/file handling
Should help some compilers/static analyzers understand this code and avoid
things like this:

../src/intel/tools/aubinator_error_decode.c:850:19: warning: "path" may be used uninitialized in this function [-Wmaybe-uninitialized]
  850 |             ret = asprintf(&filename, "%s/%d/i915_error_state", path, minor);

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7994>
2020-12-09 12:15:56 +00:00
Vinson Lee 34a35d8f2e r600/sfn: Initialize ShaderInputVarying members in constructors.
Fix defects reported by Coverity Scan.

uninit_member: Non-static class member m_interpolate is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member m_lds_pos is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member m_mask is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7909>
2020-12-08 21:50:00 -08:00
Vinson Lee d4ae1950de meson: Fix build with llvm-12.
This patch fixes this Meson build error.

$ meson builddir \
-Dshared-llvm=disabled
-Ddri-drivers=''
-Dbuild-tests=true \
-Dgallium-drivers=swrast \
-Dvulkan-drivers=''
[...]
/usr/bin/ld: src/gallium/auxiliary/libgallium.a(gallivm_lp_bld_misc.cpp.o): in function `llvm::InitializeNativeTarget()':
llvm/Support/TargetSelect.h:118: undefined reference to `LLVMInitializeX86TargetInfo'
/usr/bin/ld: llvm/Support/TargetSelect.h:119: undefined reference to `LLVMInitializeX86Target'
/usr/bin/ld: llvm/Support/TargetSelect.h:120: undefined reference to `LLVMInitializeX86TargetMC'
/usr/bin/ld: src/gallium/auxiliary/libgallium.a(gallivm_lp_bld_misc.cpp.o): in function `llvm::InitializeNativeTargetAsmPrinter()':
llvm/Support/TargetSelect.h:132: undefined reference to `LLVMInitializeX86AsmPrinter'
/usr/bin/ld: src/gallium/auxiliary/libgallium.a(gallivm_lp_bld_misc.cpp.o): in function `llvm::InitializeNativeTargetDisassembler()':
llvm/Support/TargetSelect.h:156: undefined reference to `LLVMInitializeX86Disassembler'

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7777>
2020-12-08 19:53:57 -08:00
Eric Anholt bc3225272a ci/vc4: Skip VS dynamic loops tests that cause GPU hangs.
We've been getting spurious failures from the new VC4 CI, which I believe
are due to this set of tests (which have been showing up along with a GPU
hang report in the list of flaky tests in the failing jobs).  This was a
known issue I had in vc4.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7998>
2020-12-09 01:24:07 +00:00
Marek Olšák e096b53824 radeonsi: fix the blit test for SW_64KB_R_X
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7908>
2020-12-09 00:52:26 +00:00
Marek Olšák 21b97ef013 radeonsi: rename SI_TEST_DMA to SI_TEST_BLIT
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7908>
2020-12-09 00:52:26 +00:00
Marek Olšák 1f31a21664 radeonsi: remove SDMA support
There are many issues with SDMA across many generations of hardware.
A recent example is that gfx10.3 suffers from random GPU hangs if
userspace uses SDMA.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7908>
2020-12-09 00:52:26 +00:00
Marek Olšák 5b81194fee radeonsi: rename buffer functions so as not to reference rings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7908>
2020-12-09 00:52:26 +00:00
Marek Olšák ab1377cf92 radeonsi: move si_screen_clear_buffer into si_compute_blit.c w/o SDMA option
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7908>
2020-12-09 00:52:26 +00:00
Eric Anholt 5fca7cd8b8 ci/freedreno: Detect the cheza power management bus error and restart.
This is an issue on the cheza platform, the theory is due to some old
firmware bug that will be fixed in future platforms.  Given that cheza was
a target that didn't get released and we expect future platforms to be
fixed, just detect the issue and restart.

I've noticed this error in my CI monitoring less than once a week.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7993>
2020-12-08 23:31:17 +00:00
Mauro Rossi 185df8ef07 android: spirv: fix '::' typo in gen rules
among all Android gen rules '::' was used only here to declare dependencies;
mesa development and stable branch are worth receiving the fix

Fixes the following building errors with Android 7:

obj/STATIC_LIBRARIES/libmesa_nir_intermediates/spirv/gl_spirv.P:184: *** target file
gen/STATIC_LIBRARIES/libmesa_nir_intermediates/spirv/vtn_generator_ids.h' has both : and :: entries.  Stop.

Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Fixes: 1070bba19e ("android: fix SPIR-V -> NIR build")
Reported-by: youling257 <youling257@gmail.com>
2020-12-08 22:44:23 +01:00
Mike Blumenkrantz 9d22c438cb mesa/st: set reserved storage for params+values to 16
zink apparently has a lot of uniform data, and 8x8 isn't enough to avoid realloc

fixes mesa/mesa#3930

Fixes: eda37fb2 ("mesa: properly disallow param list reallocation")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7990>
2020-12-08 21:22:32 +00:00
Michel Zou 869a6274a8 meson: fix multiline string warning
gets rid of: WARNING: Newline character in a string detected, use '''
(three single quotes) for multiline strings instead.

Reviewed-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7946>
2020-12-08 19:42:46 +00:00
Ian Romanick 445b4d13bd util: Add cnd_monotonic to Makefile.sources
Fixes: 33a7894828 ("util,radv: Cross-platform monotonic condition variable")
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7980>
2020-12-08 11:23:44 -08:00
Marek Olšák 0bf7f7fcd2 mesa: remove MAX_3D_TEXTURE_LEVELS, MAX_CUBE_TEXTURE_LEVELS
they are redundant with MAX_TEXTURE_LEVELS

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7956>
2020-12-08 18:48:30 +00:00
Marek Olšák 0ef61a162a mesa: remove code for old (mostly unsupported) GL_NV_point_sprite
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7956>
2020-12-08 18:48:30 +00:00
Marek Olšák 8f11b848c3 mesa: fix glPopAttrib for GL_COORD_REPLACE for r200
Fixes: 959380dc "mesa: more optimizations in glPopAttrib (colormask, drawbuffers, coord replace)"

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7956>
2020-12-08 18:48:30 +00:00
Jonathan Marek fa16e66a3f turnip: always set LRZ registers to zero for 3d clear/blit
Apparently LRZ will be read/written regardless of depth being enabled or
not, so we have to make sure these registers are zero.

Fixes: 1d83f5ae84 ("turnip: disable LRZ on vkCmdClearattachments() 3D fallback path")

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899>
2020-12-08 13:26:16 -05:00
Jonathan Marek f24358e002 turnip: move up LRZ invalidate in CmdClearAttachments
There is an early return if cmd->state.predication_active is true, so do
the LRZ invalidate before that.

Fixes: 2f79e00664 ("turnip: disable LRZ on vkCmdClearAttachments()")

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899>
2020-12-08 13:26:16 -05:00
Jonathan Marek aed7c5aa31 turnip: do not emit draw states in draw_cs outside of renderpass
This avoids a possible issue with MSAA sysmem clears, which use a 3D clear
path which assumes draw states are disabled, and are emitted in draw_cs in
BeginRenderPass.

(checking for TU_CMD_DIRTY_DRAW_STATE also allows not emitting the draw
states if they will be re-emitted on the next draw anyway. the previous
patch makes it so TU_CMD_DIRTY_DRAW_STATE is always set outside of
renderpasses)

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899>
2020-12-08 13:26:11 -05:00
Jonathan Marek 3f58d80823 turnip: correctly disable draw states outside of renderpasses
* do the disable in EndRenderPass2 to fix the missing disable for sysmem
* we don't need a disable at the end of every tile, or between binning pass
  and gmem pass (the first draw in draw_cs emits all the draw states)

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899>
2020-12-08 13:16:11 -05:00
Jonathan Marek af6e74bca8 turnip: always emit LRZ draw state in DIRTY_DRAW_STATE path
The packet size is constant and assumes all states, except for the 2 input
attachment states. (this means we get an invalid packet if DIRTY_LRZ isn't
set when DIRTY_DRAW_STATE is set).

Fixes: 3c07a14998 ("turnip: enable LRZ")

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899>
2020-12-08 13:16:11 -05:00
Jonathan Marek 2d886fb436 turnip: do not include compute stage in pipeline_builder
This avoids emitting compute-related state in the graphics pipeline
(tu6_emit_xs_config was being called for compute stage).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899>
2020-12-08 13:16:11 -05:00
Jonathan Marek d7ea266e6f turnip: no linear_to_srgb for alpha channel for gmem clear value packing
Alpha channel is always linear (oops).

Fixes: ddac5933f8 ("turnip: call packing functions directly for pack_gmem_clear_value")

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7899>
2020-12-08 13:16:09 -05:00
Marek Olšák ab0d6c91fd gallium/u_threaded: optimize 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/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 4a483ec027 gallium/u_threaded: don't make a local copy of pipe_draw_start_count
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák c8fe9df9c4 gallium/u_threaded: don't copy the indexbuf pointer if we overwrite it
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 351ba767af gallium/u_threaded: set has_user_indices = false in the driver thread
to remove some overhead from the main thread.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 60653366b8 gallium/u_threaded: don't pass index bounds to the driver to decrease overhead
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 1b6b31bd1a glthread: count batch space in units of uint64_t elements
This removes one x86 shr instruction from _mesa_glthread_allocate_command.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 4b2445916e glthread: change sizes to unsigned or size_t where needed
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 6fe524d0f8 glthread: use uint64_t to declare the batch buffer instead of align(8)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 70b778945b glthread: use glthread->used instead of glthread->next_batch->used
remove one pointer dereference by having "used" in glthread too

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Mike Blumenkrantz 0a4004e5fa zink: use shader keys for samplemask
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7801>
2020-12-08 17:35:48 +00:00
Mike Blumenkrantz 0ce792b2e2 zink: change a memcmp==0 to !memcmp
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7801>
2020-12-08 17:35:48 +00:00
Mike Blumenkrantz b47407269d zink: initial shader key implementation
this is a squashed version of a previously-reviewed series
ref https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7193

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7801>
2020-12-08 17:35:48 +00:00
Witold Baryluk f93b7d14d6 vulkan/device_select: Store Vulkan vendorID and deviceID as uint32_t
Vulkan uses 32-bit IDs, compared to PCI/USB 16-bit ones.

Some driver vendorIDs do exceed 0xffff, including MESA (used by lavapipe).

Without this, the value will be truncated, and device select layer
will not match expected (or any) device.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3935
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7977>
2020-12-08 16:19:25 +00:00
Rob Clark f4bbf29d76 gallium/aux: Update scons build for u_tracepoints.[ch]
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7974>
2020-12-08 16:02:10 +00:00
Rob Clark 7dda840f32 gallium/aux: Split u_tracepoints.[ch] generation
Allow for separate rules to be used to generate the .c and .h (partially
to make it easier for scons build, and partially because that is just a
better practice).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7974>
2020-12-08 16:02:10 +00:00
Rob Clark 4c670b13dd gallium/aux: Avoid creating queue when traces not enabled
Avoids unnecessarily creating an extra thread when tracing is not
enabled.  Which also side-steps a chrome/ium sandbox issue with
the setscheduler call in u_queue.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7974>
2020-12-08 16:02:10 +00:00
Rhys Perry d1283083ea nir: improve divergence analysis for loads with non-uniform resources
If ACCESS_NON_UNIFORM is not specified, we can assume the resource is
uniform. This requires nir_lower_non_uniform_access to remove that flag.

A few Detroit: Become Human shaders use a index sourced from a fragment
input which is expected to be uniform.

shader-db (Navi):
Totals from 8 (0.01% of 127638) affected shaders:
SGPRs: 224 -> 384 (+71.43%)
VGPRs: 208 -> 112 (-46.15%)
CodeSize: 5360 -> 5344 (-0.30%); split: -1.49%, +1.19%
Instrs: 1036 -> 1028 (-0.77%); split: -1.93%, +1.16%
VMEM: 1320 -> 608 (-53.94%)
SMEM: 384 -> 336 (-12.50%); split: +14.58%, -27.08%
VClause: 24 -> 16 (-33.33%)
SClause: 48 -> 56 (+16.67%)
PreSGPRs: 124 -> 216 (+74.19%)
PreVGPRs: 168 -> 88 (-47.62%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5201>
2020-12-08 13:02:27 +00:00
Rhys Perry b1619109ca nir/lower_non_uniform: remove non_uniform flags after lowering
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5201>
2020-12-08 13:02:18 +00:00
yshi18 3aaac40b12 iris: fix memleak for query_buffer_uploader
In the Chrome WebGL Aquarium  stress test, 20 instances of Chrome will run
Aquarium  simultaneously over 20+ hours. That causes Chrome crash.
During the stress, glBeginQueryIndexed is called frequently.

1.Each query will only use 32 bytes from query_buffer_uploader. After the offset
exceed 4096, it will alloc new buffer for query_buffer_uploader->buffer
and release the old buffer.

2.But iris_begin_query will call u_upload_alloc when the offset changed, and it
will increase the query_buffer_uploader->buffer->reference.count every time
when it called u_upload_alloc.

3.So when u_upload_release_buffer try to release the resource of
query_buffer_uploader->buffer, its reference.count is
already equal to 129. pipe_reference_described will only decrease its reference
count to 128.So it never called old_dst->screen->resource_destroy.

4.The old resouce bo will never be freeed. And chrome will called mmap every time
when it alloc new resource bo.

5. Chrome process map too many vmas in its process. Its map count exceed the
sysctl_max_map_count which is 65530 defined in kernel.

6. When iris_begin_query want to alloc new resource bo, it will meet NULL pointer
because mmap return failed. Finally chrome crashed when it access this NULL resource
bo.

The fix is decrease the reference count in iris_destroy_query.

Patch is verified by chrome webgl Aquarium test case for more than 72 hours.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Yang Shi <yang.a.shi@intel.com>
Reviewed-by: Alex Zuo <alex.zuo@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7890>
2020-12-08 11:48:53 +00:00
Jonathan Gray ebfb9e1817 aco: use UINT64_C on 64 bit constant arguments
avoids errors seen when building on OpenBSD/amd64

../src/amd/compiler/aco_instruction_selection.cpp:1677:62: error: ambiguous conversion for functional-style cast from 'unsigned long' to 'aco::Operand'
            bld.vop3(aco_opcode::v_mul_f64, Definition(dst), Operand(0x3FF0000000000000lu), tmp);
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
glibc uses unsigned long for uint64_t on LP64 archs and unsigned long long for
uint64_t on ILP32 archs.  On OpenBSD unsigned long long is used for uint64_t
on all archs.

The Operand constructors are uint8_t uint16_t uint32_t uint64_t
use UINT64_C so lu or llu suffix will be used as needed.

Fixes: df645fa369 ("aco: implement VK_KHR_shader_float_controls")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7944>
2020-12-08 11:11:28 +00:00
Gert Wollny 454c848592 mesa/st: lower 64 bit ops to scalar before lowering to soft-float
The fp64 emulation is not prepared for vectorized 64 bit code, so
if the driver doesn't ask for lowering to scalar by itself, do it before
lowering to soft-fb, and run a vectorizazion pass afterwards.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7961>
2020-12-08 10:52:34 +00:00