iris: ref/unref the GLSL type singleton in screen_create/destroy Otherwise, we can run into trouble if the driver is dynamically loaded via pipe-loader. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6405>
iris: Stop advertising clover-only caps Both of these are clover-only caps. We don't really support clover and, even if we did, the number of address bits is wrong and we definitely don't support the CL path for images. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6405>
iris: Stop advertising PIPE_SHADER_IR_NIR_SERIALIZED This prevents clover from trying to initialize and crashing. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6405>
iris: Add support for serialized NIR Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280>
gallium: replace 16BIT_TEMPS cap with 16BIT_CONSTS All drivers that support mediump lowering should support 16BIT_TEMPS, but some do not also want 16b consts to be lowered. Replace the pipe cap in preperation to remove LowerPrecisionTemporaries. Note: also updates reference checksums for the arm64_a630_traces job, due to lowering more to 16b Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189>
iris: fix fallback to swrast driver The helper we use to query the kernel returns -1 if the getparam is not supported. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes: f402b7c57641dd ("iris: fail screen creation when kernel support is not there") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3188 Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5838>
gallium: add PIPE_SHADER_CAP_GLSL_16BIT_TEMPS for LowerPrecisionTemporaries Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
gallium: Add pipe cap for primitive restart with fixed index Adds PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX which is a subset of the primitive restart cap for when the hardware can only support the fixed indices specified in GLES. The switch statements were automatically modified with this command: find \( \( -name \*.cpp -o -name \*.c \) \! -type l \) \ -exec sed -i -r \ 's/^(\s*case\s+PIPE_CAP_PRIMITIVE_RESTART)\s*:.*$/\0\n\1_FIXED_INDEX:/' \ {} \; v2: Add a note in screen.rst Reviewed-by: Eric Anholt <eric@anholt.net> (v1) Reviewed by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5559>
iris: fix export of GEM handles We reuse DRM file descriptors internally. Therefore when we export a GEM handle we must do so in the file descriptor used externally. This change also fixes a file descriptor leak of the FD given at screen creation. v2: Don't bother checking fd equals, they're always different Fix dmabuf leak Fix GEM handle leaks by tracking exported handles v3: Check os_same_file_description error (Michel) Don't create multiple exports for a given GEM table v4: Add WARN_ONCE (Ken) Rename external_fd to winsys_fd v5: Remove export lock in favor of bufmgr's Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2882 Fixes: 7557f1605968 ("iris: share buffer managers accross screens") Tested-by: Eric Engestrom <eric@engestrom.ch> Tested-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4861>
gallium: add shader caps INT16 and FP16_DERIVATIVES Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
iris, i965: Update limits for ARB_compute_variable_group_size The CS compiler now produces multiple SIMD variants, so the previous trade-off between "always using SIMD32" and "having a smaller max invocations" is now gone. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
iris: add identifier BO A buffer added to all execbufs so that we can attribute a batch that caused a hang to a particular driver. v2: Reuse workaround BO Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3203>
iris: store workaround address This will allow to select a different address later, leaving the beginning of the buffer to some other use. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3203>
intel: Store the aperture size in devinfo. We will later use the devinfo from iris_bufmgr, where we don't have access to the screen pointer. And since we are moving it, we can reuse it in Anv and i965. v2: return error code and check for it on Anv (Lionel). v3: Remove anv_gem_get_aperture() from anv_private.h and stubs (Lionel). Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5043>
iris: Implement ARB_compute_variable_group_size Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4794>
iris: Detect DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT kernel support We will use this for implementing deferred flushes in the next commit. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3802>
iris: handle PIPE_CAP_CLEAR_SCISSORED this allows passing scissored clear calls through the driver where it can be handled by a repclear shader fix kwg/mesa#61 Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4310>
iris: fail screen creation when kernel support is not there v2: Bump check to I915_PARAM_HAS_CONTEXT_ISOLATION (v4.16) (Ken) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: <mesa-stable@lists.freedesktop.org> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2803 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4643>
iris: Enable EXT_depth_bounds_test extension. It was implemented in 1df871f8ff753dd234def380ea0e20d7e81cad9e, but to really enable it we need to enable PIPE_CAP_DEPTH_BOUNDS_TEST. v2: Add release notes (Ian). Suggested-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4540>
iris: make resources take a ref on the screen object Because St creates resources from a screen and attach them onto another we need to ensure the resources associated to a screen & bufmgr stay around until we don't need them anymore. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: <mesa-stable@lists.freedesktop.org> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373 Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>