summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_screen.c
AgeCommit message (Collapse)AuthorFilesLines
2024-02-23gallium: Add new PIPE_CAP_CL_GL_SHARINGAntonio Gomes1-0/+3
We have a situation where some drivers have all the required features, but they are not working with gl_sharing, so we end up advertising it wrongly. Add this cap to ensure this driver was tested to work with cl_khr_gl_sharing. Reviewed-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-12gallium: add PIPE_CAP_FP16 for AMD_gpu_shader_half_floatTimothy Arceri1-0/+1
Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2023-11-28gallium: add PIPE_CAP_PERFORMANCE_MONITOR for GL_AMD_performance_monitorMarek Olšák1-0/+4
Use a CAP instead of guessing it. radeonsi won't expose it. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26262>
2023-11-20mesa: add managarm supportDennis Bonke1-1/+1
Co-authored-by: Alexander Richards <electrodeyt@gmail.com> Signed-off-by: Alexander Richards <electrodeyt@gmail.com> Signed-off-by: Dennis Bonke <dennis@managarm.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25818>
2023-10-24glsl: Remove int64 div/mod lowering.Eric Anholt1-1/+0
Most drivers that can expose GL4 were claiming the cap anyway (llvmpipe, softpipe, zink, iris, nvc0, radeonsi, r600, freedreno, d3d12), and just doing lowering in NIR if nessary. crocus was only claiming the cap for gen8, but the backend compiler enables NIR lowering regardless. svga is the only other GL4 driver that didn't set it, and we can just set the NIR lowering flag. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>
2023-10-14mesa: Implement MESA_texture_const_bandwidthRob Clark1-0/+1
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9891 Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
2023-07-11gallium: Remove `PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND`Lucas Fryzek1-1/+0
Since the mesa state tracker can promote RGB texture formats to RGBA texture formats (among other formats) without exposing any of that information to a driver, it is more desirable to have the behaviour of `PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND` be the default. This avoids rendering bugs where an application sets `DST_ALPHA` blending on a format where there is no alpha channel, that has been promoted to a format that actually has an alpha channel. The driver can instead rely on the common code in the state tracker to convert the blending parameter to one that reflects the limitations of the application requested format, as long as `PIPE_CAP_INDEP_BLEND_FUNC` is supported. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24044>
2023-07-10gallium: remove PIPE_CAP_CLEAR_TEXTUREItalo Nicola1-1/+0
ARB_clear_texture is now implemented in common code. Signed-off-by: Italo Nicola <italonicola@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23735>
2023-06-27treewide: replace usage of boolean to boolYonggang Luo1-1/+1
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
2023-06-22gallium: add PIPE_CAP_TIMER_RESOLUTIONnorablackcat1-0/+1
Reviewed by Marek Olšák Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>
2023-06-03compiler: Rename shader_prim to mesa_prim and replace all usage of ↵Yonggang Luo1-1/+1
pipe_prim_type with mesa_prim This is a prepare step to remove depends on p_defines.h in src/util/* This is done by: replace pipe_prim_type with mesa_prim replace shader_prim with mesa_prim replace PIPE_PRIM_MAX with MESA_PRIM_COUNT replace SHADER_PRIM_ with MESA_PRIM_ replace PIPE_PRIM_ with MESA_PRIM_ This patch only replace code only Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23369>
2023-04-07gallium: Remove PIPE_CAP_TEXTURE_BUFFER_SAMPLERAlyssa Rosenzweig1-1/+0
No more users. It was already not respected by rusticl so you couldn't set it if you wanted OpenCL support. I regret introducing the CAP in the first place, and no more drivers should use it. Reverts d5d3f77e4ac ("gallium: Add new cap PIPE_CAP_TEXTURE_BUFFER_SAMPLER"). Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22223>
2023-03-31gallium: Modify default path for DMABUF to use DRMLucas Fryzek1-2/+14
Modify the code path taken in `u_pipe_screen_get_param_defaults` to call DRM to check if `PIPE_CAP_DMABUF` is supported. This is required for overriding the behavior in `dri2_init_screen_extensions` to support importing DMA bufs on drivers that don't support DRM, by simply changing how `PIPE_CAP_DMABUF` is handled in their driver. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
2023-03-17st/mesa, iris: Add optional CPU-based ASTC void extent denorm flushingKenneth Graunke1-0/+1
Intel Gen9 GPUs have hardware ASTC support, but have a bug where they don't handle denormalized values in void extent blocks correctly. This isn't that hard to work around - on upload, we can detect such blocks, and flush any denorms to zero. Because we're altering the data behind the application's back, and applications can theoretically ask to download the original unaltered image data, we unfortunately need to maintain shadow copies of the data. To make sure that we don't accidentally skip the void-extent flushing via any fast-upload paths, and support download correctly, we plug this into the st/mesa compressed texture format fallback paths, which store a CPU copy of the original image data, and upload altered data. This is unfortunately common code for what's likely to be a single driver's issue (on a single generation), but it beats replicating an entire framework we already have inside the driver. Fixes dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.* using iris on Intel Gen9 GPUs. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4167 Reviewed-by: Emma Anholt <emma@anholt.net> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21943>
2023-03-07gallium: Add new caps ↵Antonio Gomes1-0/+6
PIPE_CAP_LINEAR_IMAGE_(PITCH_ALIGNMENT|BASE_ADDRESS_ALIGNMENT) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-02-12u_pipe_screen_lookup_or_create: avoid re-querying the fd to have a ↵Eric Engestrom1-2/+1
consistent hash key In every current driver, the fd we get back from the screen is the fd we gave to screen_create() three lines above (or a dup() thereof, which we consider to be the same since we look inside it for the file description instead). Signed-off-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180>
2023-02-12gallium: move etnaviv screen_lookup_or_create function to common codeEric Engestrom1-0/+132
Signed-off-by: Eric Engestrom <eric@igalia.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180>
2023-02-05gallium: add PIPE_CAP_NULL_TEXTURESMike Blumenkrantz1-0/+1
this allows drivers to indicate that they support sampling from null textures instead of using fallback textures for now, this is only used for depth-based fallback textures Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21072>
2023-01-12gallium: Add cap to request state validation for all dirty stateGert Wollny1-0/+3
With aaa4b0e6 state validation is no longer called for all changed states, but only for states that will be active with a new shader program. Not all drivers support this and might prefer if the state validation is emitted for all states that might be changed. So add a cap that the driver can signal one or the other preference, and default to the new behavior. Fixes: aaa4b0e6 st/mesa: move check_program_state code into _mesa_update_state v2: - Rename cap and and invert its meaning, query the cap only once and store it in st, handle the mask update when updating the shader i.e. not in st_validate_state (Marek) Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20493>
2023-01-01glthread,gallium: add a CAP to disable glBufferSubData optimization in glthreadMarek Olšák1-0/+1
it regresses performance on iris Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20379>
2022-11-15tree-wide: Convert all usage of defined(PIPE_(OS|ARCH|CC)_*) to ↵Yonggang Luo1-1/+1
DETECT_(OS|ARCH|CC)_* by use grep From: defined[\s]*\([\s]*PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)[\s]*\) To: DETECT_$1_$2 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>
2022-11-01gallium: update docs about PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF.Emma Anholt1-1/+1
We can provide better guidance on when to (un-)set this given that everyone's on NIR now. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16539>
2022-10-31gallium: Default to PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENTAlyssa Rosenzweig1-0/+8
Supported in all hardware and software drivers. Only that don't support are virgl and svga, depending on host capabilities. I don't think there's anything to be done there. This does give fewer places to screw up the CAPs, though, because everyone wants ARB_buffer_storage. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Marek Ol<C5><A1><C3><A1>k <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19392>
2022-10-29gallium/util: add a helper for get_timestampYusuf Khan1-0/+6
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19334>
2022-10-27st/gallium: plumb protected context creationLionel Landwerlin1-0/+1
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8092>
2022-10-27gallium: rename PROTECTED_CONTENT cap into PROTECTED_SURFACELionel Landwerlin1-1/+1
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8092>
2022-10-19gallium: Default to PIPE_CAP_MIXED_COLORBUFFER_FORMATSAlyssa Rosenzweig1-1/+1
There are three tiers of drivers: * Drivers that support MRT and support mixed colorbuffer formats. All modern hardware fits this as it becomes a spec requirement. * Drivers that do not support MRT. Then this CAP is a no-op, so we might as well set it by default even here (this commit trivially enables the CAP for lima, vc4, etanviv). * Drivers that support MRT but do not support mixed colorbuffer formats! Very little hardware fits this category as it doesn't suffice for MRT in most APIs. Unfortunately we have a few drivers that are in this category, preventing us from bulldozing the CAP altogether. Given that the CAP only exists for a few legacy drivers, default it to being enabled to avoid new drivers falling into the trap of forgetting to enable it. Failing to set this CAP causes failures in dEQP-GLES3.functional.fbo.completeness.* Drivers which still do not set this CAP: nv30, r300 (older than r500), virgl in some cases. r300/r400 is due to a hardware requirement as Emma points out. v2: Advertise the cap on lima like the commit message claims (delete the special case). Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19079>
2022-10-16mesa,gallium: Revert "Make point coord origin a CAP"Alyssa Rosenzweig1-5/+0
This reverts commit e749f67f8989874f6795d95422c1f3eb4d2706ba, which added a CAP to support drivers that can only do upside-down point coordinates. That was added specifically for Asahi, since Metal's point coordinate convention is opposite Mesa's. Since then, additional reverse-engineering aided by the PowerVR headers led me to the bit doing the flip in hardware, so Asahi does not use the CAP since baadc1ec13f ("asahi: Don't use lower_wpos_pntc"). Garbage collect it. [If it's needed for future hardware, we can revive it. But the plan is Vulkan anyway.] Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19078>
2022-10-15mesa/st: rip out point-sprite capErik Faye-Lund1-1/+0
All current drivers reports supporting this cap, let's just assume it's always supported. It seems better to lower this in the drivers, like we already do for etnaviv, panfrost and zink... Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Begrudgingly-reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19049>
2022-09-09gallium: Add PIPE_CAP_QUERY_TIMESTAMP_BITSTomeu Vizoso1-0/+3
For those drivers that don't make full use of the 64 bits in pipe_query_result.u64. Applications will make use of it via GL_QUERY_COUNTER_BITS to handle when the value rolls over. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10770>
2022-09-06mesa: Remove PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED/lower_cs_derived.Emma Anholt1-1/+0
We have fine NIR lowering for this (already called from mesa/st), no need for a separate GLSL pass. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18361>
2022-08-31gallium,glsl: Delete PIPE_CAP_VERTEXID_NOBASE and lower_vertex_id.Emma Anholt1-1/+0
Every driver uses the nir_lower_system_values path now. Reviewed-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18327>
2022-07-14gallium: Add a new fence type with a pipe cap to indicate it can be importedJesse Natalie1-0/+1
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-06-22gallium: add PIPE_CAP_FBFETCH_ZS and expose extensionPavel Asyutchenko1-0/+1
st/mesa will expose GL_ARM_shader_framebuffer_fetch_depth_stencil if this new capability is supported by the driver. Signed-off-by: Pavel Asyutchenko <sventeam@yandex.ru> Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13979>
2022-06-18mesa/st: add PIPE_CAP_DITHERINGMike Blumenkrantz1-0/+1
this is for drivers like zink that may or may not handle dithering and so getting blend state changes when this state changes isn't useful Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17043>
2022-06-15gallium: disable hardware select for crocusQiang Yu1-0/+17
piglit select tests fail, so add a gallium cap to disable for crocus explicitly. crocus may choose to enable hardware select only for GPU SKU which tested to be OK again. Fixes: 6489af145ca ("mesa: enable HardwareAcceleratedSelect") Closes: #6644 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Emma Anholt <emma@anholt.net> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16955>
2022-06-10gallium: Rename PIPE_CAP_TGSI_LEGACY_MATH_RULES to drop "TGSI"Emma Anholt1-1/+1
Now NIR drivers can implement it as well. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16176>
2022-06-10gallium: Rename MUL_ZERO_WINS to LEGACY_MATH_RULES.Emma Anholt1-1/+1
This is a clearer name for what it does than MUL_ZERO_WINS, and matches up to the new name in shader_info. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16176>
2022-06-08mesa,gallium: Make point coord origin a CAPAlyssa Rosenzweig1-0/+5
When lower_wpos_pntc is used, the state tracker inserts code to transform gl_PointCoord.y according to a uniform, to account for API-requested point coordinate origin and framebuffer orientation. With the transformation, driver-supplied point coordinates are expected to have an upper left origin. If the hardware point coordinate supports (only) a lower left origin, the backend has to use lower_wpos_pntc and then lower *again* to flip back. This ends up transforming twice, which is wasteful: a = load point coord Y with lower left origin a' = 1.0 - a a'' = uniform_transform(a') However, lower_wpos_pntc is quite capable of transforming for a lower left origin too, it just needs to flip the transformation. Add a CAP specifying the point coordinate origin convention, rather than assuming upper-left. This simplifies the Asahi code greatly. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16829>
2022-06-07gallium: rename PIPE_CAP_MAX_SHADER_BUFFER_SIZE -> *_UINTMarek Olšák1-1/+1
to imply the maximum of 4GB - 1. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07gallium: rename PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE->MAX_TEXEL_BUFFER_ELEMENTS_UINTMarek Olšák1-1/+1
to allow exposing 4G - 1. The "SIZE" was also a misnomer because it meant elements. This no longer clamps the size to INT_MAX in st/mesa. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07gallium: add PIPE_CAP_MAX_CONSTANT_BUFFER_SIZE_UINT for UBOsMarek Olšák1-0/+4
We plan to report UINT32_MAX for UBOs. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16881>
2022-06-07gallium+glsl: Remove EmitNoSat/PIPE_CAP_VERTEX_SHADER_SATURATEEmma Anholt1-1/+0
The drivers not setting it were: - nv30, which gets lowering using NIR's lower_fsat flag. - r300, which gets lowering using NIR's lower_fsat flag. - a2xx, which has was getting it optimized back to fsat anyway. This drops the check for the cap from gallium nine. While nine does have a non-nir path, I think it's safe to assume that if you have SM3 texturing, you can do fsat. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-05-10glsl: Make all drivers take the GLSLOptimizeConservatively path.Emma Anholt1-1/+0
Now that all consumers of GLSL use NIR, make the remaining drivers take the path that relies on NIR to really do optimization. nouveau steam shader-db runtime -6.69631% +/- 1.29235% (n=12). No change on shader-db there. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16364>
2022-05-05gallium: Remove now-unused shader caps.Emma Anholt1-1/+0
The only interesting ones here were LOWER_IF_THRESHOLD (which previously had connected to some lowering in GLSL that was broken in the face of side effects), and FMA (which turned GLSL IR's fma() into TGSI_OPCODE_FMA instead of MAD). Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044>
2022-04-29gallium: add PIPE_CAP_ALLOW_DRAW_OUT_OF_ORDERPierre-Eric Pelloux-Prayer1-0/+1
This way we can make allow_draw_out_of_order true by default for all apps, iff the driver allows it. And allow_draw_out_of_order=false can still be used in drirc, for apps that need this optim to be turned off. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16139>
2022-04-21gallium: add PIPE_CAP_MULTI_DRAW_INDIRECT_PARTIAL_STRIDEMike Blumenkrantz1-0/+2
GL spec states that the stride for indirect multidraws: * cannot be negative * can be zero * must be a multiple of 4 some drivers can't support strides which are not a multiple of the size of the indirect struct being used, however, so rewrite those to direct draws Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15963>
2022-03-23gallium: rename image atomic inc-wrap capErik Faye-Lund1-1/+1
This cap is no longer TGSI specific, so let's rename it to reflect reality. Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15448>
2022-03-23gallium: rename image atomic float-add capErik Faye-Lund1-1/+1
This cap is no longer TGSI specific, so let's rename it to reflect reality. Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15448>
2022-03-23gallium: rename window-space position capErik Faye-Lund1-1/+1
This cap is no longer TGSI specific, so let's rename it to reflect reality. Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15448>