mesa/src
Jose Fonseca 36a7d6788c nir: Recognize empty shaders in nir_tgsi_scan_shader().
When a null PS is bound, the
pipe_query_data_pipeline_statistics::ps_invocations counter should not
be incremented.

However llvmpipe can't cope with a null PS bound, requiring the state
tracker to bind an empty pixel shader instead.  llvmpipe infers empty
TGSI pixel shaders by looking tgsi_shader_info::num_instructions, as an
empty shader should have a single END instruction, but this logic wasn't
working for NIR shaders.

I mulled over the possibility of making llvmpipe handle null pixel
shaders.  Spreading null checks everywhere would be invasive and error
prone, but it would be quite simple if llvmpipe simply created a dummy
PS internally, to be used as a replacement whenever a null PS was bound.
That said, I'm not sure if other gallium drivers can cope with a null PS
neither, and if nought, might as well keep using an empty PS in lavapipe
state tracker.  An any rate, this change makes sense on its own.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20155>
2022-12-06 11:44:11 +00:00
..
amd radv: use LATE_Z for depth/stencil attachments used in feedback loops 2022-12-06 10:34:11 +01:00
android_stub
asahi agx: Lower VBOs in NIR 2022-12-02 06:25:20 +00:00
broadcom v3dv: fix job serialization for single sync path 2022-12-01 14:08:56 +00:00
c11 c11: Remove _MTX_INITIALIZER_NP for windows 2022-11-09 04:38:28 +00:00
compiler nir: fix nir_link_varying_precision 2022-12-06 02:00:36 +00:00
drm-shim drm-shim: drop gnu99 override 2022-09-16 02:06:38 +00:00
egl egl+glx: Always support no_error contexts. 2022-12-05 19:26:41 +00:00
etnaviv tree-wide: Use __func__ instead of __FUNCTION__ in non-gallium code 2022-11-22 06:53:46 +00:00
freedreno turnip: fix dynamic logicop state 2022-12-06 01:13:11 +00:00
gallium nir: Recognize empty shaders in nir_tgsi_scan_shader(). 2022-12-06 11:44:11 +00:00
gbm dri: Add createNewScreen into the __DRI_MESA extension. 2022-12-05 19:26:41 +00:00
getopt
glx egl+glx: Always support no_error contexts. 2022-12-05 19:26:41 +00:00
gtest gtest: Fix maybe-uninitialized compiler warning 2022-06-29 21:02:18 +00:00
hgl
imagination pvr: Add empty PDS program 2022-12-05 14:46:07 +00:00
imgui
intel anv: Don't ambiguate for undefined layouts on TGL+ 2022-12-06 00:49:17 +00:00
loader dri: Introduce internal Mesa DRI driver loader extension. 2022-12-05 19:26:41 +00:00
mapi mapi: update gles 1.1 extention packet link 2022-11-20 15:14:01 +00:00
mesa st/mesa: Use nir_const_value_for_bool() in ATIFS 2022-12-02 23:12:30 +00:00
microsoft dzn: Don't crash when libd3d12.so can't be found 2022-12-04 01:07:08 +00:00
nouveau drm-shim/nouveau: fix the shim to work with nvif ioctl. 2022-11-09 21:21:22 +00:00
panfrost panfrost: Enable AFBC of more formats 2022-12-01 02:03:15 +00:00
tool pps: make pps-producer RT only on freedreno 2022-11-15 21:21:42 +00:00
util meson: replace deprecated meson.get_cross_property(...) with meson.get_external_property(...) 2022-12-01 22:09:55 +00:00
virtio venus: add VN_PERF_NO_CMD_BATCHING 2022-12-02 21:42:25 +00:00
vulkan vulkan: Use vk_image_sanitize_extent 2022-12-02 20:46:33 +00:00
meson.build meson: build radeon drm-shim also for r300 and r600 2022-11-16 14:37:47 +00:00