mirror of https://github.com/mpv-player/mpv
vo_gpu: vulkan: correctly enable textureGatherOffset
This also requires a vulkan feature / SPIR-V capability to function
This commit is contained in:
parent
f151ac57cb
commit
5997248505
|
@ -222,8 +222,8 @@ struct ra *ra_create_vk(struct mpvk_ctx *vk, struct mp_log *log)
|
|||
// UBO support is required
|
||||
ra->caps |= RA_CAP_BUF_RO | RA_CAP_FRAGCOORD;
|
||||
|
||||
// textureGather is only supported in GLSL 400+
|
||||
if (ra->glsl_version >= 400)
|
||||
// textureGather requires the ImageGatherExtended capability
|
||||
if (vk->features.shaderImageGatherExtended)
|
||||
ra->caps |= RA_CAP_GATHER;
|
||||
|
||||
// Try creating a shader storage buffer
|
||||
|
|
|
@ -502,6 +502,7 @@ bool mpvk_device_init(struct mpvk_ctx *vk, struct mpvk_device_opts opts)
|
|||
// Enable all features we optionally use
|
||||
#define FEATURE(name) .name = vk->features.name
|
||||
VkPhysicalDeviceFeatures feats = {
|
||||
FEATURE(shaderImageGatherExtended),
|
||||
FEATURE(shaderStorageImageExtendedFormats),
|
||||
};
|
||||
#undef FEATURE
|
||||
|
|
Loading…
Reference in New Issue