summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_screen.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2022-03-17gallium: rename ballot capErik Faye-Lund1-1/+1
This cap is no longer TGSI specific, so let's rename it to reflect reality. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename clock capErik Faye-Lund1-1/+1
This cap is no longer TGSI specific, so let's rename it to reflect reality. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename group-vote capErik Faye-Lund1-1/+1
This cap is no longer TGSI specific, so let's rename it to reflect reality. Because the name got a bit vague when removing the TGSI-bits, let's add some more details to the name. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename texture query samples capErik Faye-Lund1-1/+1
This isn't specific to TGSI, so let's update the name to reflect reality. Because the name of the opcode was TGSI specific, let's pick a new one, based on the naming of the PIPE_CAP_TEXTURE_QUERY_LOD cap. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename read-outputs capErik Faye-Lund1-1/+1
This cap is no longer TGSI-specific, so let's update the name to reflect reality. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename array-components capErik Faye-Lund1-1/+1
This cap is no longer TGSI specific, so let's update the name to reflect reality. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename sysval capsErik Faye-Lund1-3/+3
These aren't spiecic to TGSI any more, so let's rename them to reflect reality. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename fine derivative capErik Faye-Lund1-1/+1
This is no longer TGSI specific, so let's rename it to reflect the reality. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename pixel-coord capsErik Faye-Lund1-4/+4
These aren't specific to TGSI, so let's rename them to reflect the reality. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename layer-viewport capsErik Faye-Lund1-2/+2
Similar to the previous commits, these aren't TGSI specific, so let's drop TGSI from their name. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename vs instance id capErik Faye-Lund1-1/+1
This cap is no longer specific to TGSI, so let's rename it and update the documentation to reflect that. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-03-17gallium: rename pack half-float capErik Faye-Lund1-1/+1
This cap no longer has anything to do with TGSI, as the lowering happens on GLSL IR, and applies just as much to NIR drivers. So let's rename this cap and update the docs to reflect the current situation. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15316>
2022-02-08gallium: add PIPE_CAP_CULL_DISTANCE_NOCOMBINEMike Blumenkrantz1-0/+1
for drivers where separate cull distance variables are required, this lets them avoid having to write yet another pass to undo gallium's mangling of shader info Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14878>
2022-02-01gallium: add PIPE_CAP_CLAMP_SPARSE_TEXTURE_LODQiang Yu1-0/+1
For ARB_sparse_texture_clamp. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14488>
2022-01-18gallium: add PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCYQiang Yu1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14362>
2022-01-04gallium: Delete PIPE_CAP_TGSI_ANY_REG_AS_ADDRESSEmma Anholt1-1/+0
Softpipe was the only driver still using this feature. I had enabled it in ba22f014f9db ("softpipe: Enable PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS;") for an instr count win, but it's really not important to that driver and it's not worth keeping the knob around just for that. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14360>
2021-12-30gallium: add caps for sparse texture supportQiang Yu1-0/+6
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14223>
2021-12-03gallium: add new PIPE_CAP_IMAGE_STORE_FORMATTEDJuan A. Suarez Romero1-0/+1
This capability is enabled for drivers supporting formatless image writing in shader. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13409>
2021-11-18gallium: rename PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFERMike Blumenkrantz1-2/+2
this is now a bitfield enum for more functionality Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984>
2021-11-15gallium: add PIPE_CAP_PREFER_POT_ALIGNED_VARYINGSVasily Khoruzhick1-0/+3
Driver should enable this cap if it prefers varyings to be aligned to power of two in a slot, i.e. vec4 in .xyzw, vec3 in .xyz, vec2 in .xy or .zw Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13151>
2021-11-03gallium: add PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLYMike Blumenkrantz1-0/+1
vulkan requires that vertex attribute access be aligned to the size of a component for the attribute, but GL has no such requirements the existing alignment caps are unnecessarily restrictive for applying this limitation, so this cap now pre-calculates the masks for elements and vertex buffers in vbuf to enable rewriting misaligned buffers Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13556>
2021-10-01gallium: add pipe_vertex_state and draw_vertex_state for display listsMarek Olšák1-0/+1
The main motivation is to improve the score of viewperf13/snx. This new interface is designed to be optimal for display lists as implemented by the vbo module. It has much lower CPU overhead in the frontend, threaded context, and the driver. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13050>
2021-09-29gallium: add PIPE_CAP_PREFER_BACK_BUFFER_REUSEPierre-Eric Pelloux-Prayer1-0/+1
This will be used in the next commit. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>
2021-09-09gallium: add rasterizer depth_clamp enable bitRoland Scheidegger1-0/+1
This is required for d3d10+, which has depth_clamp always enabled regardless of depth_clip (in contrast to OpenGL, where enabling depth_clamp disables depth_clip). There doesn't seem to be a GL extension for it, but it will be used for lavapipe to implement VK_EXT_depth_clip_enable. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12260>
2021-06-23gallium: add a pipe cap for determining driver support for prim type in restartsMike Blumenkrantz1-1/+1
this is another prim type bitmask which will trigger automatic draw rewriting to a direct draw any time a prim-restart draw occurs with a prim type that is not supported by the driver for prim restart, even if that prim type is supported for normal drawing the default is set to all prim types to preserve existing functionality, and PrimitiveRestartForPatches is now explicitly set to false because no driver supports it Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23gallium: add a pipe cap for performing automatic prim type conversionMike Blumenkrantz1-0/+3
drivers can now export a bitmask of the primitive types they support, and all others will be automatically be rewritten the default value is set to all primitive types supported to preserve existing behavior Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23gallium: add a pipe cap to rewrite index buffers for draws using a non-fixed ↵Mike Blumenkrantz1-0/+3
restart index for drivers that set it, this now automatically handles restart index rewriting by running draws through primconvert when necessary Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-04-15gallium: split PIPE_CAP_SAMPLER_REDUCTION_MINMAX into modesMike Blumenkrantz1-0/+1
this enables detection for the EXT vs the ARB extension, which have different specifications regarding which formats must be supported Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10030>
2021-03-30gallium: add PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATHMarcin Ślusarz1-0/+3
Fixes: 42842306d3c ("mesa,st/mesa: add a fast path for non-static VAOs") Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9857>
2021-03-12gallium: add a sampler reduction cap + settingsDave Airlie1-0/+3
This is to allow for VK_EXT_sampler_filter_minmax GL_EXT_texture_filter_minmax support Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487>
2021-02-23gallium: add PIPE_CAP_TEXRECTChristian Gmeiner1-0/+3
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898>
2021-02-18mesa/st: add PIPE_CAP_GL_CLAMPMike Blumenkrantz1-0/+1
when this is not set, this triggers shader and sampler state updates any time a sampler starts or stops using GL_CLAMP, applying bitmasks needed to run nir_lower_tex and setting CLAMP_TO_BORDER/CLAMP_TO_EDGE as necessary to mimic the behavior Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
2021-02-17gallium: Flip the default value of PIPE_CAP_SHAREABLE_SHADERS.Eric Anholt1-0/+8
We should be exposing it in every driver, since it's required eventually to reduce jank. Make drivers have to explicitly opt out instead of opt in. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9088>
2021-02-08nouveau: print warning about unhandled cap only onceKarol Herbst1-0/+2
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8831>
2021-01-12gallium: Add new cap PIPE_CAP_TEXTURE_BUFFER_SAMPLERIcecream951-0/+1
This indicates whether a driver wants samplers for buffer textures as well as normal textures. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>
2021-01-04gallium: remove PIPE_CAP_INFO_START_WITH_USER_INDICES and fix all driversMarek Olšák1-1/+0
Drivers aren't allowed to ignore start with user index buffers anymore. This is required by the new fast path where mesa/main is using pipe_draw_info. Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7679>
2021-01-04gallium: remove and emulate PIPE_CAP_MULTI_DRAWMarek Olšák1-1/+0
To remove PIPE_CAP checking in the common code. It's better if drivers lower multi draws even if the hardware doesn't support it beause the multi draw loop can be moved deeper into the driver to remove more overhead. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7679>
2020-12-01gallium: add PIPE_CAP_PREFER_REAL_BUFFER_IN_CONSTBUF0Marek Olšák1-0/+1
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
2020-11-18gallium: add missing bits of the direct multi draw interfaceMarek Olšák1-0/+1
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441>
2020-11-02gallium: add new cap PIPE_CAP_DEVICE_PROTECTED_CONTENTPierre-Eric Pelloux-Prayer1-0/+1
Will be used to implement EGL_EXT_protected_surface. Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5096>
2020-09-29gallium: prepare framework for supporting GL_NV_shader_atomic_int64Indrajit Kumar Das1-0/+3
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6708>
2020-09-21gallium: add PIPE_CAP_MAX_TEXTURE_MBPierre-Eric Pelloux-Prayer1-2/+1
Allows driver to override the default value (1024) from mesa. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6754>
2020-09-02mesa/st: introduce PIPE_CAP_NO_CLIP_ON_COPY_TEXPierre-Eric Pelloux-Prayer1-0/+3
If supported this means that src_x/src_y/width/height parameters of CopyTex functions will not be clipped using the read framebuffer's dimensions. Cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259>
2020-08-09gallium + mesa/st: Add PIPE_CAP_NIR_ATOMICS_AS_DEREF and use itGert Wollny1-0/+1
This cap is useful for drivers that support hardware atomics and need special handling to resolve their addresses. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
2020-07-17gallium: Add PIPE_CAP_BLEND_EQUATION_ADVANCEDElie Tournier1-0/+1
Signed-off-by: Elie Tournier <elie.tournier@collabora.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516>
2020-07-14gallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLYKarol Herbst1-0/+1
With the current UAPI we only support user pointers from the compute engines, so we need a way to express that in gallium. v2: fix typos v3: add allows_user_pointers helper Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Pierre Moreau <dev@pmoreau.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>
2020-07-14Revert https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580Michel Dänzer1-1/+0
It broke the CI pipeline on master: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/3604314 https://gitlab.freedesktop.org/mesa/mesa/-/jobs/3604315 Revert for now, to allow other MRs to be merged. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5905>
2020-07-14gallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLYKarol Herbst1-0/+1
With the current UAPI we only support user pointers from the compute engines, so we need a way to express that in gallium. v2: fix typos v3: add allows_user_pointers helper Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Pierre Moreau <dev@pmoreau.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>
2020-06-22gallium: Add pipe cap for primitive restart with fixed indexNeil Roberts1-0/+1
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>