Ignore sampler update in descriptor set bindings that use immutable samplers.
Inline MVKDescriptorSetLayoutBinding::getImmutableSampler() for consistency with usesImmutableSamplers().
This commit is contained in:
parent
ed1f1f4866
commit
3008ec71e8
@ -28,6 +28,7 @@ Released TBD
|
|||||||
- Check `MTLDevice` to enable support for `VK_KHR_fragment_shader_barycentric`
|
- Check `MTLDevice` to enable support for `VK_KHR_fragment_shader_barycentric`
|
||||||
and `VK_NV_fragment_shader_barycentric` extensions.
|
and `VK_NV_fragment_shader_barycentric` extensions.
|
||||||
- Fix query pool wait block when query is not encoded to be written to.
|
- Fix query pool wait block when query is not encoded to be written to.
|
||||||
|
- Ignore sampler update in descriptor set bindings that use immutable samplers.
|
||||||
- Update `VK_MVK_MOLTENVK_SPEC_VERSION` to version `35`.
|
- Update `VK_MVK_MOLTENVK_SPEC_VERSION` to version `35`.
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,7 +114,9 @@ public:
|
|||||||
bool usesImmutableSamplers() { return !_immutableSamplers.empty(); }
|
bool usesImmutableSamplers() { return !_immutableSamplers.empty(); }
|
||||||
|
|
||||||
/** Returns the immutable sampler at the index, or nullptr if immutable samplers are not used. */
|
/** Returns the immutable sampler at the index, or nullptr if immutable samplers are not used. */
|
||||||
MVKSampler* getImmutableSampler(uint32_t index);
|
MVKSampler* getImmutableSampler(uint32_t index) {
|
||||||
|
return (index < _immutableSamplers.size()) ? _immutableSamplers[index] : nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
/** Encodes the descriptors in the descriptor set that are specified by this layout, */
|
/** Encodes the descriptors in the descriptor set that are specified by this layout, */
|
||||||
void bind(MVKCommandEncoder* cmdEncoder,
|
void bind(MVKCommandEncoder* cmdEncoder,
|
||||||
|
@ -193,10 +193,6 @@ uint32_t MVKDescriptorSetLayoutBinding::getDescriptorCount(MVKDescriptorSet* des
|
|||||||
return _info.descriptorCount;
|
return _info.descriptorCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
MVKSampler* MVKDescriptorSetLayoutBinding::getImmutableSampler(uint32_t index) {
|
|
||||||
return (index < _immutableSamplers.size()) ? _immutableSamplers[index] : nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// A null cmdEncoder can be passed to perform a validation pass
|
// A null cmdEncoder can be passed to perform a validation pass
|
||||||
void MVKDescriptorSetLayoutBinding::bind(MVKCommandEncoder* cmdEncoder,
|
void MVKDescriptorSetLayoutBinding::bind(MVKCommandEncoder* cmdEncoder,
|
||||||
MVKDescriptorSet* descSet,
|
MVKDescriptorSet* descSet,
|
||||||
@ -1107,6 +1103,9 @@ void MVKSamplerDescriptorMixin::write(MVKDescriptorSetLayoutBinding* mvkDSLBind,
|
|||||||
uint32_t srcIndex,
|
uint32_t srcIndex,
|
||||||
size_t stride,
|
size_t stride,
|
||||||
const void* pData) {
|
const void* pData) {
|
||||||
|
|
||||||
|
if (mvkDSLBind->usesImmutableSamplers()) { return; }
|
||||||
|
|
||||||
auto* oldSamp = _mvkSampler;
|
auto* oldSamp = _mvkSampler;
|
||||||
|
|
||||||
const auto* pImgInfo = &get<VkDescriptorImageInfo>(pData, stride, srcIndex);
|
const auto* pImgInfo = &get<VkDescriptorImageInfo>(pData, stride, srcIndex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user