mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-01 21:50:36 +02:00
asahi: Drop Asahi-as-a-swrast hack
Now that we've dropped macOS support in the driver, this is all dead code and gets garbage collected. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23138>
This commit is contained in:
parent
c284a200b9
commit
04bd1f2cda
4 changed files with 3 additions and 69 deletions
|
|
@ -13,7 +13,6 @@
|
|||
#include "asahi/lib/agx_formats.h"
|
||||
#include "asahi/lib/decode.h"
|
||||
#include "drm-uapi/drm_fourcc.h"
|
||||
#include "frontend/sw_winsys.h"
|
||||
#include "frontend/winsys_handle.h"
|
||||
#include "gallium/auxiliary/renderonly/renderonly.h"
|
||||
#include "gallium/auxiliary/util/u_debug_cb.h"
|
||||
|
|
@ -522,8 +521,6 @@ agx_resource_create_with_modifiers(struct pipe_screen *screen,
|
|||
|
||||
pipe_reference_init(&nresource->base.reference, 1);
|
||||
|
||||
struct sw_winsys *winsys = ((struct agx_screen *)screen)->winsys;
|
||||
|
||||
ail_make_miptree(&nresource->layout);
|
||||
|
||||
if (templ->target == PIPE_BUFFER) {
|
||||
|
|
@ -531,28 +528,6 @@ agx_resource_create_with_modifiers(struct pipe_screen *screen,
|
|||
util_range_init(&nresource->valid_buffer_range);
|
||||
}
|
||||
|
||||
if (winsys && templ->bind & PIPE_BIND_DISPLAY_TARGET) {
|
||||
unsigned width = templ->width0;
|
||||
unsigned height = templ->height0;
|
||||
|
||||
if (nresource->layout.tiling == AIL_TILING_TWIDDLED) {
|
||||
width = ALIGN_POT(width, 64);
|
||||
height = ALIGN_POT(height, 64);
|
||||
}
|
||||
|
||||
nresource->dt = winsys->displaytarget_create(
|
||||
winsys, templ->bind, templ->format, width, height, 64,
|
||||
NULL /*map_front_private*/, &nresource->dt_stride);
|
||||
|
||||
if (nresource->layout.tiling == AIL_TILING_LINEAR)
|
||||
nresource->layout.linear_stride_B = nresource->dt_stride;
|
||||
|
||||
if (nresource->dt == NULL) {
|
||||
FREE(nresource);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Guess a label based on the bind */
|
||||
unsigned bind = templ->bind;
|
||||
|
||||
|
|
@ -616,12 +591,6 @@ agx_resource_destroy(struct pipe_screen *screen, struct pipe_resource *prsrc)
|
|||
if (prsrc->target == PIPE_BUFFER)
|
||||
util_range_destroy(&rsrc->valid_buffer_range);
|
||||
|
||||
if (rsrc->dt) {
|
||||
/* display target */
|
||||
struct sw_winsys *winsys = agx_screen->winsys;
|
||||
winsys->displaytarget_destroy(winsys, rsrc->dt);
|
||||
}
|
||||
|
||||
if (rsrc->scanout)
|
||||
renderonly_scanout_destroy(rsrc->scanout, agx_screen->dev.ro);
|
||||
|
||||
|
|
@ -1438,32 +1407,6 @@ agx_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
|
|||
return pctx;
|
||||
}
|
||||
|
||||
static void
|
||||
agx_flush_frontbuffer(struct pipe_screen *_screen, struct pipe_context *pctx,
|
||||
struct pipe_resource *prsrc, unsigned level,
|
||||
unsigned layer, void *context_private,
|
||||
struct pipe_box *box)
|
||||
{
|
||||
struct agx_resource *rsrc = (struct agx_resource *)prsrc;
|
||||
struct agx_screen *agx_screen = (struct agx_screen *)_screen;
|
||||
struct sw_winsys *winsys = agx_screen->winsys;
|
||||
|
||||
/* Dump the framebuffer */
|
||||
assert(rsrc->dt);
|
||||
void *map = winsys->displaytarget_map(winsys, rsrc->dt, PIPE_USAGE_DEFAULT);
|
||||
assert(map != NULL);
|
||||
|
||||
if (rsrc->modifier == DRM_FORMAT_MOD_APPLE_TWIDDLED) {
|
||||
ail_detile(rsrc->bo->ptr.cpu, map, &rsrc->layout, 0, rsrc->dt_stride, 0,
|
||||
0, rsrc->base.width0, rsrc->base.height0);
|
||||
} else {
|
||||
assert(rsrc->modifier == DRM_FORMAT_MOD_LINEAR);
|
||||
memcpy(map, rsrc->bo->ptr.cpu, rsrc->dt_stride * rsrc->base.height0);
|
||||
}
|
||||
|
||||
winsys->displaytarget_display(winsys, rsrc->dt, context_private, box);
|
||||
}
|
||||
|
||||
static const char *
|
||||
agx_get_vendor(struct pipe_screen *pscreen)
|
||||
{
|
||||
|
|
@ -2068,7 +2011,7 @@ agx_screen_get_fd(struct pipe_screen *pscreen)
|
|||
}
|
||||
|
||||
struct pipe_screen *
|
||||
agx_screen_create(int fd, struct renderonly *ro, struct sw_winsys *winsys)
|
||||
agx_screen_create(int fd, struct renderonly *ro)
|
||||
{
|
||||
struct agx_screen *agx_screen;
|
||||
struct pipe_screen *screen;
|
||||
|
|
@ -2078,7 +2021,6 @@ agx_screen_create(int fd, struct renderonly *ro, struct sw_winsys *winsys)
|
|||
return NULL;
|
||||
|
||||
screen = &agx_screen->pscreen;
|
||||
agx_screen->winsys = winsys;
|
||||
|
||||
/* Set debug before opening */
|
||||
agx_screen->dev.debug =
|
||||
|
|
@ -2123,7 +2065,6 @@ agx_screen_create(int fd, struct renderonly *ro, struct sw_winsys *winsys)
|
|||
screen->resource_get_handle = agx_resource_get_handle;
|
||||
screen->resource_get_param = agx_resource_get_param;
|
||||
screen->resource_create_with_modifiers = agx_resource_create_with_modifiers;
|
||||
screen->flush_frontbuffer = agx_flush_frontbuffer;
|
||||
screen->get_timestamp = u_default_get_timestamp;
|
||||
screen->fence_reference = agx_fence_reference;
|
||||
screen->fence_finish = agx_fence_finish;
|
||||
|
|
|
|||
|
|
@ -10,11 +10,9 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
struct pipe_screen;
|
||||
struct sw_winsys;
|
||||
struct renderonly;
|
||||
|
||||
struct pipe_screen *agx_screen_create(int fd, struct renderonly *ro,
|
||||
struct sw_winsys *winsys);
|
||||
struct pipe_screen *agx_screen_create(int fd, struct renderonly *ro);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -528,7 +528,6 @@ struct agx_sampler_view {
|
|||
struct agx_screen {
|
||||
struct pipe_screen pscreen;
|
||||
struct agx_device dev;
|
||||
struct sw_winsys *winsys;
|
||||
struct disk_cache *disk_cache;
|
||||
};
|
||||
|
||||
|
|
@ -565,10 +564,6 @@ struct agx_resource {
|
|||
/* Hardware backing */
|
||||
struct agx_bo *bo;
|
||||
|
||||
/* Software backing (XXX) */
|
||||
struct sw_displaytarget *dt;
|
||||
unsigned dt_stride;
|
||||
|
||||
struct renderonly_scanout *scanout;
|
||||
|
||||
BITSET_DECLARE(data_valid, PIPE_MAX_TEXTURE_LEVELS);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ static struct pipe_screen *
|
|||
asahi_screen_create(int fd, const struct pipe_screen_config *config,
|
||||
struct renderonly *ro)
|
||||
{
|
||||
return agx_screen_create(fd, ro, NULL);
|
||||
return agx_screen_create(fd, ro);
|
||||
}
|
||||
|
||||
struct pipe_screen *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue