aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* meson: inline `inc_common`Eric Engestrom2020-03-281-1/+1
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* nv50, nvc0: fix must_check warning of util_dynarray_resize_bytesKarol Herbst2020-03-272-6/+14
| | | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330>
* nv50: remove unused variableErik Faye-Lund2020-03-271-2/+0
| | | | | | | | This isn't used anymore, so let's get rid of it to silence a warning. Fixes: c574cda3c6a ("util: Make helper functions for pack/unpacking pixel rows.") Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330>
* Revert "gallium: make handles of set_global_binding 64 bit"Karol Herbst2020-03-102-6/+20
| | | This reverts commit e1ffb72a05f9b50ee47767aaadbab3e47896ee14
* gallium: make handles of set_global_binding 64 bitKarol Herbst2020-03-102-20/+6
| | | | | | | | | | needed by CL Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072>
* nvc0: enable EXT_texture_shadow_lodIlia Mirkin2020-03-022-4/+10
| | | | | | | | This passes all the CTS tests for this extension. Signed-off-by: Ilia Mirkin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014>
* nv50,nvc0: add newly added PIPE_CAP's to listIlia Mirkin2020-03-022-0/+34
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014>
* gallium/video: remove pipe_video_buffer.chroma_formatPierre-Eric Pelloux-Prayer2020-02-273-6/+3
| | | | | | | | | | chroma_format depends on buffer_format so use the format_to_chroma_format helper instead of storing it next to buffer_format. This avoids bugs where one value is changed without updating the other. Reviewed-by: Marek Olšák <[email protected]> Acked-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3738>
* nouveau: Reuse tgsi_get_gl_varying_semantic().Eric Anholt2020-02-051-113/+8
| | | | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506>
* nouveau: reuse tgsi_get_gl_frag_result_semantic().Eric Anholt2020-02-051-30/+1
| | | | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Tested-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506>
* nouveau: Reuse tgsi_get_sysval_semantic().Eric Anholt2020-02-051-115/+3
| | | | | | | | | It's now in a place accessible from the nouveau driver. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Tested-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506>
* glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.Eric Anholt2020-02-054-129/+67
| | | | | | | | | | | | | | | | | This means you can directly use format utils on it without having to have your own GL enum to number-of-components switch statement (or whatever) in your vulkan backend. Thanks to imirkin for fixing up the nouveau driver (and a couple of core details). This fixes the computed qualifiers for EXT_shader_image_load_store's non-integer sizeNxM qualifiers, which we don't have tests for. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> (v3d) Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355>
* util: Make helper functions for pack/unpacking pixel rows.Eric Anholt2020-02-044-17/+5
| | | | | | | | | Almost all users of the unpack functions don't have strides to plug in (and many are only doing one pixel!), and this will help simplify them. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>
* nv50: report max lod bias of 15.0Ilia Mirkin2020-02-021-1/+1
| | | | | | | | | | | The blob returns 15, the state creation code clamps it to 15, but since the dawn of time we've returned 4.0. Setting this to 15 also fixes GTF-GL33.gtf21.GL3Tests.texture_lod_bias.texture_lod_bias_clamp_m_le_M which is sensitive to these limits. Signed-off-by: Ilia Mirkin <[email protected]>
* nouveau/nvc0: add extern keyword to nvc0_miptree_vtbl.Timur Kristóf2020-01-211-1/+1
| | | | | Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* nvc0: disable xfb's which don't have a strideIlia Mirkin2020-01-151-4/+4
| | | | | | | | | | No stride / no attributes means that nothing is being written to the buffer. However it might still prevent primitives from being written out to the other buffers. Disabling it entirely seems to fix it. Fixes GTF-GL45.gtf30.GL3Tests.transform_feedback.transform_feedback_overflow Signed-off-by: Ilia Mirkin <[email protected]>
* nir/lower_atomics_to_ssbo: Also lower barriersJason Ekstrand2020-01-131-2/+0
| | | | | | | | | | | This is more correct for a pass which is supposed to completely lower away atomic counters. It also lets us stop supporting atomic counter barriers in most of the drivers. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>
* nir: Rename nir_intrinsic_barrier to control_barrierJason Ekstrand2020-01-131-1/+1
| | | | | | | | This is a more explicit name now that we don't want it to be doing any memory barrier stuff for us. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>
* nir: Add a new memory_barrier_tcs_patch intrinsicJason Ekstrand2020-01-131-0/+2
| | | | | | | | | | | Right now, it's implemented as a no-op for everyone. For most drivers, it's a switch case in the NIR -> whatever which just breaks. For ir3, they already have code to delete tessellation barriers so we just add a case to also delete memory_barrier_tcs_patch. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>
* nvc0: treat all draws without color0 broadcast as MRTIlia Mirkin2020-01-121-1/+1
| | | | | | | | | | | Per the semi-recently-released NVIDIA docs, when this bit is not enabled, then the result for RT[0] will be used. So if e.g. only a single RT is drawn to and it's not RT[2], the results will not be visible. Fixes GTF-GL45.gtf33.GL3Tests.explicit_attrib_location.explicit_attrib_location_pipeline which was failing due to a frag shader outputting only to location=2. Signed-off-by: Ilia Mirkin <[email protected]>
* gm107/ir: avoid combining geometry shader stores at 0x60Ilia Mirkin2020-01-121-0/+10
| | | | | | | | | | | | This corresponds to gl_PrimitiveID and gl_Layer. When both of these are stored in a single AST.64 or AST.128 operation, then it appears as though the whole store fails. Fixes the recently extended glsl-1.50-transform-feedback-builtins piglit, and also gtf30.GL3Tests.transform_feedback.transform_feedback_builtins. The issue was reproduced on GM107 and GP108 but not GK208 nor GK104. Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: add dummy reset status supportIlia Mirkin2020-01-122-1/+8
| | | | | | | | Perhaps in a future implementation, such events could be passed back to the driver, or queried directly. However for now, this is required for GL 4.3 robustness contexts. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50,nvc0: fix destination coordinates of blitIlia Mirkin2020-01-122-10/+18
| | | | | | | | | | | | | | | | | | | | | | | The fix was found by Karol Herbst a long time ago, but it was unclear why it helped or if it would create additional problems. This change adds a comment that explains what's going on, and in the process also normalizes the nv50 implementation to match. The coordinates which are fed to gl_Position map directly to pixel coordinates, since the viewport transform is disabled. If the framebuffer is MSAA, then that doesn't affect the pixel coordinates at all, it's just that each pixel has multiple samples. Note that this makes it really clear that this approach is inappropriate for EXT_framebuffer_multisample_blit_scaled, and also the 3d path will fail terribly for direct copies. Thankfully the 2d path normally takes care of this. Fixes KHR-GL43.packed_depth_stencil.blit.depth32f_stencil8 as well as scaling issues in a number of EXT_framebuffer_multisample-related piglit tests (although they continue to fail due to inaccuracies). Signed-off-by: Ilia Mirkin <[email protected]>
* nv50ir/nir: support vec8 and vec16Karol Herbst2019-12-211-1/+3
| | | | Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir: implement global atomics and handle it for nirKarol Herbst2019-12-112-4/+40
| | | | | | | TGSI doesn't have any concept of global memory right now. Signed-off-by: Karol Herbst <[email protected]> Acked-by: Dave Airlie <[email protected]>
* nouveau: request ufind_msb64 lowering in the frontend.Dave Airlie2019-11-221-1/+1
| | | | | | | | This passes the piglit CL builtin-ulong-clz-1.0.generated.cl test. Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* nir: move data.image.access to data.accessMarek Olšák2019-11-191-1/+1
| | | | | | The size of the data structure doesn't change. Reviewed-by: Connor Abbott <[email protected]>
* util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt2019-11-1431-35/+35
| | | | | | | | | | | | | | | To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to move their helpers out of gallium. Since u_format used util_copy_rect(), I moved that in there, too. I've put it in a separate directory in util/ because it's a big chunk of related code, and it's not clear to me whether we might want it as a separate library from libmesa_util at some point. Closes: #1905 Acked-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* util: rename PIPE_ARCH_*_ENDIAN to UTIL_ARCH_*_ENDIANDylan Baker2019-11-052-2/+2
| | | | | | | | | | | 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-052-2/+2
| | | | | | | | | | | | 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]>
* nv50/ir: fix crash in isUniform for undefined valuesKarol Herbst2019-11-031-0/+2
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: mark STORE destination inputs as usedIlia Mirkin2019-10-301-0/+6
| | | | | | | | | | Observed an issue when looking at the code generatedy by the image-vertex-attrib-input-output piglit test. Even though the test itself worked fine (due to TIC 0 being used for the image), this needs to be fixed. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* gm107/ir: fix loading z offset for layered 3d image bindingsIlia Mirkin2019-10-304-54/+202
| | | | | | | | | | | | | | | | | | | | | | | | Unfortuantely we don't know if a particular load is a real 2d image (as would be a cube face or 2d array element), or a layer of a 3d image. Since we pass in the TIC reference, the instruction's type has to match what's in the TIC (experimentally). In order to properly support bindless images, this also can't be done by looking at the current bindings and generating appropriate code. As a result all plain 2d loads are converted into a pair of 2d/3d loads, with appropriate predicates to ensure only one of those actually executes, and the values are all merged in. This goes somewhat against the current flow, so for GM107 we do the OOB handling directly in the surface processing logic. Perhaps the other gens should do something similar, but that is left to another change. This fixes dEQP tests like image_load_store.3d.*_single_layer and GL-CTS tests like shader_image_load_store.non-layered_binding without breaking anything else. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "20.0" <[email protected]>
* util: remove LIST_IS_EMPTY macroTimothy Arceri2019-10-282-5/+5
| | | | | | | Just use the inlined function directly. The new function was introduced in addcf410. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_DEL macroTimothy Arceri2019-10-283-7/+7
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_ADD macroTimothy Arceri2019-10-282-4/+4
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_ADDTAIL macroTimothy Arceri2019-10-282-3/+3
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_INITHEAD macroTimothy Arceri2019-10-283-6/+6
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* nv50/ir: remove DUMMY edge typeKarol Herbst2019-10-174-13/+1
| | | | | | | it was never used Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: rename PIPE_CAP_MAX_FRAMES_IN_FLIGHT to PIPE_CAP_THROTTLEJames Xiong2019-10-142-2/+2
| | | | | | | | | 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: remove PIPE_SHADER_CAP_SCALAR_ISAMarek Olšák2019-10-103-6/+0
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: add nir_shader_compiler_options::lower_to_scalarMarek Olšák2019-10-102-0/+2
| | | | | | | | This will replace PIPE_SHADER_CAP_SCALAR_ISA. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nvc0: add support for GL_EXT_demote_to_helper_invocationIlia Mirkin2019-10-073-0/+14
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE to skip util_range lockMarek Olšák2019-10-0710-15/+15
| | | | | | | | | 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]>
* meson: use idep_nir instead of libnir in libnouveauEric Engestrom2019-10-071-3/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* nouveau: set lower_sub = trueDaniel Schürmann2019-09-303-6/+2
| | | | | | Subtractions are already implemented as additions anyway. Reviewed-by: Connor Abbott <[email protected]>
* nouveau: add idep_nir_headers as dep for libnouveauStephen Barber2019-09-241-2/+2
| | | | | | | | | | | | | | | Fixes a compilation error when building libnouveau: In file included from ../src/gallium/drivers/nouveau/nv50/nv50_program.c:25: ../src/compiler/nir/nir.h:1115:10: fatal error: nir_intrinsics.h: No such file or directory #include "nir_intrinsics.h" ^~~~~~~~~~~~~~~~~~ compilation terminated. Fixes: f014ae3c7cce504afe5d ("nouveau: add support for nir") Signed-off-by: Stephen Barber <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* nv50/ir/nir: comparison of integer expressions of different signedness warningKarol Herbst2019-09-231-1/+1
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Rhys Kidd <[email protected]>
* nv50/ir: fix unnecessary parentheses warningKarol Herbst2019-09-231-1/+1
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Rhys Kidd <[email protected]>
* nvc0: expose spirv supportKarol Herbst2019-09-214-3/+26
| | | | | | | | | | required for OpenCL v2: adjust to changes in previous commits v3: properly convert to NIR in nvc0_cp_state_create Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]> (v1)