mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
freedreno/a6xx: Use handle for explicit layout
Use the winsys_handle to get the fdl_explicit_layout params rather than relying on pre-populated layout params. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36075>
This commit is contained in:
parent
eb7e6a567e
commit
27b0f64b3e
1 changed files with 4 additions and 4 deletions
|
|
@ -278,13 +278,13 @@ fd6_layout_resource(struct fd_resource *rsc, enum fd_layout_type type)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
fill_ubwc_buffer_sizes(struct fd_resource *rsc)
|
fill_ubwc_buffer_sizes(struct fd_resource *rsc, struct winsys_handle *handle)
|
||||||
{
|
{
|
||||||
struct pipe_resource *prsc = &rsc->b.b;
|
struct pipe_resource *prsc = &rsc->b.b;
|
||||||
struct fd_screen *screen = fd_screen(prsc->screen);
|
struct fd_screen *screen = fd_screen(prsc->screen);
|
||||||
struct fdl_explicit_layout l = {
|
struct fdl_explicit_layout l = {
|
||||||
.offset = rsc->layout.slices[0].offset,
|
.offset = handle->offset,
|
||||||
.pitch = rsc->layout.pitch0,
|
.pitch = handle->stride,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!can_do_ubwc(prsc))
|
if (!can_do_ubwc(prsc))
|
||||||
|
|
@ -306,7 +306,7 @@ fd6_layout_resource_for_handle(struct fd_resource *rsc, struct winsys_handle *ha
|
||||||
{
|
{
|
||||||
switch (handle->modifier) {
|
switch (handle->modifier) {
|
||||||
case DRM_FORMAT_MOD_QCOM_COMPRESSED:
|
case DRM_FORMAT_MOD_QCOM_COMPRESSED:
|
||||||
return fill_ubwc_buffer_sizes(rsc);
|
return fill_ubwc_buffer_sizes(rsc, handle);
|
||||||
case DRM_FORMAT_MOD_LINEAR:
|
case DRM_FORMAT_MOD_LINEAR:
|
||||||
if (can_do_ubwc(&rsc->b.b)) {
|
if (can_do_ubwc(&rsc->b.b)) {
|
||||||
perf_debug("%" PRSC_FMT
|
perf_debug("%" PRSC_FMT
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue