From a93c8f764724651c9fdfe059e20c7c714b355e9d Mon Sep 17 00:00:00 2001 From: Egor Date: Sat, 16 Feb 2019 12:12:20 -0800 Subject: Fixed GLES3.0 context on Android --- Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp index b0058a8f..fef2d052 100644 --- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp @@ -37,7 +37,9 @@ namespace Diligent { -ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl* pRenderDeviceVk, const ShaderCreationAttribs& CreationAttribs) : +ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, + RenderDeviceVkImpl* pRenderDeviceVk, + const ShaderCreationAttribs& CreationAttribs) : TShaderBase (pRefCounters, pRenderDeviceVk, CreationAttribs.Desc), m_StaticResLayout (*this, pRenderDeviceVk->GetLogicalDevice()), m_StaticResCache (ShaderResourceCacheVk::DbgCacheContentType::StaticShaderResources), @@ -57,7 +59,7 @@ ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl* } else { - auto GLSLSource = BuildGLSLSourceString(CreationAttribs, TargetGLSLCompiler::glslang, "#define TARGET_API_VULKAN 1\n"); + auto GLSLSource = BuildGLSLSourceString(CreationAttribs, pRenderDeviceVk->GetDeviceCaps(), TargetGLSLCompiler::glslang, "#define TARGET_API_VULKAN 1\n"); m_SPIRV = GLSLtoSPIRV(m_Desc.ShaderType, GLSLSource.c_str(), static_cast(GLSLSource.length()), CreationAttribs.ppCompilerOutput); } -- cgit v1.2.3