mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 13:06:24 +02:00
Merge pull request #11572 from hrydgard/preset-shader-asserts
Assert even in release mode if preset shaders fail to compile.
This commit is contained in:
8 files changed
+8
-7
No files matched your search
+1
-1
@@ -54,7 +54,7 @@ public:
|
||||
SetGPUBackend(GPUBackend::OPENGL);
|
||||
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
bool success = draw_->CreatePresets();
|
||||
assert(success);
|
||||
_assert_msg_(G3D, success, "Failed to compile preset shaders");
|
||||
}
|
||||
|
||||
~QtGLGraphicsContext() {
|
||||
|
||||
@@ -176,7 +176,7 @@ bool D3D11Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) {
|
||||
draw_ = Draw::T3DCreateD3D11Context(device_, context_, device1_, context1_, featureLevel_, hWnd_, adapterNames);
|
||||
SetGPUBackend(GPUBackend::DIRECT3D11, chosenAdapterName);
|
||||
bool success = draw_->CreatePresets(); // If we can run D3D11, there's a compiler installed. I think.
|
||||
assert(success);
|
||||
_assert_msg_(G3D, success, "Failed to compile preset shaders");
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
||||
@@ -405,7 +405,7 @@ bool WindowsGLContext::InitFromRenderThread(std::string *error_message) {
|
||||
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
SetGPUBackend(GPUBackend::OPENGL);
|
||||
bool success = draw_->CreatePresets(); // if we get this far, there will always be a GLSL compiler capable of compiling these.
|
||||
assert(success);
|
||||
_assert_msg_(G3D, success, "Failed to compile preset shaders");
|
||||
renderManager_->SetSwapFunction([&]() {::SwapBuffers(hDC); });
|
||||
if (wglSwapIntervalEXT) {
|
||||
// glew loads wglSwapIntervalEXT if available
|
||||
|
||||
@@ -142,7 +142,7 @@ bool WindowsVulkanContext::Init(HINSTANCE hInst, HWND hWnd, std::string *error_m
|
||||
draw_ = Draw::T3DCreateVulkanContext(g_Vulkan, splitSubmit);
|
||||
SetGPUBackend(GPUBackend::VULKAN, g_Vulkan->GetPhysicalDeviceProperties(deviceNum).deviceName);
|
||||
bool success = draw_->CreatePresets();
|
||||
assert(success); // Doesn't fail, we include the compiler.
|
||||
_assert_msg_(G3D, success, "Failed to compile preset shaders");
|
||||
draw_->HandleEvent(Draw::Event::GOT_BACKBUFFER, g_Vulkan->GetBackbufferWidth(), g_Vulkan->GetBackbufferHeight());
|
||||
|
||||
VulkanRenderManager *renderManager = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
|
||||
@@ -52,7 +52,7 @@ bool AndroidEGLGraphicsContext::InitFromRenderThread(ANativeWindow *wnd, int des
|
||||
SetGPUBackend(GPUBackend::OPENGL);
|
||||
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
bool success = draw_->CreatePresets(); // There will always be a GLSL compiler capable of compiling these.
|
||||
assert(success);
|
||||
_assert_msg_(G3D, success, "Failed to compile preset shaders");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ bool AndroidJavaEGLGraphicsContext::InitFromRenderThread(ANativeWindow *wnd, int
|
||||
draw_ = Draw::T3DCreateGLContext();
|
||||
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
bool success = draw_->CreatePresets();
|
||||
_assert_msg_(G3D, success, "Failed to compile preset shaders");
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ bool AndroidVulkanContext::InitFromRenderThread(ANativeWindow *wnd, int desiredB
|
||||
draw_ = Draw::T3DCreateVulkanContext(g_Vulkan, g_Config.bGfxDebugSplitSubmit);
|
||||
SetGPUBackend(GPUBackend::VULKAN);
|
||||
success = draw_->CreatePresets(); // Doesn't fail, we ship the compiler.
|
||||
assert(success);
|
||||
_assert_msg_(G3D, success, "Failed to compile preset shaders");
|
||||
draw_->HandleEvent(Draw::Event::GOT_BACKBUFFER, g_Vulkan->GetBackbufferWidth(), g_Vulkan->GetBackbufferHeight());
|
||||
|
||||
VulkanRenderManager *renderManager = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
SetGPUBackend(GPUBackend::OPENGL);
|
||||
bool success = draw_->CreatePresets();
|
||||
assert(success);
|
||||
_assert_msg_(G3D, success, "Failed to compile preset shaders");
|
||||
}
|
||||
~IOSGraphicsContext() {
|
||||
delete draw_;
|
||||
|
||||
Reference in new issue
Block a user