d3d12: Delete make_resource_writeable

This never did anything useful AFAICT since we didn't actually
suballocate buffers, and when this ended up being invoked it breaks
the ability to read back XFB data.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14933>
This commit is contained in:
Jesse Natalie
2022-02-07 20:36:18 -08:00
committed by Marge Bot
parent caae9b0e1f
commit c35f77aa84
3 changed files with 0 additions and 43 deletions

View File

@@ -1387,43 +1387,6 @@ d3d12_transfer_unmap(struct pipe_context *pctx,
slab_free(&d3d12_context(pctx)->transfer_pool, ptrans);
}
void
d3d12_resource_make_writeable(struct pipe_context *pctx,
struct pipe_resource *pres)
{
struct d3d12_context *ctx = d3d12_context(pctx);
struct d3d12_resource *res = d3d12_resource(pres);
struct d3d12_resource *dup_res;
if (!res->bo || !d3d12_bo_is_suballocated(res->bo))
return;
dup_res = d3d12_resource(pipe_buffer_create(pres->screen,
pres->bind & PIPE_BIND_STREAM_OUTPUT,
(pipe_resource_usage) pres->usage,
pres->width0));
if (res->valid_buffer_range.end > res->valid_buffer_range.start) {
struct pipe_box box;
box.x = res->valid_buffer_range.start;
box.y = 0;
box.z = 0;
box.width = res->valid_buffer_range.end - res->valid_buffer_range.start;
box.height = 1;
box.depth = 1;
d3d12_direct_copy(ctx, dup_res, 0, &box, res, 0, &box, PIPE_MASK_RGBAZS);
}
/* Move new BO to old resource */
d3d12_bo_unreference(res->bo);
res->bo = dup_res->bo;
d3d12_bo_reference(res->bo);
d3d12_resource_destroy(dup_res->base.b.screen, &dup_res->base.b);
}
void
d3d12_context_resource_init(struct pipe_context *pctx)
{