aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nvc0
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* nvc0: enable spirv caps with nirKarol Herbst2020-06-221-1/+2
| | | | | | | | This enables the SPIR-V GL extensions moving us a step closer to GL 4.6. Signed-off-by: Karol Herbst <[email protected]> Tested-by: Ben Skeggs <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5512>
* nv50/ir/nir: move away from image_deref intrinsicsKarol Herbst2020-06-181-0/+4
| | | | | | | v2: fix lod source of image operation correctly Signed-off-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>
* nvc0: initial support for tu1xxBen Skeggs2020-06-1010-38/+1122
| | | | | | | | | v2: - add proper method definitions Signed-off-by: Ben Skeggs <[email protected]> Acked-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
* nvc0: initial support for gv100Ben Skeggs2020-06-108-34/+566
| | | | | | | | | | v2: - remove unnecessary MAX2() - add proper method definitions Signed-off-by: Ben Skeggs <[email protected]> Acked-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
* nvc0: remove hardcoded blitter vertprogBen Skeggs2020-06-101-73/+39
| | | | | | | | I don't really feel like writing SM70 SASS by hand... Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
* nvc0: move setting of entrypoint for a shader stage to a functionBen Skeggs2020-06-103-14/+23
| | | | | | | | GV100 requires something different, cleaner to move this to a single place. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
* nvc0: use NVIDIA headers for GP100- compute QMDBen Skeggs2020-06-105-141/+876
| | | | | | Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
* nvc0: use NVIDIA headers for GK104->GM2xx compute QMDBen Skeggs2020-06-106-160/+1077
| | | | | | | | | | | v2: - add header debug_printf(), and indent the output v3: - rename one of the helper macros Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
* nvir/nir: move nir options to codegenBen Skeggs2020-06-101-63/+4
| | | | | | | | | | | | These seem to make more sense living with the compiler. v2: - use a shared function to generate the per-chipset structs - remove nir.h include from header, not needed Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
* gallium: add shader caps INT16 and FP16_DERIVATIVESMarek Olšák2020-06-021-0/+2
| | | | | Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* 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: rename 'state tracker' to 'frontend'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 pipe cap for scissored clears and pass scissor state to clear() ↵Mike Blumenkrantz2020-04-292-0/+2
| | | | | | | | | | | | | | | | 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>
* nv50,nvc0: update with latest capsIlia Mirkin2020-04-161-0/+6
| | | | | | | | | One notable change is that DRAW_INFO_START_WITH_USER_INDICES is enabled. An audit of the code indicates that it should work, and a number of piglit tests exercising glMultiDrawElements continue to function. Signed-off-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4520>
* nvc0: enable GL_NV_viewport_array2Ilia Mirkin2020-04-155-2/+15
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
* Revert "nvc0: fix line width on GM20x+"Karol Herbst2020-04-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a0e57432b76c32f2109dab0ad3df0ba03967441c. It's unclear what caused the test to fail back then. Now it's seems to be reversed. I tested with a close enough piglit and mesa branch and wasn't able to reproduce the same test result I've got in some older piglit runs. Fixes: dEQP-GLES2.functional.rasterization.primitives.lines_wide dEQP-GLES2.functional.rasterization.primitives.line_strip_wide dEQP-GLES2.functional.rasterization.primitives.line_loop_wide dEQP-GLES2.functional.rasterization.limits.points dEQP-GLES2.functional.clipping.line.wide_line_z_clip dEQP-GLES2.functional.clipping.line.wide_line_z_clip_viewport_center dEQP-GLES2.functional.clipping.line.wide_line_z_clip_viewport_corner dEQP-GLES2.functional.clipping.line.wide_line_clip dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_center dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner dEQP-GLES2.functional.clipping.line.wide_line_attrib_clip dEQP-GLES2.functional.polygon_offset.default_result_depth_clamp dEQP-GLES2.functional.polygon_offset.default_factor_1_slope dEQP-GLES2.functional.polygon_offset.fixed16_result_depth_clamp dEQP-GLES2.functional.polygon_offset.fixed16_factor_1_slope Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4575>
* nvc0: enable ASTC and ETC on GM20BKarol Herbst2020-04-151-5/+3
| | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4554>
* nvc0: add NV_viewport_swizzle support for GM200+Ilia Mirkin2020-04-123-0/+14
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
* nv50, nvc0: fix must_check warning of util_dynarray_resize_bytesKarol Herbst2020-03-271-3/+7
| | | | | | | 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>
* Revert "gallium: make handles of set_global_binding 64 bit"Karol Herbst2020-03-101-3/+10
| | | This reverts commit e1ffb72a05f9b50ee47767aaadbab3e47896ee14
* gallium: make handles of set_global_binding 64 bitKarol Herbst2020-03-101-10/+3
| | | | | | | | | | 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-021-1/+1
| | | | | | | | 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-021-0/+17
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014>
* util: Make helper functions for pack/unpacking pixel rows.Eric Anholt2020-02-041-3/+1
| | | | | | | | | 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>
* 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]>
* 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]>
* 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-121-2/+14
| | | | | | | | | | | | | | | | | | | | | | | 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]>
* 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]>
* util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt2019-11-149-10/+10
| | | | | | | | | | | | | | | 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]>
* gm107/ir: fix loading z offset for layered 3d image bindingsIlia Mirkin2019-10-301-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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]>
* 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: remove PIPE_SHADER_CAP_SCALAR_ISAMarek Olšák2019-10-101-2/+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-101-0/+1
| | | | | | | | 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-071-0/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE to skip util_range lockMarek Olšák2019-10-077-9/+9
| | | | | | | | | 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]>
* nouveau: set lower_sub = trueDaniel Schürmann2019-09-301-1/+1
| | | | | | Subtractions are already implemented as additions anyway. Reviewed-by: Connor Abbott <[email protected]>
* nvc0: expose spirv supportKarol Herbst2019-09-212-3/+17
| | | | | | | | | | 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)
* nvc0: fix program dumping, use _debug_printfIlia Mirkin2019-08-071-6/+6
| | | | | | | | | This debug situation is unforunate. debug_printf only does something with DEBUG set, but in practice all that needs to be moved to !NDEBUG. For now, use _debug_printf which always prints. However the whole function is guarded by !NDEBUG. Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: add support for ATOMC_WRAP TGSI operationsIlia Mirkin2019-08-071-1/+1
| | | | Signed-off-by: Ilia Mirkin <[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]>
* tree-wide: replace MAYBE_UNUSED with ASSERTEDEric Engestrom2019-07-311-3/+3
| | | | | | Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* nouveau: flip DEBUG -> !NDEBUGIlia Mirkin2019-07-272-7/+7
| | | | | | | | | | | | | The meson conversion chose to change the meaning of DEBUG to "used for debugging" to be "used for expensive things for debugging", primarily for nir_validate. Flip things over so that we get nice things with optimizations enabled. While we're at it, also kill off nouveau_statebuf.h which is unused (and has a mention of DEBUG which is how I found it). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* nvc0: allow a non-user buffer to be bound at position 0Ilia Mirkin2019-07-271-18/+27
| | | | | | | | | | | Previously the code only handled it for positions 1 and up (as would be for UBO's in GL). It's not a lot of trouble to handle this, and vl or vdpau want this. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111213 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Cc: [email protected]
* nv50,nvc0: update sampler/view bind functions to accept NULL arrayIlia Mirkin2019-07-271-8/+10
| | | | | | | | | Apparently vl (or vdpau) wants to pass that in now. Handle it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111213 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Cc: [email protected]
* gallium: switch boolean -> bool at the interface definitionsIlia Mirkin2019-07-2210-34/+34
| | | | | | | | | | | | | | | | | | This is a relatively minimal change to adjust all the gallium interfaces to use bool instead of boolean. I tried to avoid making unrelated changes inside of drivers to flip boolean -> bool to reduce the risk of regressions (the compiler will much more easily allow "dirty" values inside a char-based boolean than a C99 _Bool). This has been build-tested on amd64 with: Gallium drivers: nouveau r300 r600 radeonsi freedreno swrast etnaviv v3d vc4 i915 svga virgl swr panfrost iris lima kmsro Gallium st: mesa xa xvmc xvmc vdpau va Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
* gallium: get rid of PIPE_CAP_SM3Erik Faye-Lund2019-07-101-1/+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]>
* nvc0: remove nvc0_program.tp.input_patch_sizeKarol Herbst2019-07-092-5/+0
| | | | | | | right now that's dead code Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>