mesa merge requestshttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests2024-01-14T23:39:43Zhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26309gallium: remove unbind_trailing_count from set_vertex_buffers2024-01-14T23:39:43ZMarek Olšákgallium: remove unbind_trailing_count from set_vertex_buffersThis is a simplification that is meant to allow future optimizations.This is a simplification that is meant to allow future optimizations.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24825egl: new attempt to extend EGL_EXT_device_drm_render_node for split display/r...2023-11-20T18:54:21ZLeandro Ribeiroegl: new attempt to extend EGL_EXT_device_drm_render_node for split display/render SoCsThis is another attempt to extend `EGL_EXT_device_drm_render_node` for split display/render SoCs. !12796 is blocked on issues that we probably can't handle, so I've tried to fix that using the approach described in #5591.
For my surpris...This is another attempt to extend `EGL_EXT_device_drm_render_node` for split display/render SoCs. !12796 is blocked on issues that we probably can't handle, so I've tried to fix that using the approach described in #5591.
For my surprise, I've found out that things are working by accident on the case of EGL GBM platform + KMS-only device. Currently, there are only `EGLDevice's` for render-capable devices on the global `EGLDevice` list. So for EGL GBM platform + KMS-only device, `_eglFindDevice()` should return `NULL` and things should fail, but `_eglFindDevice()` is returning the last element from the list when it can't find an `EGLDevice`.
cc: @daniels @emersion @eric @xexaxo
Depends on !25504
Closes #5591Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654gallium: Modify default path for DMABUF to use DRM2023-04-04T16:26:36ZLucas Fryzekgallium: Modify default path for DMABUF to use DRMModify the code path taken in `u_pipe_screen_get_param_defaults`
to call DRM to check if `PIPE_CAP_DMABUF` is supported. This is
required for overriding the behavior in `dri2_init_screen_extensions`
to support importing DMABUFs on driver...Modify the code path taken in `u_pipe_screen_get_param_defaults`
to call DRM to check if `PIPE_CAP_DMABUF` is supported. This is
required for overriding the behavior in `dri2_init_screen_extensions`
to support importing DMABUFs on drivers that don't support DRM, by
simply changing how `PIPE_CAP_DMABUF` is handled in their driver.
This change also add supports for `get_screen_fd` to all the gallium drivers that are missing this functionality.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20811tegra: handle tiling parameters when importing resources2023-12-09T08:08:13ZDiogo Ivotegra: handle tiling parameters when importing resourcesThe creation of a resource meant for scanout imposes a linear
tiling so that it can be properly displayed by the hardware,
since no mechanism to inform the kernel of non-trivial tilings
is in place. Remove the linear modifier restriction...The creation of a resource meant for scanout imposes a linear
tiling so that it can be properly displayed by the hardware,
since no mechanism to inform the kernel of non-trivial tilings
is in place. Remove the linear modifier restriction and add an
IOCTL call to inform the kernel of the correct tiling parameters.
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19311tegra: remove get_dmabuf_modifier_planes2022-10-28T08:49:01ZYusuf Khantegra: remove get_dmabuf_modifier_planesIf a function is registered for this we will use util_format_get_num_planes
instead of its designated fallback since nvc0 doesnt have a need
for get_dmabuf_modifier_planes.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>If a function is registered for this we will use util_format_get_num_planes
instead of its designated fallback since nvc0 doesnt have a need
for get_dmabuf_modifier_planes.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18649tegra: fix modifier handling in resource creation2022-10-11T20:47:25ZDiogo Ivotegra: fix modifier handling in resource creationPassing DRM_MOD_INVALID to resource_create_with_modifiers()
leads to a failed allocation due to changes in nouveau. Revert
this behaviour.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6693
Fixes: 129d83cac2a ("nouveau: Use ...Passing DRM_MOD_INVALID to resource_create_with_modifiers()
leads to a failed allocation due to changes in nouveau. Revert
this behaviour.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6693
Fixes: 129d83cac2a ("nouveau: Use format modifiers in buffer allocation")
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17747gallium: reorder the shader stage enum to match Mesa2023-01-06T08:18:43ZDave Airliegallium: reorder the shader stage enum to match Mesa
This has been a source of annoyance as we've moved mesa and gallium closer. Reordering them to be the same removes a source of bugs, but also means we don't have to think about it any more.
Fallout found so far:
```
virgl: wire encodin...
This has been a source of annoyance as we've moved mesa and gallium closer. Reordering them to be the same removes a source of bugs, but also means we don't have to think about it any more.
Fallout found so far:
```
virgl: wire encoding
radeonsi: bases a size of an array
zink: encoders the enum bit fields into a templated cache lookup
svga: uses TESS_EVAL as last graphics shader.
```
Otherwise this seems to pass CI.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13231tegra: Use private reference counts for sampler views and resources2022-02-18T22:40:12ZThierry Redingtegra: Use private reference counts for sampler views and resourcesWith the recent addition of the shortcuts aiming to avoid atomic
operations, the reference counts on sampler views and resources can
become unbalanced in the Tegra driver since they are wrapped and then
proxied to the Nouveau driver.
Fi...With the recent addition of the shortcuts aiming to avoid atomic
operations, the reference counts on sampler views and resources can
become unbalanced in the Tegra driver since they are wrapped and then
proxied to the Nouveau driver.
Fix this by keeping private reference counts.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12895WIP: tegra: adjust refcount for resources if they are st managed2021-10-06T21:20:13ZKarol Herbstkherbst@redhat.comWIP: tegra: adjust refcount for resources if they are st managedNot the best solution, but maybe @tagr has a better idea.
Regressions from 7688b8ae9802 and ef5d42741327
Todos:
- [ ] tegra_resource_destory leaks the nouveau resourceNot the best solution, but maybe @tagr has a better idea.
Regressions from 7688b8ae9802 and ef5d42741327
Todos:
- [ ] tegra_resource_destory leaks the nouveau resourceThierry RedingThierry Redinghttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742gallium+drivers: Draw helper updates2021-03-27T19:48:00ZRob Clarkgallium+drivers: Draw helper updatesMostly plumbing thru the `util_draw_multi()` helper. Plus adding indirect/multidraw support in primconvert.Mostly plumbing thru the `util_draw_multi()` helper. Plus adding indirect/multidraw support in primconvert.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9425tegra/context: fix regression in tegra_draw_vbo2021-03-11T22:52:07ZKarol Herbstkherbst@redhat.comtegra/context: fix regression in tegra_draw_vboWe should only pass in a new indirect_info object if we actually set valid
values in it.We should only pass in a new indirect_info object if we actually set valid
values in it.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8345mesa,gallium,vbo: fix drivers and shared code by skipping draws with count ==...2021-01-14T01:50:07ZMarek Olšákmesa,gallium,vbo: fix drivers and shared code by skipping draws with count == 0 and instance_count == 0This should fix https://gitlab.freedesktop.org/mesa/mesa/-/issues/4045 and it fixes other issues that I reproduced. @idr @kwgThis should fix https://gitlab.freedesktop.org/mesa/mesa/-/issues/4045 and it fixes other issues that I reproduced. @idr @kwgMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441mesa,gallium: rework of draw interfaces and multi draw support in gallium, to...2020-11-24T16:04:26ZMarek Olšákmesa,gallium: rework of draw interfaces and multi draw support in gallium, touches all driversThis MR is a prerequisite for unification of draw interfaces between core Mesa and Gallium. (using `pipe_draw_info` in core Mesa)
It's also a massive redesign of `draw_vbo` to support multi draws and pass indirect draw info differently....This MR is a prerequisite for unification of draw interfaces between core Mesa and Gallium. (using `pipe_draw_info` in core Mesa)
It's also a massive redesign of `draw_vbo` to support multi draws and pass indirect draw info differently. It's also a cleanup of core Mesa draw code.
Core Mesa Changes:
* Added `Driver.DrawTransformFeedback` to get this out of Driver.Draw
* Added `bool primitive_restart` and `unsigned restart_index` into Driver.Draw (for display lists to disable it trivially and to match gallium)
* Many cleanups
Gallium changes:
* New `draw_vbo` interface: `void draw_vbo(struct pipe_context *ctx, struct pipe_draw_info *info, struct pipe_draw_indirect_info *indirect, struct pipe_draw_start_count *draws, unsigned num_draws);`
* `count_from_stream_output` moved to `pipe_draw_indirect_info`
* Added `bool pipe_draw_info::index_bounds_valid`
* Added `bool pipe_draw_info::increment_draw_id` to choose between glMultiDraw behavior and internal multi draw behavior
* Added `PIPE_CAP_MULTI_DRAW` for direct multi draws
* Small improvements to `u_threaded_context`
radeonsi receives full direct multi draw support.
Note that gallium multi draws are not generated by OpenGL yet. That will be enabled by the next MR after this.
Gallium multi draws don't support the following (this may be addressed in a future MR, but it's not certain):
* different base vertex per draw
* different primitive type per draw
* arbitrary draw ID per draw (not just constant or incrementing)
* specification of line stipple reset state per draw (same as `_mesa_prim::begin`)Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6426tegra: Support framebuffer modifier unaware applications2021-05-05T19:39:25ZThierry Redingtegra: Support framebuffer modifier unaware applicationsApplications that are not aware of framebuffer modifiers cannot be
expected to deal with buffers that are not pitch-linear. Make sure
that these applications work correctly by allocating a separate,
pitch-linear copy of the framebuffer t...Applications that are not aware of framebuffer modifiers cannot be
expected to deal with buffers that are not pitch-linear. Make sure
that these applications work correctly by allocating a separate,
pitch-linear copy of the framebuffer to which we can do de-tiling
blits on ->flush_resource() to meet the applications assumptions.
Note that this only works if the applications end up properly
synchronizing their render jobs via eglSwapBuffers() (or something
equivalent that ends up calling ->flush_resource() on the scanout
buffer. Unfortunately this doesn't work with X because by default
X will render to a front-buffer and never ends up flushing any of
the underlying resources.
Ironically, X works fine if we don't enforce a de-tiling blit, but
only by accident. The reason is that even when X doesn't allocate
a GBM buffer object using framebuffer modifiers, it will query the
framebuffer modifier of that buffer and pass the modifier to the
DRM_IOCTL_MODE_ADDFB2 IOCTL, which will result in the right KMS
framebuffer setup on Tegra.
Signed-off-by: Thierry Reding <treding@nvidia.com>https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6300tegra: don't create resources with modifiers in resource_create2021-05-05T19:39:16ZKarol Herbstkherbst@redhat.comtegra: don't create resources with modifiers in resource_createFixes Tegra driver with xorg-1.20.z (and maybe older).
I suspect the original bug to went away with https://gitlab.freedesktop.org/mesa/mesa/commit/c56fe4118a2dd991ff1b2a532c0f234eddd435e9 as well.Fixes Tegra driver with xorg-1.20.z (and maybe older).
I suspect the original bug to went away with https://gitlab.freedesktop.org/mesa/mesa/commit/c56fe4118a2dd991ff1b2a532c0f234eddd435e9 as well.https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5035Add Android makefiles for tegra target2022-11-21T21:56:26ZRashed Abdel-TawabAdd Android makefiles for tegra targetTegra devices use the tegra-drm driver to pipe output from the nouveau
GPU backend to to displays. To do this, both the tegra and nouveau mesa
drivers need to be enabled:
BoardConfig.mk:
BOARD_GPU_DRIVERS := tegra nouveau
device.mk:
PR...Tegra devices use the tegra-drm driver to pipe output from the nouveau
GPU backend to to displays. To do this, both the tegra and nouveau mesa
drivers need to be enabled:
BoardConfig.mk:
BOARD_GPU_DRIVERS := tegra nouveau
device.mk:
PRODUCT_PROPERTY_OVERRIDES += \
ro.hardware.hwcomposer=drm \
hwc.drm.device=/dev/dri/card1 \
gralloc.gbm.device=/dev/dri/renderD129 \
drm.gpu.vendor_name=tegra
This has already been merged in the downstream Android mesa fork: https://android-review.googlesource.com/c/platform/external/mesa3d/+/1310336https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4310add scissor box to gallium clear() hook2020-05-13T00:10:58ZMike Blumenkrantzadd scissor box to gallium clear() hookThis adds the ability for drivers to handle scissored clear callsThis adds the ability for drivers to handle scissored clear callsMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072gallium: make handles of set_global_binding 64 bit2020-03-11T07:38:26ZKarol Herbstkherbst@redhat.comgallium: make handles of set_global_binding 64 bitneeded by CLneeded by CLnir based OpenCLMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3723gallium: Add format modifier aux plane query2020-11-11T11:49:27ZJames Jonesgallium: Add format modifier aux plane queryRather than hard-code a list of all the format
modifiers supported by any gallium driver in
the dri state tracker, add a screen proc that
queries the number of auxiliary planes required
for a given modifier+format pair.
Since the only f...Rather than hard-code a list of all the format
modifiers supported by any gallium driver in
the dri state tracker, add a screen proc that
queries the number of auxiliary planes required
for a given modifier+format pair.
Since the only format modifier that requires
auxiliary planes currently is the iris driver's
I915_FORMAT_MOD_Y_TILED_CCS, provide a generic
implementation of this screen proc as a utility
function, and use that in every driver besides
the iris driver, which requires a trivial
customization on top of it.
Signed-off-by: James Jones <jajones@nvidia.com>Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3456WIP: grate driver for tegra2 and tegra3 devices2021-05-06T19:43:18ZDavid HeidelbergWIP: grate driver for tegra2 and tegra3 devicesPrerequisite: https://github.com/grate-driver/libdrm (libdrm with grate support)
It's not yet ready for merge, needs more work.
If possible leave here as a placeholder. Actually many Tegra devices are able to run on mainline kernel wit...Prerequisite: https://github.com/grate-driver/libdrm (libdrm with grate support)
It's not yet ready for merge, needs more work.
If possible leave here as a placeholder. Actually many Tegra devices are able to run on mainline kernel with decent hardware support and one of biggest blockers for having seamless experience is missing 3D support (required by Wayland environment, like Phosh).