Merge pull request #979 from billhollings/master
Fix issue where expected buffer-sizes buffer not bound to Metal compute encoder.
This commit is contained in:
commit
8f6edef8ba
@ -41,6 +41,7 @@ Released 2020/07/28
|
||||
- Fix new and unexpected App Store failure on newly deprecated color space values.
|
||||
- Fix intermittent concurrent shader specialization race condition.
|
||||
- Fix offsets when flushing buffer data to GPU.
|
||||
- Fix issue where expected buffer-sizes buffer not bound to Metal compute encoder.
|
||||
- Ensure fragment shader inputs to have as many components as vertex shader outputs.
|
||||
- Include vertex attribute size when testing whether attribute offset exceeds stride.
|
||||
- Add support for `USCALED/SSCALED` vertex formats.
|
||||
|
@ -781,26 +781,10 @@ void MVKComputeResourcesCommandEncoderState::markDirty() {
|
||||
|
||||
void MVKComputeResourcesCommandEncoderState::encodeImpl(uint32_t) {
|
||||
|
||||
bool fullImageViewSwizzle = false;
|
||||
MVKPipeline* pipeline = _cmdEncoder->_computePipelineState.getPipeline();
|
||||
if (pipeline)
|
||||
fullImageViewSwizzle = pipeline->fullImageViewSwizzle();
|
||||
|
||||
encodeBinding<MVKMTLBufferBinding>(_resourceBindings.bufferBindings, _resourceBindings.areBufferBindingsDirty,
|
||||
[](MVKCommandEncoder* cmdEncoder, MVKMTLBufferBinding& b)->void {
|
||||
if (b.isInline)
|
||||
cmdEncoder->setComputeBytes(cmdEncoder->getMTLComputeEncoder(kMVKCommandUseDispatch),
|
||||
b.mtlBytes,
|
||||
b.size,
|
||||
b.index);
|
||||
else
|
||||
[cmdEncoder->getMTLComputeEncoder(kMVKCommandUseDispatch) setBuffer: b.mtlBuffer
|
||||
offset: b.offset
|
||||
atIndex: b.index];
|
||||
});
|
||||
bool fullImageViewSwizzle = pipeline ? pipeline->fullImageViewSwizzle() : false;
|
||||
|
||||
if (_resourceBindings.swizzleBufferBinding.isDirty) {
|
||||
|
||||
for (auto& b : _resourceBindings.textureBindings) {
|
||||
if (b.isDirty) { updateImplicitBuffer(_resourceBindings.swizzleConstants, b.index, b.swizzle); }
|
||||
}
|
||||
@ -826,6 +810,20 @@ void MVKComputeResourcesCommandEncoderState::encodeImpl(uint32_t) {
|
||||
|
||||
}
|
||||
|
||||
encodeBinding<MVKMTLBufferBinding>(_resourceBindings.bufferBindings, _resourceBindings.areBufferBindingsDirty,
|
||||
[](MVKCommandEncoder* cmdEncoder, MVKMTLBufferBinding& b)->void {
|
||||
if (b.isInline) {
|
||||
cmdEncoder->setComputeBytes(cmdEncoder->getMTLComputeEncoder(kMVKCommandUseDispatch),
|
||||
b.mtlBytes,
|
||||
b.size,
|
||||
b.index);
|
||||
} else {
|
||||
[cmdEncoder->getMTLComputeEncoder(kMVKCommandUseDispatch) setBuffer: b.mtlBuffer
|
||||
offset: b.offset
|
||||
atIndex: b.index];
|
||||
}
|
||||
});
|
||||
|
||||
encodeBinding<MVKMTLTextureBinding>(_resourceBindings.textureBindings, _resourceBindings.areTextureBindingsDirty,
|
||||
[](MVKCommandEncoder* cmdEncoder, MVKMTLTextureBinding& b)->void {
|
||||
[cmdEncoder->getMTLComputeEncoder(kMVKCommandUseDispatch) setTexture: b.mtlTexture
|
||||
|
Loading…
x
Reference in New Issue
Block a user