Commit Graph

55297 Commits

Author SHA1 Message Date
Yonggang Luo df242a2c06 auxiliary: Remove pipe_tsd
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Yonggang Luo af1fe5c2c8 glx: Remove usage of pipe_tsd_set and pipe_tsd_get
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Mark Janes 3269a9b6a3 iris: reorder to minimize padding
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17749>
2022-07-29 20:45:25 +00:00
Mark Janes e6f6142c9b iris: pad all structures used in a shader key
When the compiler pads a data structure, the padded bytes will not be
initialized.  Shader keys are compared with memcmp and unitialized
bytes within the structure breaks this mechanism.

Explicitly pad the structures with members, so the compiler is forced
to initialize them.  Add a warning to indicate if a change to
alignment in any of the data structures requires additional padding.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17749>
2022-07-29 20:45:25 +00:00
Mike Blumenkrantz e5c50ed2d4 nine: set view_mask=0
nine doesn't use viewids, and this breaks drivers that support it

cc: mesa-stable

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17792>
2022-07-29 19:42:45 +00:00
Mike Blumenkrantz 079857720b d3dadapter: fix sw pipe loading
this needs to check the env var in order to work correctly

cc: mesa-stable

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17792>
2022-07-29 19:42:45 +00:00
Mike Blumenkrantz f153ae75db virgl: more ci flakes
I guess nobody is watching these?

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17806>
2022-07-29 19:31:03 +00:00
Alejandro Piñeiro 106b33405e vc4/v3d: stop adding NORAST when SHADERDB debug option is used
Right now if we use the option SHADERDB, NORAST is added
automatically. There's no comment justifying it, neither a lot of info
on the commits that added that. But I guess that the purpose is that
SHADERDB option is assumed to be used only to gather shader-db stats,
so setting setting NORAST would allow to get those dumps faster.

But adding debug options automatically can be confusing, as we could
get a behaviour that we were not expecting. At least I needed to check
why using SHADERDB was getting a black screen. And if we want to get
this behaviour, we can easily add manually the NORAST.

Finally, v3dv doesn't support NORAST right now (and we don't have
immediate plans to implement it), so it is somewhat inconsistent to
get different behaviour from the same debug option from the two
drivers.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17788>
2022-07-29 18:29:34 +00:00
Yonggang Luo 6544cf4a2a dri: Trim trailing space in dri/dri_util.*
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Yonggang Luo 14bbfee3bc gallium: Disable dri2 interface on OSX
Error message:
Undefined symbols for architecture x86_64:
  "_dri_kms_driver_extensions", referenced from:
      _swkmsCreateNewScreen in libdri.a(dri_util.c.o)
  "_galliumdrm_driver_extensions", referenced from:
      _dri2CreateNewScreen in libdri.a(dri_util.c.o)
ld: symbol(s) not found for architecture x86_64

Fixes: b6f7a4836a ("dri: Fill in the driver extensions for the legacy createNewScreen paths")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6519

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Yonggang Luo 48e72da0dd gallium: Rename macros HAVE_PIPE_LOADER*
Rename macro HAVE_PIPE_LOADER_DRI to HAVE_DRI
Rename macro HAVE_PIPE_LOADER_KMS to HAVE_DRISW_KMS

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Yonggang Luo 98fa0c3351 gallium: Do not call to pipe_loader_sw_probe_kms when not present
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Yonggang Luo 34572042c7 gallium: Move -DHAVE_PIPE_LOADER_DRI and -DHAVE_PIPE_LOADER_KMS to be pre_args
There is non pipe-loader source code depends on it.
After doing this, we found that shared library pipe_swrast depends on libswdri
The error message is:
src/gallium/targets/pipe-loader/pipe_swrast.so.p/pipe_swrast.c.o:pipe_swrast.c:swrast_driver_descriptor: error: undefined reference to 'dri_create_sw_winsys'
src/gallium/targets/pipe-loader/pipe_swrast.so.p/pipe_swrast.c.o:pipe_swrast.c:swrast_driver_descriptor: error: undefined reference to 'kms_dri_create_winsys'

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>
2022-07-29 12:57:26 +00:00
Dylan Baker 42b89276e6 iris|anv: gfx version 12.5 data cache flush is not a workaround
This was not a workaround, it was simply missing from the documentation.
So remove the workaround language.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17797>
2022-07-28 22:08:46 +00:00
Gert Wollny ce42fc4fa1 virgL: lower fneg and fabs
The host doesn't currently handle source mods on immediate values
correctly, so lower the ops that would create these source mods.

v2: update trace checksum

Fixes:  c5cc9ed29b
    virgl: Switch to nir-to-tgsi by default.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6929

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17765>
2022-07-28 21:20:20 +00:00
TSnake41 a02c026eb7 zink: print result code string on vulkan failure
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17726>
2022-07-28 16:06:50 +00:00
Gert Wollny 91c0d46afd r600: Don't set TES_EVAL UCP dirty when it is not supported
Fixes: 3340c7ce35
    r600/sfn: lower CLIPVERTEX to clip planes

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17793>
2022-07-28 17:32:27 +02:00
Eric Engestrom 065691e299 nouveau: use existing list_first_entry() macro instead of re-writing it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17772>
2022-07-28 10:10:44 +00:00
Eric Engestrom 2c67457e5e util/list: rename LIST_ENTRY() to list_entry()
This follows the Linux kernel convention, and avoids collision with
macOS header macro.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6751
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6840
Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17772>
2022-07-28 10:10:44 +00:00
Marek Olšák 83d820973c util/u_threaded: fix a CPU storage crash due to an invalid codepath taken
Fixes: 3df9d8ed80 - gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6837
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6594
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6613

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17556>
2022-07-28 01:11:01 +00:00
Dave Airlie 62207cf885 lavapipe: enable VK_EXT_depth_range_unrestricted.
This passes all the VK CTS tests.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>
2022-07-28 10:36:01 +10:00
Dave Airlie 876db77bae llvmpipe/fs: handle unrestricted depth values.
It moves the explicit clamping of incoming Z from vertex stages
after interp, to the depth clamp function.

It adds support to the depth clamp function to restrict incoming
Z values to 0..1 range.

It fixes the depth test conversions to allow unrestricted depth
values.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>
2022-07-28 10:36:00 +10:00
Dave Airlie 189755a9ac util/pack_color: clamp depth values outside range for unorm formats.
For unrestricted depth ranges, depth clear values for unorm buffers
need to be explicitly clamped. However this has to happen in the
driver when we know the depth buffer format, not at the API level.

Just add clamps to the non-f32 cases and separate it out.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>
2022-07-28 10:35:04 +10:00
Dave Airlie 0e38db0146 gallium: add a rasterizer state bit for unrestricted depth values.
This tells the drivers to expect depth values outside the 0..1 range.

This is used for support VK_EXT_depth_range_unrestricted, but could
also be used for GL_NV_depth_buffer_float in GL.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>
2022-07-28 10:35:04 +10:00
Dave Airlie 7d8942846d llvmpipe: Allocate scene tiles dynamically
If you allocate this statically it's 1.5MB because the framebuffer might
be 16k x 16k, that's excessive.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17746>
2022-07-27 23:00:28 +00:00
Adam Jackson b611195490 llvmpipe: Indentation fix
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17746>
2022-07-27 23:00:28 +00:00
Brian Paul c83bbbd860 llvmpipe: add some const qualifiers in lp_rast_linear_fallback.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul 80f6a31ff3 llvmpipe: tighten up some code in lp_rast_linear_fallback.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul c7239dfe5d llvmpipe: consolidate code in lp_rast_linear_fallback.c
Combine shade_quads_all() and shade_quads_mask() into new
shade_quads() function which takes a mask parameter.  It calls either
jit_function[RAST_WHOLE] or jit_function[RAST_EDGE_TEST] depending on
the mask argument.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul 593282a9cd llvmpipe: remove unneeded casts in lp_rast_linear_fallback.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul 4f26e00795 llvmpipe: asst. clean-up in lp_rast_linear_fallback.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul abea663317 llvmpipe: pass frontfacing param to jit_function() call
Instead of 1, in shade_quads_all() and shade_quads_mask().  This fixes
a VMware test (dx10-is-front-face)

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul b66e567762 llvmpipe: minor whitespace clean-up in lp_state_fs.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul fb6aaaf2c3 llvmpipe: make opaque field a 1-bit field
Reduces sizeof(lp_fragment_shader_variant) from 296 to 288 bytes.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul c9c5fc1e9a gallivm: rename 'var' param in emit_store_reg(), emit_store_var().
Rename 'dst' param' to 'vals'.  This parameter contains the values
which we're storing.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul 68616b1629 gallivm: fix incorrect memset() in SOA emit_load_const()
The memset() call to zero-out the unused elements of outval[] used
the wrong bytecount.  Just replace it with a simpler for loop.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul 9984ec67f2 gallivm: simplify shuffling in emit_store_reg()
The writemask can be implemented with just one llvm vector shuffle.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul ef7da4b292 gallivm: asst. clean-ups in lp_bld_swizzle.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul 4a30155c72 llvmpipe: replace 'unsigned' with enum types
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul 9bb062bade llvmpipe: remove unneeded casts
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul 1f96c24465 llvmpipe: asst. clean-ups in lp_state_setup.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:56 +00:00
Brian Paul fc2f57ed76 llvmpipe: minor optimization in lp_linear_init_interp()
Skip multiplying by 1/w when it's 1.0.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:55 +00:00
Brian Paul ae9ec54f68 llvmpipe: asst. clean-ups in lp_linear_interp.c
Comments, move var decls, fix code formatting.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:55 +00:00
Brian Paul 49966374c8 gallivm: asst. clean-ups in lp_bld_const.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:55 +00:00
Brian Paul 0e9cf32059 llvmpipe: asst. clean-ups in lp_setup_rect.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:55 +00:00
Brian Paul 55ca12fdd0 llvmpipe: minor white-space clean-up in lp_setup.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:55 +00:00
Brian Paul aba7554f39 llvmpipe: asst. clean-up in lp_bld_depth.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
2022-07-27 22:24:55 +00:00
David Heidelberg 57841823a1 nine: char can be unsigned on non-x86 platforms
Keep sign by using int8_t to get the same result on non-x86 machines.

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>
2022-07-27 21:36:23 +00:00
Icecream95 e041a0d1e6 nine: Only enable thread_submit by default on x86
Possibly the bug breaking this is in box86, but given that there
aren't a whole lot of other reasons to be using Nine with a non-x86
Mesa, disable the feature unless we are running on x86.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>
2022-07-27 21:36:23 +00:00
Icecream95 57dea11e7c nine: Make vdecl_index_map always signed
vdecl_index_map needs to be able to store negative values, but char is
not signed on all platforms, so change it to int8_t.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>
2022-07-27 21:36:23 +00:00