From 90a707ecb5d7985c261faf1903e849548c046b02 Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 7 Sep 2020 22:00:23 -0700 Subject: A bunch of random updates --- Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp | 7 ++++++- Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp index 748baa89..d1ef575e 100644 --- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp @@ -88,7 +88,7 @@ void DeviceContextGLImpl::SetPipelineState(IPipelineState* pPipelineState) if (Desc.IsComputePipeline()) { } - else + else if (Desc.PipelineType == PIPELINE_TYPE_GRAPHICS) { const auto& GraphicsPipeline = Desc.GraphicsPipeline; // Set rasterizer state @@ -144,6 +144,11 @@ void DeviceContextGLImpl::SetPipelineState(IPipelineState* pPipelineState) } m_ContextState.InvalidateVAO(); } + else + { + LOG_ERROR_MESSAGE(GetPipelineTypeString(Desc.PipelineType), " pipeline '", Desc.Name, "' is not supported in OpenGL"); + return; + } // Note that the program may change if a shader is created after the call // (GLProgramResources needs to bind a program to load uniforms), but before diff --git a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp index 01266f1d..a352cd8d 100644 --- a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp @@ -55,7 +55,7 @@ ShaderGLImpl::ShaderGLImpl(IReferenceCounters* pRefCounters, { DEV_CHECK_ERR(CreationAttribs.ByteCode == nullptr, "'ByteCode' must be null when shader is created from the source code or a file"); DEV_CHECK_ERR(CreationAttribs.ByteCodeSize == 0, "'ByteCodeSize' must be 0 when shader is created from the source code or a file"); - DEV_CHECK_ERR(CreationAttribs.ShaderCompiler == SHADER_COMPILER_DEFAULT, "only default compiler supported on OpenGL"); + DEV_CHECK_ERR(CreationAttribs.ShaderCompiler == SHADER_COMPILER_DEFAULT, "only default compiler is supported in OpenGL"); const auto& deviceCaps = pDeviceGL->GetDeviceCaps(); -- cgit v1.2.3