Rendertarget samples broken with G4onG5
Describe the bug Several render target samples from https://github.com/Kode/Kinc-Samples crash with G4onG5 backends (tested with both D3D12 and Vulkan).
To Reproduce Steps to reproduce the behavior:
- Clone https://github.com/Kode/Kinc-Samples
- Build either of
06_render_targets,07_multiple_render_targetsor08_float_render_targets - Run executable, crashes on first
updatecall
Expected behavior Samples should work the same way they do with Direct3D11/OpenGL backends
Execution Environment:
- Host system (where you compile your code): Windows 10 Home 22H2
- Target system (where you run your code): Windows 10 Home 22H2
- IDE and/or compiler used: MSVC 17.9.0
- Kinc revision: 352572064428ceb333b3c820140b95a9b9545def
Additional context
Callstack shows crash in "G4.c.h" startDraw on memcpy(current_state.vertex_constant_data, vertexConstantBuffer.data, constantBufferSize); because vertexConstantBuffer.data is a nullpointer
Example.exe!memcpy() Line 304 Unknown Example.exe!startDraw(bool compute) Line 167 C Example.exe!kinc_g4_draw_indexed_vertices() Line 264 C Example.exe!update(void * data) Line 42 C Example.exe!kinc_internal_update_callback() Line 483 C Example.exe!kinc_internal_frame() Line 577 C Example.exe!kinc_start() Line 591 C Example.exe!kickstart(int argc, char * * argv) Line 118 C Example.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 1324 C
Note: sample 09_depth_render_targets works fine, I haven't investigated what it does differently
Dave gets this for 06 with Vulkan:
Vulkan ERROR: Code 7060244 : Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x55555b060ac8, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: ID 22[%22] has not been defined %23 = OpVariable %22 Function
False alarm on that one, Dave uses Kong.