aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_screen.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Add PIPE_CAP_BLEND_EQUATION_ADVANCEDElie Tournier2020-07-171-0/+1
| | | | | | | Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: Gert Wollny <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516>
* gallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLYKarol Herbst2020-07-141-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 <[email protected]> Reviewed-by: Pierre Moreau <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>
* Revert https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580Michel Dänzer2020-07-141-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>
* gallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLYKarol Herbst2020-07-141-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 <[email protected]> Reviewed-by: Pierre Moreau <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>
* gallium: Add pipe cap for primitive restart with fixed indexNeil Roberts2020-06-221-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 <[email protected]> (v1) Reviewed by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5559>
* gallium: change comments to remove 'state tracker'Marek Olšák2020-05-131-1/+1
| | | | | | | Acked-by: Eric Anholt <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
* gallium: add a new cap PIPE_CAP_GLSL_ZERO_INITPierre-Eric Pelloux-Prayer2020-05-051-0/+1
| | | | | | | Allows driver to select a zero init mode between the 3 possible values. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>
* gallium: add pipe cap for scissored clears and pass scissor state to clear() ↵Mike Blumenkrantz2020-04-291-0/+1
| | | | | | | | | | | | | | | | hook this adds a new pipe cap that drivers can support which enables passing buffer clears with scissor test enabled through to be handled by the driver instead of having mesa draw a quad also adjust all existing clear() hooks to have the new parameter Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4310>
* gallium: add PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE for glthreadMarek Olšák2020-04-271-0/+1
| | | | | | | and add radeonsi support. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>
* gallium: prepare framework for supporting AlphaToCoverageDitherControlNVIndrajit Kumar Das2020-04-231-0/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4543>
* gallium: add PIPE_CAP_VIEWPORT_MASKIlia Mirkin2020-04-151-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* gallium: add PIPE_CAP_SYSTEM_SVMKarol Herbst2020-04-151-0/+3
| | | | | | | | | v2: split enum in specific caps to abstract the CL enum v3: remove BUFFER_SVM caps Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>
* gallium: add viewport swizzling state and capIlia Mirkin2020-04-121-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
* vbo,gallium: make glBegin/End buffer size configurable by driversMarek Olšák2020-03-211-0/+3
| | | | | | | | The default is 512 KB, but radeonsi wants 4 MB. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4154> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4154>
* gallium: add PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICESMarek Olšák2020-03-111-0/+1
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3591>
* gallium: add PIPE_CAP_PSIZ_CLAMPEDLouis-Francis Ratté-Boulianne2020-03-031-0/+1
| | | | | | | | | | | This new capability indicates that the point size has been clamped. This also means that the gl_PointSize has been modified and that its value should be lowered for transform feedback, if needed. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* gallium: add PIPE_CAP_VIEWPORT_TRANSFORM_LOWEREDLouis-Francis Ratté-Boulianne2020-03-031-0/+3
| | | | | | | | | | | This new capability indicates that the nir_lower_viewport_transform pass is enabled. This also means that the gl_Position value is modified and should be lowered for transform feedback, if needed. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* gallium: add PIPE_CAP_PACKED_STREAM_OUTPUTLouis-Francis Ratté-Boulianne2020-03-031-0/+3
| | | | | | | | | | | Setting this cap to 0 (default is 1) should disable packing optimization for stream output (e.g. GL transform feedback captured variables). Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* gallium: Add a cap for enabling lowering of image load/store intrinsics.Eric Anholt2020-02-241-0/+2
| | | | | | | | | The deref stuff is hard to handle in a backend supporting dynamic indexing, while the lowering can easily turn that into the same kind of dynamic indexing we do for textures, UBOs, and SSBOs. Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3728>
* st: add support for INTEL_blackhole_renderLionel Landwerlin2020-02-131-0/+4
| | | | | | | | | | | | | | | | Adding a new CSO proved to be fairly difficult especially because this extension affect draw/dispatch/blit alike. Instead this change passes the state of the noop into the entry points emitting the operations affected. v2: Fix assert in default pipe caps v3: Drop whitespace changes (Ken) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2964>
* gallium: Add a cap bit for integer multiplication between 32-bit and 16-bitIan Romanick2020-01-231-0/+1
| | | | | | | | | | | | | | Driver supports integer multiplication between a 32-bit integer and a 16-bit integer. If the second operand is 32-bits, the upper 16-bits are ignored, and the low 16-bits are possibly sign extended as necessary. Iris will eventually enable this. Not sure about other drivers. v2: Add default value to u_screen.c. Suggested by Caio. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>
* gallium: Add a cap bit for OpenCL-style extended integer functionsIan Romanick2020-01-231-0/+3
| | | | | | | | | | | | Iris will eventually enable this. Looking at the header files, it looks like Midgard could also enable it. Basically, any GPU that fully supports OpenCL can. v2: Add default value to u_screen.c. Suggested by Caio. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>
* gallium: add PIPE_CAP_MAX_VERTEX_BUFFERSChristian Gmeiner2019-12-211-0/+3
| | | | | | | | | Add PIPE_CAP_MAX_VERTEX_BUFFERS param, which defaults to 16. Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
* mesa/st: support lowering user-clip-planes automaticallyErik Faye-Lund2019-10-171-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower two-sided lightingErik Faye-Lund2019-10-171-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower point-sizeErik Faye-Lund2019-10-171-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower alpha-testingErik Faye-Lund2019-10-171-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add flatshade lowering capabilityDave Airlie2019-10-171-0/+3
| | | | | | | This allows the driver to request flatshade lowering. (NIR drivers only so far). Reviewed-by: Marek Olšák <[email protected]>
* gallium: rename PIPE_CAP_MAX_FRAMES_IN_FLIGHT to PIPE_CAP_THROTTLEJames Xiong2019-10-141-1/+1
| | | | | | | | | v2: [ Michel Dänzer ] * Update src/gallium/docs/source/screen.rst accordingly Signed-off-by: James Xiong <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> # v1 Reviewed-by: Marek Olšák <[email protected]> # v1
* gallium: add a a new cap for changing the TGSI TG4 instruction encodingDave Airlie2019-10-111-0/+1
| | | | | | | | | | | | | Accessing the TG4 component via immediates in the llvmpipe backend is quite messy (like really messy). Roland suggested we change the instruction encoding, so introduce a cap to allow the component to be selected to be store in the sampler swizzle, which should be otherwise unused. I could probably switch all drivers over, but virgl would need some work that I'd prefer not to rush it. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: Add PIPE_CAP_DEMOTE_TO_HELPER_INVOCATIONCaio Marcelo de Oliveira Filho2019-09-301-0/+3
| | | | | | | | | | | | To enable EXT_demote_to_helper_invocation: This extension adds a "demote" keyword that is similar to "discard" but only suppresses subsequent writes and outputs to the framebuffer, and does not terminate the execution of the invocation. For the remainder of the execution, the invocation is "demoted" to act like a helper invocation. Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAP"Christian Gmeiner2019-09-181-0/+3
| | | | | | | | | | There are GPUs that do not support this feature. This reverts commit e871abe452ad40efcccb0bab6b88fc31d0551e29 Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: Add ARB_gl_spirv supportCaio Marcelo de Oliveira Filho2019-09-101-0/+4
| | | | | | | | | | | | | | The PIPE_CAP_GL_SPIRV capability enables ARB_gl_spirv and ARB_spirv_extensions, and will make sure the corresponding SPIR-V capabilities and extensions lists are initialized. The additional PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS capability enables the support for Variable Pointers in SPIR-V shaders. This depends on the driver and is not mandatory for ARB_gl_spirv support. v2: Add a PIPE_CAP for Variable Pointers. (Marek) Reviewed-by: Alejandro Piñeiro <[email protected]> [v1]
* gallium: Plumb through a way to disable GLSL const loweringConnor Abbott2019-09-051-0/+4
| | | | | | | | | | For radeonsi, we will prefer the NIR pass as it'll generate better code (some index calculation and a single load vs. a load, then index calculation, then another load) and oftentimes NIR optimization can kick in and make all the access indices constant. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* gallium/vl: use compute preference for all multimedia, not just blitIlia Mirkin2019-08-201-1/+1
| | | | | | | | | | | | The compute paths in vl are a bit AMD-specific. For example, they (on nouveau), try to use a BGRX8 image format, which is not supported. Fixing all this is probably possible, but since the compute paths aren't in any way better, it's difficult to care. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111213 Fixes: 9364d66cb7 (gallium/auxiliary/vl: Add video compositor compute shader render) Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add PIPE_CAP_TGSI_ATOMINC_WRAP to indicate supportPierre-Eric Pelloux-Prayer2019-08-061-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: Implement GL_EXT_shader_samples_identical via a new capabilityKenneth Graunke2019-08-011-0/+1
| | | | | | | | | This exposes the textureSamplesIdenticalEXT function in GLSL. We enable it for iris and radeonsi, because their compilers already have support for this. Tested on Intel Kabylake and AMD Vega 64. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add PIPE_CAP_TEXTURE_SHADOW_LODSagar Ghuge2019-07-301-0/+3
| | | | | | | | v2: Line wrap to 80 char (Marek Olsak) Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: add PIPE_CAP_GRAPHICSMarek Olšák2019-07-291-0/+1
| | | | | Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* gallium: Add PIPE_CAP_TGSI_FS_POINT_IS_SYSVALAndreas Baierl2019-07-181-0/+1
| | | | | | | | This adds an option to treat gl_PointCoord as a system value. Signed-off-by: Andreas Baierl <[email protected]> Reviewed-by: Qiang Yu <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: get rid of PIPE_CAP_SM3Erik Faye-Lund2019-07-101-6/+3
| | | | | | | | | | | | | | | | | | | | | PIPE_CAP_SM3 has always been an odd one out of all our caps. While most other caps are fine-grained and single-purpose, this cap encode several features in one. And since OpenGL cares more about single features, it'd be nice to get rid of this one. As it turns, this is now relatively simple. We only really care about three features using this cap, and those already got their own caps. So we can remove it, and make sure all current drivers just give the same response to all of them. The only place we *really* care about SM3 is in nine, and there we can instead just re-construct the information based on the finer-grained caps. This avoids DX9 semantics from needlessly leaking into all of the drivers, most of who doesn't care a whole lot about DX9 specifically. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
* gallium: give vertex-shader saturate its own capErik Faye-Lund2019-07-101-0/+1
| | | | | | | | | | Shader Model 3.0 is a big promise to make to the state-tracker, and for instance mobile hardware might support vertex-shader saturate but not some of the other features of SM3. So let's give this its own cap for simplicity. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: give fragment-shader derivatives its own capErik Faye-Lund2019-07-101-0/+1
| | | | | | | | | | Shader Model 3.0 is a big promise to make to the state-tracker, and for instance mobile hardware might support fragment-shader derivatives but not some of the other features of SM3. So let's give this its own cap for simplicity. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: give fragment-shader texture-lod its own capErik Faye-Lund2019-07-101-0/+3
| | | | | | | | | | Shader Model 3.0 is a big promise to make to the state-tracker, and for instance mobile hardware might support texture lod but not some of the other features of SM3. So let's give this its own cap for simplicity. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add CAP for opcode DIVGert Wollny2019-06-301-0/+1
| | | | | | | | Not all drivers support TGSI_OPCODE_DIV, so we should have a cap to be able to check this. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add PIPE_CAP_ATOMIC_FLOAT_MINMAXCaio Marcelo de Oliveira Filho2019-06-131-0/+1
| | | | | | | Used to enable INTEL_shader_atomic_float_minmax. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallium: Add PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTEDCaio Marcelo de Oliveira Filho2019-06-111-0/+1
| | | | | | | | | | | Tells whether or not the driver can handle gl_LocalInvocationIndex and gl_GlobalInvocationID. If not supported (the default), state tracker will lower those on behalf of the driver. v2: Add case to u_screen.c. (Anholt) Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: Add PIPE_CAP_FBFETCH_COHERENT and expose extensionsKenneth Graunke2019-05-231-0/+1
| | | | | | | st/mesa now exposes KHR_blend_equation_advanced_coherent and EXT_shader_framebuffer_fetch if the new capability is supported. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Change PIPE_CAP_TGSI_FS_FBFETCH bool to PIPE_CAP_FBFETCH countKenneth Graunke2019-05-231-1/+1
| | | | | | | | | | | | | | TGSI's FBFETCH instruction currently only supports reading from a single render target, but NIR intrinsics can support multiple render targets. radeonsi can only support fetching from RT 0, but other drivers may be able to support fetching from any render target. To express this, this patch renames PIPE_CAP_TGSI_FS_FBFETCH to simply PIPE_CAP_FBFETCH, and converts it from a boolean "is FBFETCH supported?" to an integer number of render targets which can be fetched. Reviewed-by: Marek Olšák <[email protected]>
* gallium: enable dmabuf on BSD as wellGreg V2019-05-221-1/+1
| | | | | | | | | The DRM_CONF_SHARE_FD code did not check for Linux, so the commit that introduced PIPE_CAP_DMABUF broke Wayland-EGL clients on FreeBSD. Fixes: 8ae50e60 (gallium: replace DRM_CONF_SHARE_FD with PIPE_CAP_DMABUF) Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>