42e8365751
Added KRSampler and KRSamplerManager classes. Marked stub functions to be implemented.
kearwood2022-08-18 17:57:11 -07:00
cef2372ce8
Modernization - KRMesh::Submesh::vbo_data_blocks is now a vector<shared_ptr>.
kearwood2022-08-17 01:56:01 -07:00
2391ed9785
Modernization - KRMesh::m_submeshes now contains KRMesh::Submesh objects rather than pointers. Insertion done with emplace.
kearwood2022-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.
kearwood2022-08-15 19:48:59 -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
kearwood2022-08-08 00:09:02 -07:00
9b31914371
Added VS editorconfig for C++ formatting style
kearwood2022-08-07 23:56:20 -07:00
732560f732
Separate push constants can now be sent to vertex and fragment stages.
kearwood2022-08-06 00:14:21 -07:00
29d928ca29
Eliminated static_cast from KRPipeline::hasUniform KRPipeline::setUniform now updates push constants for all stages
kearwood2022-08-05 23:44:46 -07:00
347a258c99
Fixed bug that caused indexed strip meshes to be changed to indexed triangle meshes when optimized.
kearwood2022-08-03 22:08:32 -07:00
5f32d4dede
KRENGINE_ATTRIB_..._SHORT types are now mapped to equivalent Vulkan ..._SNORM types.
kearwood2022-08-02 02:15:46 -07:00
b714f7b52a
Reduced verbosity of KRPipeline::Uniform
kearwood2022-08-02 01:31:13 -07:00
06f4056887
Added KRPipeline::Uniform enum class to replace existing untyped enum.
kearwood2022-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.
kearwood2022-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
kearwood2022-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.
kearwood2022-07-29 01:12:23 -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.
kearwood2022-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.
kearwood2022-07-29 00:10:13 -07:00
c02ad5c3e7
KRMeshManager::bindVBO now swaps handles immediately for anything not loaded on the streamer thread.
kearwood2022-07-28 23:40:09 -07:00
33f5292c5e
Added commandBuffer argument to KRDevice::graphicsUpload.
kearwood2022-07-27 23:22:51 -07:00
d19f340d32
Temporary vertex data is now uploaded synchronously in the presentation thread with the graphics command buffer.
kearwood2022-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.
kearwood2022-07-24 23:57:01 -07:00
cfd8e35f29
Added KRDevice::setDebugLabel and helper function overloads. Now labeling more Vulkan objects.
kearwood2022-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.
kearwood2022-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.
kearwood2022-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.
kearwood2022-07-20 22:37:22 -07:00
0cc6c0d40b
Added GPU debug labels for textures. Fixed bug causing Vulkan images to be constantly re-created.
kearwood2022-07-20 22:09:52 -07:00
7e8b5cb830
Removed glFlush call from KRTextureManager, which is not needed after Kraken refactor.
kearwood2022-07-20 21:35:48 -07:00
8f63d9607a
Added KRDevice::StagingBufferInfo to collect staging buffer related members and functions
kearwood2022-07-19 01:11:28 -07:00
ff4eb2589c
Split KRDevice::initialize into multiple helper functions
kearwood2022-07-19 00:57:18 -07:00
378b5319bf
Vulkan device now validated to have anisotropy capable samplers.
kearwood2022-07-19 00:21:46 -07:00
4a13f3c832
Added VkImage parameter to KRTexture::uploadTexture and all overrides. Converted KRTextureTGA from OpenGL to Vulkan
kearwood2022-07-19 00:13:42 -07:00
2a75ee68a0
Added helper functions, KRTexture::destroyHandles and KRTexture::destroyNewHandles
kearwood2022-07-19 00:12:40 -07:00
6392a6d04d
Added KRDevice parameters to KRTexture2D::uploadTexture. Stubbed out KRTextureTGA::compress. To be re-implemented after Vulkan refactoring.
kearwood2022-07-18 23:08:45 -07:00
c7ed12db80
Corrected call sites of KRTexture2D::uploadTexture that were still sending a GLenum as the first argument.
kearwood2022-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.
kearwood2022-07-18 22:54:45 -07:00
41679f0497
Bump year in shader license headers
kearwood2022-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.
kearwood2022-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
kearwood2022-07-16 00:45:17 -07:00
22b871ad2f
Removed unnecessary check for maximum Vulkan allocator count in KRTexture2D::createGPUTexture
kearwood2022-07-16 00:22:53 -07:00
559df3766e
KRTexture::createGLTexture renamed to createGPUTexture. Updated all child classes.
kearwood2022-07-16 00:17:25 -07:00
41a1f3bd89
Refactored KRTexture2D::createGLTexture from OpenGL to Vulkan
kearwood2022-07-16 00:12:32 -07:00
e61f8aa7d1
Added VkMemoryPropertyFlags argument to KRDevice::createImage
kearwood2022-07-16 00:03:15 -07:00
3d6dd727c2
Added pure virtual function, KRTexture2D::GetDimensions(). Implemented GetDimensions in all KRTexture2D sub classes.
kearwood2022-07-15 23:57:49 -07:00
dfde4f876d
KRDevice::createBuffer is now fallible. Staging buffer flags corrected.
kearwood2022-07-12 00:01:27 -07:00
738cfd29ef
KRDevice now creates transfer queues for each GPU. Implemented algorithm to keep graphics, compute, and transfer queue families independent when possible.
kearwood2022-07-11 23:45:08 -07:00
7f3ceebd5f
Allocated staging buffers for asset upload. For each GPU, two buffers. One for asynchronous asset streaming with the transfer queue and another for immediate asset streaming with the graphics queue.
kearwood2022-07-11 22:55:08 -07:00
4bc44a8e52
Removed KRContext::getStreamingEnabled and KRContext::setStreamingEnabled, as streaming is always enabled in the runtime now. m_streamingEnabled remains as a signal that the managers have completed loading and that streaming should start.
kearwood2022-07-11 22:27:44 -07:00
fed12dbc96
Moved debug label functionality to KRDevice::createBuffer
kearwood2022-07-10 00:15:18 -07:00
6e1e07cc07
Created helper function for Vulkan Buffer creation, KRDevice::createBuffer. Updated KRMeshManager to use KRDevice::createBuffer for vertex and index data.
kearwood2022-07-09 23:52:35 -07:00
64341c4e90
Deleted commented dead code from KRCamera::renderPost
kearwood2022-07-09 23:42:43 -07:00
73597a21c2
Removed no longer necessary glFinish call
kearwood2022-07-09 23:20:25 -07:00
d5635a4996
Converted debug_font shader to Vulkan glsl
kearwood2022-07-08 22:20:03 -07:00
6b8404c3d7
Removed rim_color and rim_power arguments from KRPipeline::bind. Updated the call site in KRMaterial to set rim_color and rim_power explicitly.
kearwood2022-07-08 00:01:40 -07:00
b0be60cf18
Removed fade_color argument from KRPipeline::bind. Updated call sites to only set this attribute in the one case needed (post_fx shader)
kearwood2022-07-07 23:49:27 -07:00
ee77caba9b
Updated hydra. Latest hydra version removes dead GL helper functions.
kearwood2022-07-07 23:20:50 -07:00
5dd2068e1b
Replaced GL draw calls with Vulkan in KRMesh
kearwood2022-07-07 23:18:22 -07:00
44055d1e6a
Replace ifdef guards with pragma once
kearwood2022-07-07 23:09:30 -07:00
216cbe3eec
PipelineInfo::CullMode and PipelineInfo::RasterMode are no longer within the PipelineInfo class, enabling easier forward declaration. KRMaterial::bind now accepts remaining parameters required to set up the pipeline. Removed GL calls from KRModel. Replaced ifdef guards with pragma once. KRMesh::model_format_t changed to ModelFormat and is no longer within KRMesh, enabling easier forward declaration.
kearwood2022-07-07 22:51:16 -07:00
4f3b8ad584
KRMesh::renderSubmesh non-indexed format meshes now converted to Vulkan draw calls
kearwood2022-07-07 21:44:08 -07:00
7d36a0036c
Updated call sites to ensure that KRPipeline::setUniform calls are made before KRPipeline::bind calls. Eliminated kraken::SetUniform helper functions, which are no longer used.
kearwood2022-07-07 21:37:10 -07:00
560f7da9e7
Implemented automatic binding of push constants at runtime using SPIRV-Reflection. Replaced GL uniforms with Vulkan push constants.
kearwood2022-07-07 19:29:50 -07:00
88a1ca186b
Added KRMesh::isReady Vulkan test code now uses KRMesh and asset ingestion pipeline for vertex and index data. Updated Vulkan test shader to match KRMesh attribute layout.
kearwood2022-07-07 00:23:14 -07:00
e976e94da1
Added index buffer support to KRMeshManager::KRVBOData::bind
kearwood2022-07-06 23:51:43 -07:00
d2c8763fd9
Added KRMeshManager::GetMaxLODModel helper function. Refactored KRMeshManager::GetModel call sites to use GetMaxLODModel where only the maximum LOD is used.
kearwood2022-07-06 23:42:47 -07:00
85b7b2cd31
(continued...) KRMesh::renderSubmesh is now private. Added KRMesh::renderNoMaterials. Replaced renderSubmesh loops outside KRMesh with calls to KRMesh::renderNoMaterials. Added KRMesh::getVertexAttributes. Call sites are now using KRMesh::getVertexAttributes and KRMesh::getModelFormat to configure the pipeline.
kearwood2022-07-06 23:11:00 -07:00
93d665b356
KRMesh::renderSubmesh is now private. Added KRMesh::renderNoMaterials. Replaced renderSubmesh loops outside KRMesh with calls to KRMesh::renderNoMaterials. Added KRMesh::getVertexAttributes. Call sites are now using KRMesh::getVertexAttributes and KRMesh::getModelFormat to configure the pipeline.
kearwood2022-07-06 23:04:43 -07:00
b7e4415b16
Inlined, removed wrapper function KRPipelineManager::selectPipeline
kearwood2022-07-06 21:59:50 -07:00
d76ce2090d
Eliminated one overload of KRPipelineManager::selectPipeline Vulkan draw call refactoring
kearwood2022-07-05 22:08:05 -07:00
54e484bd71
Replacing glDraw commands with vkCmdDraw and populating PipelineInfo with vertex formats.
kearwood2022-07-05 21:40:26 -07:00
bbc0de400c
Added PipelineInfo::vertexAttributes and PipelineInfo::modelFormat KRPipelineManager::getPipeline now has just one version with two arguments. Commented out GL version of getPipeline, to be later merged into the Vulkan version.
kearwood2022-07-05 21:27:41 -07:00
ad64ab506a
Eliminated dead functions.
kearwood2022-07-04 22:21:28 -07:00
68c3831fde
Added composite buffer render passes for deferred lighting path. Refactoring KRCamera::renderFrame to use render passes. Eliminate composite buffer binding GL code from KRCamera::renderFrame
kearwood2022-07-04 22:08:05 -07:00
17113b59ea
Removing no longer needed OpenGL code.
kearwood2022-07-04 21:20:43 -07:00