Resolve some more validation layer issues. (#1643)
This commit is contained in:
committed by
GitHub
parent
14d048e9bf
commit
fee04df943
@@ -263,8 +263,8 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
device.destroyPipelineLayout( pipelineLayout );
|
||||
device.destroyDescriptorSetLayout( descriptorSetLayout );
|
||||
device.destroyImageView( inputAttachmentView );
|
||||
device.destroyImage( inputImage ); // destroy the inputImage before freeing the bound inputMemory !
|
||||
device.freeMemory( inputMemory );
|
||||
device.destroyImage( inputImage );
|
||||
swapChainData.clear( device );
|
||||
device.freeCommandBuffers( commandPool, commandBuffer );
|
||||
device.destroyCommandPool( commandPool );
|
||||
|
||||
@@ -95,7 +95,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
std::make_pair( vertexShaderModule, nullptr ),
|
||||
std::make_pair( fragmentShaderModule, nullptr ),
|
||||
sizeof( coloredCubeData[0] ),
|
||||
{ { vk::Format::eR32G32B32A32Sfloat, 0 }, { vk::Format::eR32G32B32A32Sfloat, 16 } },
|
||||
{ { vk::Format::eR32G32B32A32Sfloat, 0 }, { vk::Format::eR32G32B32A32Sfloat, 16 } },
|
||||
vk::FrontFace::eClockwise,
|
||||
true,
|
||||
pipelineLayout,
|
||||
@@ -199,8 +199,8 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
|
||||
device.destroyFence( drawFence );
|
||||
device.destroyQueryPool( queryPool );
|
||||
device.destroyBuffer( queryResultBuffer ); // destroy the queryResultBuffer before freeing the bound queryResultMemory !
|
||||
device.freeMemory( queryResultMemory );
|
||||
device.destroyBuffer( queryResultBuffer );
|
||||
device.destroySemaphore( imageAcquiredSemaphore );
|
||||
|
||||
/* VULKAN_KEY_END */
|
||||
|
||||
@@ -942,11 +942,11 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
vk::BufferMemoryBarrier bufferMemoryBarrier(
|
||||
{}, vk::AccessFlagBits::eShaderRead, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, vertexBufferData.buffer, 0, VK_WHOLE_SIZE );
|
||||
commandBuffer.pipelineBarrier(
|
||||
vk::PipelineStageFlagBits::eAllCommands, vk::PipelineStageFlagBits::eAllCommands, {}, nullptr, bufferMemoryBarrier, nullptr );
|
||||
vk::PipelineStageFlagBits::eTopOfPipe, vk::PipelineStageFlagBits::eRayTracingShaderKHR, {}, nullptr, bufferMemoryBarrier, nullptr );
|
||||
|
||||
bufferMemoryBarrier.buffer = indexBufferData.buffer;
|
||||
commandBuffer.pipelineBarrier(
|
||||
vk::PipelineStageFlagBits::eAllCommands, vk::PipelineStageFlagBits::eAllCommands, {}, nullptr, bufferMemoryBarrier, nullptr );
|
||||
vk::PipelineStageFlagBits::eTopOfPipe, vk::PipelineStageFlagBits::eRayTracingShaderKHR, {}, nullptr, bufferMemoryBarrier, nullptr );
|
||||
} );
|
||||
|
||||
std::vector<vk::DescriptorSetLayoutBinding> bindings;
|
||||
|
||||
@@ -188,7 +188,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
commandBuffer.endRenderPass();
|
||||
|
||||
vk::ImageMemoryBarrier prePresentBarrier( vk::AccessFlagBits::eColorAttachmentWrite,
|
||||
vk::AccessFlagBits::eMemoryRead,
|
||||
{},
|
||||
vk::ImageLayout::eColorAttachmentOptimal,
|
||||
vk::ImageLayout::ePresentSrcKHR,
|
||||
VK_QUEUE_FAMILY_IGNORED,
|
||||
|
||||
@@ -356,14 +356,15 @@ namespace vk
|
||||
void * /*pUserData*/ )
|
||||
{
|
||||
#if !defined( NDEBUG )
|
||||
if ( pCallbackData->messageIdNumber == 648835635 )
|
||||
if ( static_cast<uint32_t>(pCallbackData->messageIdNumber) == 0x822806fa )
|
||||
{
|
||||
// UNASSIGNED-khronos-Validation-debug-build-warning-message
|
||||
// Validation Warning: vkCreateInstance(): to enable extension VK_EXT_debug_utils, but this extension is intended to support use by applications when
|
||||
// debugging and it is strongly recommended that it be otherwise avoided.
|
||||
return vk::False;
|
||||
}
|
||||
if ( pCallbackData->messageIdNumber == 767975156 )
|
||||
else if ( static_cast<uint32_t>(pCallbackData->messageIdNumber) == 0xe8d1a9fe )
|
||||
{
|
||||
// UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension
|
||||
// Validation Performance Warning: Using debug builds of the validation layers *will* adversely affect performance.
|
||||
return vk::False;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user