Remove checking translated vertex bindings on inline buffers.

This commit is contained in:
Bill Hollings 2020-05-31 21:38:05 -04:00
parent 8671295570
commit 1ef26259a7
2 changed files with 3 additions and 11 deletions

View File

@ -43,6 +43,7 @@ Released 2020/06/01
- Reinstate `VulkanSamples API-Samples` demo apps and add
`input_attachment` and `push_descriptors` demos.
- Add `MVK_CONFIG_AUTO_GPU_CAPTURE_OUTPUT_FILE` environment variable
to support capturing GPU traces to a file.
- Consolidate frame and non-frame performance reporting.
- Remove `vkGetSwapchainPerformanceMVK()` from API.
- Swapchain performance can be retrieved with other activity performance
@ -50,7 +51,6 @@ Released 2020/06/01
- Add `MVK_CONFIG_PERFORMANCE_LOGGING_INLINE` env var to enable/disable
logging of performance of each activity when it happens.
- Reduce thread locking on performance statistics collection.
to support capturing GPU traces to a file.
- Numerous documentation typo corrections.
- Support Xcode 11.5.
- Update to latest SPIRV-Cross version:

View File

@ -605,26 +605,18 @@ void MVKGraphicsResourcesCommandEncoderState::encodeImpl(uint32_t stage) {
if (stage == (forTessellation ? kMVKGraphicsStageVertex : kMVKGraphicsStageRasterization)) {
encodeBindings(kMVKShaderStageVertex, "vertex", fullImageViewSwizzle,
[pipeline](MVKCommandEncoder* cmdEncoder, MVKMTLBufferBinding& b)->void {
auto xltdVtxBindings = pipeline->getTranslatedVertexBindings();
if (b.isInline) {
cmdEncoder->setVertexBytes(cmdEncoder->_mtlRenderEncoder,
b.mtlBytes,
b.size,
b.index);
// Add any translated vertex bindings for this binding
for (auto& xltdBind : xltdVtxBindings) {
if (b.index == pipeline->getMetalBufferIndexForVertexAttributeBinding(xltdBind.binding)) {
cmdEncoder->setVertexBytes(cmdEncoder->_mtlRenderEncoder,
&(((uint8_t*)b.mtlBytes)[xltdBind.translationOffset]),
b.size,
pipeline->getMetalBufferIndexForVertexAttributeBinding(xltdBind.translationBinding));
}
}
} else {
[cmdEncoder->_mtlRenderEncoder setVertexBuffer: b.mtlBuffer
offset: b.offset
atIndex: b.index];
// Add any translated vertex bindings for this binding
auto xltdVtxBindings = pipeline->getTranslatedVertexBindings();
for (auto& xltdBind : xltdVtxBindings) {
if (b.index == pipeline->getMetalBufferIndexForVertexAttributeBinding(xltdBind.binding)) {
[cmdEncoder->_mtlRenderEncoder setVertexBuffer: b.mtlBuffer