[vulkan] Fix typos and cast types
This commit is contained in:
parent
4a9d6744ec
commit
10e5425155
|
@ -38,7 +38,7 @@ VulkanContext::VulkanContext(VulkanProvider* provider, Window* target_window)
|
|||
|
||||
VulkanContext::~VulkanContext() {
|
||||
VkResult status;
|
||||
auto provider = static_cast<VulkanProvider*>(provider_);
|
||||
auto provider = dynamic_cast<VulkanProvider*>(provider_);
|
||||
auto device = provider->device();
|
||||
{
|
||||
std::lock_guard<std::mutex> queue_lock(device->primary_queue_mutex());
|
||||
|
@ -49,8 +49,7 @@ VulkanContext::~VulkanContext() {
|
|||
}
|
||||
|
||||
bool VulkanContext::Initialize() {
|
||||
auto provider = static_cast<VulkanProvider*>(provider_);
|
||||
auto device = provider->device();
|
||||
auto provider = dynamic_cast<VulkanProvider*>(provider_);
|
||||
|
||||
if (target_window_) {
|
||||
// Create swap chain used to present to the window.
|
||||
|
|
|
@ -337,7 +337,7 @@ bool VulkanInstance::CreateInstance() {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Load Vulkan entrypoints and extensions.
|
||||
// Load Vulkan entry points and extensions.
|
||||
volkLoadInstance(handle);
|
||||
|
||||
// Enable debug validation, if needed.
|
||||
|
|
|
@ -70,7 +70,7 @@ int window_demo_main(const std::vector<std::wstring>& args) {
|
|||
std::unique_ptr<GraphicsProvider> graphics_provider;
|
||||
loop->PostSynchronous([&window, &graphics_provider]() {
|
||||
// Create graphics provider and an initial context for the window.
|
||||
// The window will finish initialization wtih the context (loading
|
||||
// The window will finish initialization with the context (loading
|
||||
// resources, etc).
|
||||
graphics_provider = CreateDemoGraphicsProvider(window.get());
|
||||
window->set_context(graphics_provider->CreateContext(window.get()));
|
||||
|
|
Loading…
Reference in New Issue