mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 19:34:39 +01:00
Fix pipeline lifetime issue, misc.
This commit is contained in:
1 parent
caff2ea573
commit
14b5a1a7cd
7 files changed
+18
-13
No files matched your search
@@ -1196,12 +1196,15 @@ void VulkanContext::DestroyDevice() {
|
||||
device_ = nullptr;
|
||||
}
|
||||
|
||||
bool VulkanContext::CreateShaderModule(const std::vector<uint32_t> &spirv, VkShaderModule *shaderModule) {
|
||||
bool VulkanContext::CreateShaderModule(const std::vector<uint32_t> &spirv, VkShaderModule *shaderModule, const char *tag) {
|
||||
VkShaderModuleCreateInfo sm{ VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO };
|
||||
sm.pCode = spirv.data();
|
||||
sm.codeSize = spirv.size() * sizeof(uint32_t);
|
||||
sm.flags = 0;
|
||||
VkResult result = vkCreateShaderModule(device_, &sm, nullptr, shaderModule);
|
||||
if (tag) {
|
||||
SetDebugName(*shaderModule, VK_OBJECT_TYPE_SHADER_MODULE, tag);
|
||||
}
|
||||
if (result != VK_SUCCESS) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user