| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #include "Managers/BsVulkanGLSLProgramFactory.h"
- #include "BsVulkanGpuProgram.h"
- #define AMD_EXTENSIONS
- #include "glslang/Public/ShaderLang.h"
- namespace bs { namespace ct
- {
- VulkanGLSLProgramFactory::VulkanGLSLProgramFactory()
- {
- glslang::InitializeProcess();
- }
- VulkanGLSLProgramFactory::~VulkanGLSLProgramFactory()
- {
- glslang::FinalizeProcess();
- }
- SPtr<GpuProgram> VulkanGLSLProgramFactory::create(const GPU_PROGRAM_DESC& desc, GpuDeviceFlags deviceMask)
- {
- SPtr<GpuProgram> gpuProg = bs_shared_ptr<VulkanGpuProgram>(new (bs_alloc<VulkanGpuProgram>())
- VulkanGpuProgram(desc, deviceMask));
- gpuProg->_setThisPtr(gpuProg);
- return gpuProg;
- }
- SPtr<GpuProgram> VulkanGLSLProgramFactory::create(GpuProgramType type, GpuDeviceFlags deviceMask)
- {
- GPU_PROGRAM_DESC desc;
- desc.type = type;
- SPtr<GpuProgram> gpuProg = bs_shared_ptr<VulkanGpuProgram>(new (bs_alloc<VulkanGpuProgram>())
- VulkanGpuProgram(desc, deviceMask));
- gpuProg->_setThisPtr(gpuProg);
- return gpuProg;
- }
- }}
|