aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add st_context_iface::flush_resource to call FLUSH_VERTICESMarek Olšák2020-01-171-0/+7
|
* st/dri: track if image is created by a dmabufGurchetan Singh2020-01-151-0/+2
| | | | | | | Will be used by EXT_EGL_image_storage later. Acked-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3375>
* gallium: Add PIPE_FORMAT_P010 supportThong Thai2020-01-031-0/+1
| | | | | | Signed-off-by: Thong Thai <[email protected]> Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3153>
* gallium: add PIPE_CAP_MAX_VERTEX_BUFFERSChristian Gmeiner2019-12-211-0/+1
| | | | | | | | | 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>
* util/format: add missing vulkan formatsJonathan Marek2019-12-191-2/+24
| | | | | | | | | Add some missing vulkan formats to util/format, this solves all the missing pipe format cases for the formats that turnip supports. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3170>
* gallium: enable INTEL_PERFORMANCE_QUERYDongwon Kim2019-12-102-0/+67
| | | | | | | | | | | | | | | | | new state tracker APIs added for INTEL_performance_query This extension is enabled if all vendor specific functions for it exist. v2: add st_cb_perfquery.* to the list of sources in Makefile v3: minor code clean-up v4: - add driver hooks for intel-performance-query apis - add PIPE level performance counter and type enums that match to OpenGL enums - do conversion of pipe_perf_counter_type and pipe_perf_counter_data_type enums to GL defines in state_tracker Signed-off-by: Dongwon Kim <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: add a notify_before_flush callback param to flushPierre-Eric Pelloux-Prayer2019-12-101-1/+3
| | | | | | | | | | The new callback is called right before the flush is done to allow users of st->flush to do some work after all the previous work has been flushed. This will be used by dri_flush in the next commit. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Store the image format in winsys_handleNanley Chery2019-12-061-0/+6
| | | | | | | | This format will be used to properly handle planar images with modifiers in iris. Fixes: 246eebba4a8 ("iris: Export and import surfaces with modifiers that have aux data") Reviewed-by: Kenneth Graunke <[email protected]>
* driconf, glsl: Add a vs_position_always_invariant optionKenneth Graunke2019-11-271-0/+1
| | | | | | | | | | | | | | | | | | | | Many applications use multi-pass rendering and require their vertex shader position to be computed the same way each time. Optimizations may consider, say, fusing a multiply-add based on global usage of an expression in a shader. But a second shader with the same expression may have different code, causing that optimization to make the other choice the second time around. The correct solution is for applications to mark their VS outputs 'invariant', indicating they need multiple shaders to compute that output in the same manner. However, most applications fail to do so. So, we add a new driconf option - vs_position_always_invariant - which forces the gl_Position output in vertex shaders to be marked invariant. Fixes: 7025dbe794b ("nir: Skip emitting no-op movs from the builder.") Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: fix Sanctuary and Tropics by disabling ARB_gpu_shader5 for themMarek Olšák2019-11-111-0/+1
| | | | | | | They use the "sample" keyword as a variable name. Cc: 19.2 19.3 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* gallium: Add equivalents of packed MESA_FORMAT_*UINT formats.Eric Anholt2019-11-071-0/+25
| | | | | | | | These are the last formats that MESA_FORMAT had and PIPE_FORMAT didn't. The .csv entries channel sizes and swizzles all came from the corresponding UNORM format. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add an equivalent of MESA_FORMAT_BGR_UNORM8.Eric Anholt2019-11-071-0/+1
| | | | | | | | This is the last unorm format that MESA_FORMAT had and PIPE_FORMAT didn't. Note that it's an array format on gallium's side as well, since it's a NPOT pixel size. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add some more channel orderings of packed formats.Eric Anholt2019-11-071-0/+8
| | | | | | This covers everything that MESA_FORMAT had for packed unorm. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add defines for FXT1 texture compression.Eric Anholt2019-11-071-0/+3
| | | | | | | | | | This texture compression is exposed by 830 and 915, and to make MESA_FORMAT match PIPE_FORMAT defines I need a corresponding PIPE_FORMAT. v2: Set is_hand_written so we don't try to generate pack/unpack code. Reviewed-by: Marek Olšák <[email protected]>
* util: rename PIPE_ARCH_*_ENDIAN to UTIL_ARCH_*_ENDIANDylan Baker2019-11-052-4/+4
| | | | | | | | | | | As requested by Tim. This was generated with: grep 'PIPE_ARCH_.*_ENDIAN' -rIl | xargs sed -ie 's@PIPE_ARCH_\(.*\)_ENDIAN@UTIL_ARCH_\1_ENDIAN@'g v2: - add this patch Reviewed-by: Eric Engestrom <[email protected]>
* util/u_endian: set PIPE_ARCH_*_ENDIAN to 1Dylan Baker2019-11-053-17/+4
| | | | | | | | | | | | This will allow it to be used as a drop in replacement for _mesa_little_endian in a number of cases. v2: - Always define PIPE_ARCH_LITTLE_ENDIAN and PIPE_ARCH_BIG_ENDIAN, define the one that reflects the host system to 1 and the other to 0 - replace all uses of #ifdef, #ifndef, and #if defined() with #if and #if ! with PIPE_ARCH_*_ENDIAN Reviewed-by: Eric Engestrom <[email protected]>
* gallium: add pipe_screen::finalize_nirMarek Olšák2019-10-231-0/+11
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: Drop the unused PIPE_FORMAT_A*L* formats.Eric Anholt2019-10-201-22/+0
| | | | | | | Now that Mesa is also using an array format for LA, nothing was using these. (And, clearly, no HW driver had exposed them). Reviewed-by: Marek Olšák <[email protected]>
* 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/+1
| | | | | | | 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: remove PIPE_SHADER_CAP_SCALAR_ISAMarek Olšák2019-10-101-1/+0
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/tgsi: add support for DEMOTE and READ_HELPER opcodesIlia Mirkin2019-10-071-2/+2
| | | | | | | | | | This mirrors the intrinsics in the GLSL IR. One could imagine an alternate definition where reading the semantic would account for the READ_HELPER functionality, but that feels potentially dodgy and could be subject to CSE unpleasantness. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE to skip util_range lockMarek Olšák2019-10-071-0/+1
| | | | | | | | | u_upload_mgr sets it, so that util_range_add can skip the lock. The time spent in tc_transfer_flush_region decreases from 0.8% to 0.2% in torcs on radeonsi. Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "Revert "st/dri2: Implement DRI2bufferDamageExtension""Boris Brezillon2019-10-071-0/+17
| | | | | | | This reverts commit 19546108d3dd5541a189e36df4ea83b3f519e48f. This commit breaks the build because lima implements ->set_damage_region(). I guess we'll need more discussion before removing the ->set_damage_region() hook.
* Revert "st/dri2: Implement DRI2bufferDamageExtension"Boris Brezillon2019-10-071-17/+0
| | | | | | | | | | | | | | This reverts commit 492ffbed63a2a62759224b1c7d45aa7923d8f542. BACK_LEFT attachment can be outdated when the user calls KHR_partial_update(), leading to a damage region update on the wrong pipe_resource object. Let's not expose the ->set_damage_region() method until the core is fixed to handle that properly. Cc: [email protected] Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Daniel Stone <[email protected]>
* gallium: Add PIPE_CAP_DEMOTE_TO_HELPER_INVOCATIONCaio Marcelo de Oliveira Filho2019-09-301-0/+1
| | | | | | | | | | | | 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]>
* clover: add support for passing kernels as nir to the driverKarol Herbst2019-09-211-0/+1
| | | | | | | | | | | | | v2: minor formatting fixes v3: call glsl_type_singleton_init_or_ref and glsl_type_singleton_decref v4: capitalize and punctuate comments fix text_executable -> text_intermediate in TODO make glsl_type_singleton wrapper static v5: rewrite how we run the nir passes v6: fix unhandled case switch warning in st/mesa Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> (v4)
* rename pipe_llvm_program_header to pipe_binary_program_headerKarol Herbst2019-09-211-2/+2
| | | | | | | | We want to use it for other formats as well, so give it a more generic name Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* gallium: add blob field to pipe_llvm_program_headerKarol Herbst2019-09-211-0/+1
| | | | | | | | makes it easier to consume a IR_NATIVE binary Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* gallium: extend resource_get_param to be as capable as resource_get_handleMarek Olšák2019-09-181-1/+10
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAP"Christian Gmeiner2019-09-181-0/+1
| | | | | | | | | | 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/+2
| | | | | | | | | | | | | | 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/+1
| | | | | | | | | | 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: Add the ASTC 3D formats.Eric Anholt2019-08-261-0/+22
| | | | | | | No driver implements them yet, but this is a long way toward gallium having matching format enums for Mesa formats. Reviewed-by: Marek Olšák <[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: Remove manual defining of PIPE_FORMAT enum values.Eric Anholt2019-08-191-357/+357
| | | | | | | | | Now that SVGA doesn't have a table that has to be in PIPE_FORMAT order, we can let the enums have whatever values they naturally would without worrying about holes. Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/dri2: Implement DRI2bufferDamageExtensionDaniel Stone2019-08-131-0/+17
| | | | | | | | | | | | | | | Add a pipe_screen->set_damage_region() hook to propagate set-damage-region requests to the driver, it's then up to the driver to decide what to do with this piece of information. If the hook is left unassigned, the buffer-damage extension is considered unsupported. Signed-off-by: Daniel Stone <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Qiang Yu <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* state_tracker/winsys_handle: Add plane input fieldJordan Justen2019-08-131-0/+5
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* gallium/screen: Add pipe_screen::resource_get_paramJordan Justen2019-08-132-0/+25
| | | | | | | | | | This function retrieves individual parameters selected by enum pipe_resource_param. It can be used as a more direct alternative to pipe_screen::resource_get_handle. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* gallium: add TGSI_SEMANTIC_DEFAULT_OUTER/INNER_LEVELMarek Olšák2019-08-121-0/+2
| | | | for radeonsi NIR support.
* gallium: add AMD-specific compute TGSI enumsMarek Olšák2019-08-121-0/+2
| | | | for tgsi_to_nir
* gallium: add TGSI_PROPERTY_VS_BLIT_SGPRS_AMD for tgsi_to_nirMarek Olšák2019-08-121-0/+1
| | | | needed by radeonsi NIR support
* mesa/gallium: add dric option to allow overriding GL vendor stringTimothy Arceri2019-08-071-0/+1
| | | | | | | Will be used in the following patch. Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93551
* gallium: add PIPE_CAP_TGSI_ATOMINC_WRAP to indicate supportPierre-Eric Pelloux-Prayer2019-08-061-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* tgsi: add ATOMICINC_WRAP/ATOMICDEC_WRAP opcodePierre-Eric Pelloux-Prayer2019-08-061-1/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>