Commit Graph

  • 9f93941b1f Removed GLAD git module kearwood 2022-09-21 18:20:11 -07:00
  • 4be16e3ddc Removed GLAD from CMake project Replaced GL integer and size typedefs with native types. kearwood 2022-09-21 18:18:13 -07:00
  • d3912a9ffe Vulkan refactoring - Replaced GLint with int. kearwood 2022-09-21 17:59:23 -07:00
  • ecb1c8a50f Removed OpenGL defines from KREngine-common.h Replaced GLDEBUG macro with an assert so code will stop when it hits OpenGL code yet to be refactored to Vulkan. kearwood 2022-09-21 17:53:06 -07:00
  • 2a36e6a11e Re-enable camera sky box draw call kearwood 2022-09-21 01:13:16 -07:00
  • 4c8b8d5d35 Eliminated KRTexture::getHandle kearwood 2022-09-21 01:02:56 -07:00
  • 5219cf0ba7 Enabled draw call for debug text overlay Vertically flipped debug text character sampling from font texture. Debug text overlay pass now functioning in Vulkan kearwood 2022-09-21 00:59:31 -07:00
  • 6b93fcbf87 Eliminated unused variable kearwood 2022-09-21 00:29:05 -07:00
  • 73166ff8aa Refactoring, eliminated DescriptorSetInfo.query, merging into DescriptorSetInfo.bindings Implemented KRPipeline::setImageBinding Added stub function KRPipeline::updateDescriptorBinding kearwood 2022-09-21 00:27:15 -07:00
  • 96ea71852f Implemented logic in KRPipeline to update descriptor sets. Implemented KRTexture::getFullImageView Implemented KRTexture::getImage Create stub function, KRUniformBuffer::getBuffer kearwood 2022-09-21 00:11:48 -07:00
  • 3ba80b1dd8 Implemented KRPipeline::bindDescriptorSets kearwood 2022-09-20 19:02:54 -07:00
  • 3df8433205 Added KRPipeline::updateDescriptorSets WIP creating and updating descriptor sets for KRPipeline binding. kearwood 2022-09-20 18:54:01 -07:00
  • 5ab035b076 Implemented KRDevice::createDescriptorSets kearwood 2022-09-20 18:23:45 -07:00
  • ee091aa1fe KRDevice now allocates a global descriptor pool per each device. kearwood 2022-09-20 18:12:18 -07:00
  • a3ee2845d1 Vulkan refactoring - Removed OpenGL state mirroring code kearwood 2022-09-19 00:14:42 -07:00
  • 3376f3e4be Vulkan Refactoring - Eliminated KRTextureManager::_setActiveTexture and KRTextureManager::m_iActiveTexture kearwood 2022-09-19 00:07:41 -07:00
  • d50b7f7831 Vulkan Refactoring - Eliminated KRTextureManager::m_boundTextures and KRTextureManager::m_boundTextureHandles kearwood 2022-09-19 00:04:03 -07:00
  • be6c3a148e Vulkan Refactoring - Updated KRTextureManager::selectTexture call sites to use KRShader::setImageBinding kearwood 2022-09-18 23:59:08 -07:00
  • 9a84a3a07b Removed unused texture sampler binding for dust_particle shader kearwood 2022-09-18 23:28:28 -07:00
  • f4bd0d6340 Removing OpenGL code related to textures kearwood 2022-09-18 23:19:30 -07:00
  • 8306202cf1 WIP Creating structures in KRPipeline to cache descriptor set binding reflection data. Added stub function, KRPipeline::setImageBinding kearwood 2022-09-15 20:33:41 -07:00
  • 183f7057e2 Added KRPipeline::StageInfo to hold cached SPV reflection information used for dynamic descriptor set and push constant binding. kearwood 2022-09-15 20:10:25 -07:00
  • 327167c9b1 Expanded KRSurface::m_imageAvailableSemaphores and m_renderFinishedSemaphores to have one semaphore per frame in flight. (Missed files in prior commit) kearwood 2022-09-15 19:20:10 -07:00
  • cc4efe34e1 kMaxGraphicsCommandBuffers is now initialized to KRENGINE_MAX_FRAMES_IN_FLIGHT rather than using a magic number. kearwood 2022-09-15 19:18:54 -07:00
  • 4d0158c0ec Added KRSurface::m_inFlightFences. Now properly handling multiple frames in flight and waiting on fences when the CPU catches up. kearwood 2022-09-15 00:26:23 -07:00
  • 478669ed81 Expanded KRSurface::m_imageAvailableSemaphores and m_renderFinishedSemaphores to have one semaphore per frame in flight. kearwood 2022-09-14 23:59:52 -07:00
  • 5b70ce077d Add KRENGINE_MAX_FRAMES_IN_FLIGHT constant kearwood 2022-09-14 23:41:03 -07:00
  • 9b46917171 Added requirement for Vulkan SPV_EXT_descriptor_indexing extension. kearwood 2022-09-13 18:18:37 -07:00
  • 5ffc3d9b9b Refactor - DescriptorSet and DescriptorManager are now UniformBuffer and UniformBufferManager. kearwood 2022-09-13 18:18:25 -07:00
  • 175c4e2008 Add KRDescriptorManager and KRDescriptorSet classes with stub functions. kearwood 2022-09-13 17:31:41 -07:00
  • 5ed6b8eccd Push constants are now supported for all stages. kearwood 2022-09-09 00:38:46 -07:00
  • aeaed68efb Moved ShaderStage to KRShader and expanded to include all stages. Added mapping functions, getShaderStageFromExtension and getShaderStageFlagBitsFromShaderStage. KRShader::m_stage is now typed as ShaderStage. kearwood 2022-09-09 00:36:22 -07:00
  • f20f7f73d6 Centralized shader file sub-extension to shader stage mapping to KRShader. kearwood 2022-09-08 23:58:24 -07:00
  • e695bca3f9 Refactoring to rename uniform related functions and members to reflect that they are actually push constants after the Vulkan refactoring. kearwood 2022-09-07 23:48:46 -07:00
  • 10f9c17cf1 Now initializing VkDescriptorSetLayout for each pipeline using SPV reflection. kearwood 2022-09-07 22:33:07 -07:00
  • 0d848bd53b Now using more VkSamplerCreateInfo for hash generation. kearwood 2022-09-07 22:32:37 -07:00
  • 414ec8ca81 Removed no longer relevant comment. kearwood 2022-08-30 00:38:10 -07:00
  • 8594c7d4b1 Implemented KRSampler::destroy kearwood 2022-08-30 00:30:22 -07:00
  • 6682cbdedd Implemented KRSampler::createSamplers kearwood 2022-08-30 00:18:47 -07:00
  • 0e5fee2d80 Implemented KRSampler::getSampler kearwood 2022-08-29 23:59:02 -07:00
  • e318a5b4aa Added KRSamplerManager::DEFAULT_CLAMPED_SAMPLER and DEFAULT_WRAPPING_SAMPLER Added KRSamplerManager::init kearwood 2022-08-25 00:00:55 -07:00
  • 191167f9d3 Added KRSamplerManager::destroy() kearwood 2022-08-19 20:10:03 -07:00
  • 9f245a9765 Implemented KRSamplerManager kearwood 2022-08-19 20:02:11 -07:00
  • 5c75dc754a Fix build issue, removed unneeded stub function. kearwood 2022-08-18 19:05:24 -07:00
  • 42e8365751 Added KRSampler and KRSamplerManager classes. Marked stub functions to be implemented. kearwood 2022-08-18 17:57:11 -07:00
  • cef2372ce8 Modernization - KRMesh::Submesh::vbo_data_blocks is now a vector<shared_ptr>. kearwood 2022-08-17 01:56:01 -07:00
  • 2391ed9785 Modernization - KRMesh::m_submeshes now contains KRMesh::Submesh objects rather than pointers. Insertion done with emplace. kearwood 2022-08-16 20:08:30 -07:00
  • 2085908017 Added KRShaderManager::Includer Now able to include shaders from other shaders with GL_GOOGLE_include_directive. Added vulkan_test_include.glsl and included it from vulkan_test.vert. kearwood 2022-08-15 19:48:59 -07:00
  • 7433d54c16 Auto format C++ source kearwood 2022-08-08 01:07:26 -07:00
  • c5a640e22d Updated editorconfig with C++ code style kearwood 2022-08-08 00:21:57 -07:00
  • d3abb3ef0d Updated hydra library kearwood 2022-08-08 00:21:31 -07:00
  • f5855aeaec Corrected normals for KRMeshSphere so the sphere will have a smooth surface. Disabled KRMesh::optimizeIndexes as it is crashing with certain meshes, such as those generated by KRMeshSphere kearwood 2022-08-08 00:09:02 -07:00
  • 9b31914371 Added VS editorconfig for C++ formatting style kearwood 2022-08-07 23:56:20 -07:00
  • 732560f732 Separate push constants can now be sent to vertex and fragment stages. kearwood 2022-08-06 00:14:21 -07:00
  • 29d928ca29 Eliminated static_cast from KRPipeline::hasUniform KRPipeline::setUniform now updates push constants for all stages kearwood 2022-08-05 23:44:46 -07:00
  • 347a258c99 Fixed bug that caused indexed strip meshes to be changed to indexed triangle meshes when optimized. kearwood 2022-08-03 22:08:32 -07:00
  • 5f32d4dede KRENGINE_ATTRIB_..._SHORT types are now mapped to equivalent Vulkan ..._SNORM types. kearwood 2022-08-02 02:15:46 -07:00
  • b714f7b52a Reduced verbosity of KRPipeline::Uniform kearwood 2022-08-02 01:31:13 -07:00
  • 06f4056887 Added KRPipeline::Uniform enum class to replace existing untyped enum. kearwood 2022-08-02 01:04:00 -07:00
  • 2dab7a2b48 Moved many KRPipeline public members to private. Added KRPipeline::hasUniform to avoid accessing private members directly in KRMaterial. Added KRPipeline::setUniform overload, for setting an array of Matrix4's. kearwood 2022-08-02 00:43:36 -07:00
  • 74ed52fefd Refactoring push KRPipeline::m_pushConstantOffset and KRPipeline::m_pushConstantSize in preparation to support push constants for multiple shader stages kearwood 2022-08-01 23:44:46 -07:00
  • f52ddc007f Changed Vulkan test code in KRCamera::renderPost, preparing for testing the debug font shader. Fixed bug causing KRMeshManager::KRVBOData::bind to crash when there is no index data. kearwood 2022-07-29 01:12:23 -07:00
  • fb6e197f2b Eliminated KRCamera::m_debug_text_indices kearwood 2022-07-29 01:01:17 -07:00
  • 40024ed9d8 Added KRMeshManager::KRENGINE_VBO_DATA_RANDOM_PARTICLES and KRMeshManager::KRENGINE_VBO_DATA_VOLUMETRIC_LIGHTING. The random particle and volumetric lighting plane geometry is now static, computed on initialization, and no longer lazily initialized. Removed KRMeshManager::bindVBO function overload that accepted KRDataBlock's directly for index and vertex data. This was creating KRVBOData objects with KRVBOData::IMMEDIATE that were no longer being owned or de-allocated by KRMeshManager. kearwood 2022-07-29 00:51:01 -07:00
  • 5f7912524f vbo_type::TEMPORARY changed to vbo_type::IMMEDIATE. KRMeshManager no longer allocates, owns, and deletes IMMEDIATE/TEMPORARY data. kearwood 2022-07-29 00:10:13 -07:00
  • c02ad5c3e7 KRMeshManager::bindVBO now swaps handles immediately for anything not loaded on the streamer thread. kearwood 2022-07-28 23:40:09 -07:00
  • 33f5292c5e Added commandBuffer argument to KRDevice::graphicsUpload. kearwood 2022-07-27 23:22:51 -07:00
  • d19f340d32 Temporary vertex data is now uploaded synchronously in the presentation thread with the graphics command buffer. kearwood 2022-07-25 00:43:11 -07:00
  • 6551e6d8a6 Added KRTexture::TextureHandle::destroy to eliminate duplicate code in KRTexture::destroyHandles and KRTexture::destroyNewHandles. Now creating an image view for each KRTexture for full access. kearwood 2022-07-24 23:57:01 -07:00
  • 9eb9cfe7c5 Added KRDevice::graphicsUpload kearwood 2022-07-22 18:31:11 -07:00
  • cfd8e35f29 Added KRDevice::setDebugLabel and helper function overloads. Now labeling more Vulkan objects. kearwood 2022-07-21 00:19:51 -07:00
  • d1553fc1bf No longer creating empty command buffers for asynchronous asset streaming when there is no activity. Added VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT to command pools to correct validation errors. kearwood 2022-07-20 23:17:06 -07:00
  • b1384e0106 Fixed bug causing vertex buffers not to be bound on first draw call if the last draw call of the prior frame used the same buffer. kearwood 2022-07-20 22:54:27 -07:00
  • 46f8af662e Staging buffers are no longer host coherent; explicitly flushing the buffers instead. Fixed getQueueFamiliesForSharing, so it now correctly returns more than one queue family. kearwood 2022-07-20 22:37:22 -07:00
  • 0cc6c0d40b Added GPU debug labels for textures. Fixed bug causing Vulkan images to be constantly re-created. kearwood 2022-07-20 22:09:52 -07:00
  • 7e8b5cb830 Removed glFlush call from KRTextureManager, which is not needed after Kraken refactor. kearwood 2022-07-20 21:35:48 -07:00
  • e1342ab836 Added KRDevice::checkFlushStreamBuffer. kearwood 2022-07-20 21:35:20 -07:00
  • 8f63d9607a Added KRDevice::StagingBufferInfo to collect staging buffer related members and functions kearwood 2022-07-19 01:11:28 -07:00
  • ff4eb2589c Split KRDevice::initialize into multiple helper functions kearwood 2022-07-19 00:57:18 -07:00
  • 378b5319bf Vulkan device now validated to have anisotropy capable samplers. kearwood 2022-07-19 00:21:46 -07:00
  • 4a13f3c832 Added VkImage parameter to KRTexture::uploadTexture and all overrides. Converted KRTextureTGA from OpenGL to Vulkan kearwood 2022-07-19 00:13:42 -07:00
  • 2a75ee68a0 Added helper functions, KRTexture::destroyHandles and KRTexture::destroyNewHandles kearwood 2022-07-19 00:12:40 -07:00
  • ab86194a59 Implemented KRDevice::streamUpload overload for asynchronous image streaming kearwood 2022-07-19 00:11:30 -07:00
  • 6392a6d04d Added KRDevice parameters to KRTexture2D::uploadTexture. Stubbed out KRTextureTGA::compress. To be re-implemented after Vulkan refactoring. kearwood 2022-07-18 23:08:45 -07:00
  • c7ed12db80 Corrected call sites of KRTexture2D::uploadTexture that were still sending a GLenum as the first argument. kearwood 2022-07-18 22:57:01 -07:00
  • 97b2889568 Vulkan refactoring - Removed OpenGL implementation for GL_EXT_texture_storage path. Eliminated dead OpenGL code in KRContext.h Removed GLenum argument from KRTexture2D::uploadTexture and all implementations. kearwood 2022-07-18 22:54:45 -07:00
  • c8af34bc0b Vulkan refactoring - Eliminated KRTexture::m_iHandle kearwood 2022-07-18 22:30:36 -07:00
  • 41679f0497 Bump year in shader license headers kearwood 2022-07-16 01:12:16 -07:00
  • 90dd95ae76 Refactored KRTextureCube::createGPUTexture to use Vulkan. Removed KRTexture::m_iNewHandle, as all references have been removed with Vulkan refactoring. kearwood 2022-07-16 00:56:16 -07:00
  • 83ea50384f Moved queue family iteration code shared by KRDevice::createImage and KRDevice::createBuffer into a utility function. Added imageCreateFlags argument to KRDevice::createImage kearwood 2022-07-16 00:45:17 -07:00
  • 22b871ad2f Removed unnecessary check for maximum Vulkan allocator count in KRTexture2D::createGPUTexture kearwood 2022-07-16 00:22:53 -07:00
  • 559df3766e KRTexture::createGLTexture renamed to createGPUTexture. Updated all child classes. kearwood 2022-07-16 00:17:25 -07:00
  • 41a1f3bd89 Refactored KRTexture2D::createGLTexture from OpenGL to Vulkan kearwood 2022-07-16 00:12:32 -07:00
  • e61f8aa7d1 Added VkMemoryPropertyFlags argument to KRDevice::createImage kearwood 2022-07-16 00:03:15 -07:00
  • 3d6dd727c2 Added pure virtual function, KRTexture2D::GetDimensions(). Implemented GetDimensions in all KRTexture2D sub classes. kearwood 2022-07-15 23:57:49 -07:00
  • 003bee0d25 Added KRDevice::createImage kearwood 2022-07-15 23:53:42 -07:00
  • b857654cf6 Refactored KRTexture::resize for Vulkan. kearwood 2022-07-14 00:00:55 -07:00
  • 1d11be0e61 Refactored KRTexture::_swapHandles for Vulkan. Added KRTexture::m_haveNewHandles. kearwood 2022-07-13 23:44:43 -07:00
  • 85847fd2e0 Beginning refactoring of KRTexture for Vulkan. Added KRTexture::TextureHandle. kearwood 2022-07-13 23:24:46 -07:00
  • 0382c15fe3 Re-enabling KRCamera::renderPost kearwood 2022-07-13 22:54:10 -07:00