1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-09 16:39:49 +00:00

vo_gpu: libplacebo: drop code deprecated in libplacebo v3

This is only needed for back-compat with libplacebo v2, and will break
due to upstream removal starting with libplacebo v4.
This commit is contained in:
Niklas Haas 2021-10-04 06:13:34 +02:00 committed by Niklas Haas
parent ef2cd3a663
commit 48e8cb6a89
3 changed files with 2 additions and 13 deletions

View File

@ -63,8 +63,6 @@ static bool cuda_ext_vk_init(struct ra_hwdec_mapper *mapper,
.d = 0, .d = 0,
.format = ra_pl_fmt_get(format), .format = ra_pl_fmt_get(format),
.sampleable = true, .sampleable = true,
.sample_mode = format->linear_filter ? PL_TEX_SAMPLE_LINEAR
: PL_TEX_SAMPLE_NEAREST,
.export_handle = p_owner->handle_type, .export_handle = p_owner->handle_type,
}; };

View File

@ -75,8 +75,6 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper, bool probing)
.d = 0, .d = 0,
.format = format->priv, .format = format->priv,
.sampleable = true, .sampleable = true,
.sample_mode = format->linear_filter ? PL_TEX_SAMPLE_LINEAR
: PL_TEX_SAMPLE_NEAREST,
.import_handle = PL_HANDLE_DMA_BUF, .import_handle = PL_HANDLE_DMA_BUF,
.shared_mem = (struct pl_shared_mem) { .shared_mem = (struct pl_shared_mem) {
.handle = { .handle = {

View File

@ -235,7 +235,6 @@ static bool tex_upload_pl(struct ra *ra, const struct ra_tex_upload_params *para
if (stride != params->stride) { if (stride != params->stride) {
// Fall back to uploading via a staging buffer prepared in CPU // Fall back to uploading via a staging buffer prepared in CPU
staging = pl_buf_create(gpu, &(struct pl_buf_params) { staging = pl_buf_create(gpu, &(struct pl_buf_params) {
.type = PL_BUF_TEX_TRANSFER,
.size = lines * stride, .size = lines * stride,
.memory_type = PL_BUF_MEM_HOST, .memory_type = PL_BUF_MEM_HOST,
.host_mapped = true, .host_mapped = true,
@ -293,16 +292,10 @@ static bool tex_download_pl(struct ra *ra, struct ra_tex_download_params *params
static struct ra_buf *buf_create_pl(struct ra *ra, static struct ra_buf *buf_create_pl(struct ra *ra,
const struct ra_buf_params *params) const struct ra_buf_params *params)
{ {
static const enum pl_buf_type buf_type[] = {
[RA_BUF_TYPE_TEX_UPLOAD] = PL_BUF_TEX_TRANSFER,
[RA_BUF_TYPE_SHADER_STORAGE] = PL_BUF_STORAGE,
[RA_BUF_TYPE_UNIFORM] = PL_BUF_UNIFORM,
[RA_BUF_TYPE_SHARED_MEMORY] = 0,
};
const struct pl_buf *plbuf = pl_buf_create(get_gpu(ra), &(struct pl_buf_params) { const struct pl_buf *plbuf = pl_buf_create(get_gpu(ra), &(struct pl_buf_params) {
.type = buf_type[params->type],
.size = params->size, .size = params->size,
.uniform = params->type == RA_BUF_TYPE_UNIFORM,
.storable = params->type == RA_BUF_TYPE_SHADER_STORAGE,
.host_mapped = params->host_mapped, .host_mapped = params->host_mapped,
.host_writable = params->host_mutable, .host_writable = params->host_mutable,
.initial_data = params->initial_data, .initial_data = params->initial_data,