vo_gpu: vulkan: correctly enable textureGatherOffset

This also requires a vulkan feature / SPIR-V capability to function
This commit is contained in:
Niklas Haas 2018-02-04 23:32:31 +01:00 committed by Kevin Mitchell
parent f151ac57cb
commit 5997248505
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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