Skip to content

Rendertarget samples broken with G4onG5 #864

Description

@SunDaw

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:

  1. Clone https://github.com/Kode/Kinc-Samples
  2. Build either of 06_render_targets, 07_multiple_render_targets or 08_float_render_targets
  3. Run executable, crashes on first update call

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: 3525720

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions