Commit Graph

154351 Commits

Author SHA1 Message Date
Mike Blumenkrantz 7e69384af1 zink: add separate error message for push descriptor set alloc fail
PRO triggers this if input attachments are used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz 07efe6f129 zink: only reject non-blittable resource creation if it has no other binds
the idea here is that if a resource is intended to be used solely as a rendertarget
and can't be blitted to or drawn to, then resource creation should fail

but if the resource might be e.g., a texture, then it can probably hit the subdata
path and be fine

Fixes: 37ac8647fc ("zink: reject resource creation if format features don't match attachment")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
xperia64 e5afbfbed5 wgl: Add driver_zink as a dependency of the wgl frontend
Fixes: 01ed71f945 ("wgl: support kopper")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16569>
2022-05-18 02:18:06 +00:00
Mike Blumenkrantz 43b3f5469d zink: never create a sw context unless sw is requested
this otherwise makes it impossible to accurately do hardware driver
fallback, as zink will create a sw context instead of failing, superceding
the actual sw driver priorities

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16572>
2022-05-17 21:55:55 -04:00
Jonathan Weinstein 2b844aab6a lavapipe: support instance rate zero for VK_EXT_vertex_attribute_divisor
gallium can't directly support vertex attribute instance rate zero, since
the instance rate is also used to determine if the data is per-vertex or
per-instance in the first place (hence divisor zero meaning the data is
per vertex).
While it's an optional feature for VK_EXT_vertex_attribute_divisor, some
apps require it to work (it's a standard d3d10 feature and widely
supported), hence translate it away as MAX_UINT32 divisor instead (which
at this point probably makes more sense than to change the gallium
interface), which should work all the same.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16526>
2022-05-18 01:29:36 +00:00
Jason Ekstrand fa67f119f2 glsl: Drop this != NULL assertions
If this == NULL, we'll get a crash which is pretty much the same thing
when it comes to ease of debugging.  This fixes a giant pile of warnings
with GCC 12 of the form:

    ../src/compiler/glsl/ir.h: In member function ‘ir_dereference* ir_instruction::as_dereference()’:
    ../src/util/macros.h:149:30: warning: ‘nonnull’ argument ‘this’ compared to NULL [-Wnonnull-compare]
      149 | #define assume(expr) ((expr) ? ((void) 0) \
          |                      ~~~~~~~~^~~~~~~~~~~~~~
      150 |                              : (assert(!"assumption failed"), \
          |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      151 |                                 __builtin_unreachable()))
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/compiler/glsl/ir.h:150:7: note: in expansion of macro ‘assume’
      150 |       assume(this != NULL);                             \
          |       ^~~~~~
    ../src/compiler/glsl/ir.h:160:4: note: in expansion of macro ‘AS_BASE’
      160 |    AS_BASE(dereference)

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16558>
2022-05-18 00:37:50 +00:00
Chia-I Wu 2410993ef6 turnip: fix off-by-one in border color bitset
BITSET_FFS reserves 0 for no bit set.  BITSET_CLEAR just below cleared
the wrong bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16567>
2022-05-17 23:29:15 +00:00
Kenneth Graunke b8799a499e iris: Add FLUSH_HDC to PIPE_CONTROL_CACHE_FLUSH_BITS
This is considered a bottom-of-pipe flush bit.

Fixes: a969ad1ddf ("iris: Demote DC flush to HDC flush in cache tracker")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16565>
2022-05-17 22:35:06 +00:00
Mike Blumenkrantz 3ddda935b1 zink: add an anv-tgl ci job
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16497>
2022-05-17 21:39:56 +00:00
Sil Vilerino 82e4fc654f meson: Support d3d12 as a video-supporting driver
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 39cf51ba9d d3d12: Add GLSL singleton refcounting to screen for offscreen non-GL rendering
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 8beabc6826 d3d12: Add support for d3d12 video in d3d12_screen
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 739283da13 d3d12: Improve planar resource support to handle video requirements
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 6dbe05ffda d3d12: Add util video functions to d3d12_format
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 68bac42338 d3d12: Add create_video_codec and create_video_buffer entrypoints
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino b171a6baa2 d3d12: Add video encode implementation of pipe_video_codec
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino d8206f6286 d3d12: Add video decode implementation of pipe_video_codec
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 46178f93e9 ci: Update x86 debian build to pick up tag v1.602.0-r1 from DirectX-Headers
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 5b27c9d880 d3d12: Add d3d12_promote_to_permanent_residency
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino e5df8ecab9 gallium va: VaHandlePictureParameterBufferH264 fill out new pipe params
MinLumaBiPredSize8x8, pic_init_qs_minus26, chroma_format_idc,
bit_depth_chroma, bit_depth_chroma_minus8

Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 701fadd45f gallium vdpau: Fill out level_idc and MinLumaBiPredSize8x8
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 67fad86c96 gallium omx: Fill out MinLumaBiPredSize8x8 and pic_init_qs_minus26
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino b566938644 gallium: Add MinLumaBiPredSize8x8 to pipe_h264_sps, pic_init_qs_minus26 to pipe_h264_pps
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino d2871e40e0 gallium radeon/r600/omx/va: Adds support for multiple reference encoding
gallium: pipe_h264_enc_picture_desc: ref_idx_lx to ref_idx_lx_list[32], add num_ref_idx_lx_active_minus1
gallium radeon/r600: Change usage of ref_idx_lx to ref_idx_lx_list
gallium omx: Fill out ref_idx_lx_list, num_ref_idx_lx_active_minus1
gallium va: Add support for multiple references encoding

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino e47b327435 gallium va: Add support for multiple slices encoding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 504b02f3fa gallium: Add multiple slice support to pipe_h264_enc_picture_desc
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 04495300f9 gallium va: Handle new VA attributes with new pipe video caps
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino e1f2db7527 gallium: Add values to pipe_video_cap for multi-slice and multi-reference encode
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino a8831ba0ca gallium va: VaDeriveImage support stride/offset being different for NV12 planes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 15540abf22 gallium/va/radeonsi: Using private as a parameter name conflicts with C++ keywords
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino b909058fdc d3d12: Add .clang_format file
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 15dbf8f05a st_vdpau: Pass format when opening resource from handle in st_vdpau_resource_from_description
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 95b184f471 util/vl_vlc: Support compiling in C++
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:24 +00:00
Sil Vilerino b2b907f052 util/u_format: Drop assert that has valid/well-defined behavior
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:24 +00:00
Sil Vilerino 31dcb39615 gallium/vl: Add software winsys and offscreen winsys
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:24 +00:00
Adam Jackson 68aa2099fa dri2: Require a loader with working buffer invalidation
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10808>
2022-05-17 20:31:50 +00:00
Adam Jackson 4d0179af32 glx/dri2: Require DRI2 >= 1.3 for working buffer invalidation
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10808>
2022-05-17 20:31:50 +00:00
Michel Zou dc73de630e zink: fix pointer size conversion warning
fixes:  34e62bfa

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16532>
2022-05-17 20:20:52 +00:00
Lionel Landwerlin 9d0db8d4c4 intel/perf: deal with OA reports timestamp values on DG2
OA reports on XeHP have their timestamp shifted to the left by 1. To
get that back in the same time domain as the REG_READ you need to
shift it back to the right and you're loosing the top bit.

v2: use ull for 64bit constant (Ian)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin 773f41e3e4 intel/perf: disable sseu setting on Gfx12.5+
This is rejected by i915.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin d2834dd626 intel/perf: add new layout for Gfx12.5 products
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin 66045acdf9 intel/perf: add max vfuncs
New counters will use those from inside their read function to
generate percentage numbers.

v2: Forgot to update Iris (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin c740ca6000 intel/perf: add support new variable counting the number of EUs in slice0-3
v2: MIN2(4, max_slices) (Marcin)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin 6f63bc38e7 intel/perf: add OA A counter type
On Gfx12.5 products, we'll need to capture a couple of A counters that
are not captured in MI_RPC reports. Those are actually global,
previously all A counters were per context.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin 376e420abb intel/perf: stop overriding oa_format
This already set in the intel_perf_setup.h file at metric set
creation.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin aa04b47c6e intel/perf: add support for GtSlice/GtSliceXDualsubsliceY variables
For those, we'll fish the information out of the devinfo.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin d134a62345 intel/perf: add support for dualsubslice count variable
This is the same as the subslice count.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin efc2782f97 intel/perf: store a copy of devinfo
In the future we'll pull more information off devinfo.

v2: Constify pointers (Ian)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Lionel Landwerlin 0df4b96062 intel/perf: add support for new opcodes in code generation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16144>
2022-05-17 19:55:10 +00:00
Chad Versace fe3e850dfb venus: Don't encode ignored pTessellationState
The spec says that VkGraphicsPipelineCreateInfo::pTessellationState is
ignored and may be an invalid pointer in some cases. When ignored,
patch the pCreateInfo with `pTessellationState = NULL`, so the encoder
doesn't attempt to encode an invalid pointer.

Tested in Borealis, with debug build of venus, with a minimal test app
that sets `.pTesselationState = 0x17`. Pre-patch, the app crashes;
post-patch, the app works.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16284>
2022-05-17 19:47:52 +00:00