Skip to content

Commit

Permalink
Fix clang compile
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Jul 10, 2024
1 parent a43ba90 commit 9c27a3e
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions sources/krom.h
Original file line number Diff line number Diff line change
Expand Up @@ -1144,16 +1144,10 @@ kinc_g4_shader_t *krom_g4_create_vertex_shader_from_source(string_t *source) {
file[output_len] = 0;
output_len += 1;

file[output_len] = (char *)(&variableDesc.StartOffset)[0];
file[output_len + 1] = (char *)(&variableDesc.StartOffset)[1];
file[output_len + 2] = (char *)(&variableDesc.StartOffset)[2];
file[output_len + 3] = (char *)(&variableDesc.StartOffset)[3];
*(uint32_t *)(file + output_len) = variableDesc.StartOffset;
output_len += 4;

file[output_len] = (char *)(&variableDesc.Size)[0];
file[output_len + 1] = (char *)(&variableDesc.Size)[1];
file[output_len + 2] = (char *)(&variableDesc.Size)[2];
file[output_len + 3] = (char *)(&variableDesc.Size)[3];
*(uint32_t *)(file + output_len) = variableDesc.Size;
output_len += 4;

D3D11_SHADER_TYPE_DESC typeDesc;
Expand Down Expand Up @@ -1272,16 +1266,10 @@ kinc_g4_shader_t *krom_g4_create_fragment_shader_from_source(string_t *source) {
file[output_len] = 0;
output_len += 1;

file[output_len] = (char *)(&variableDesc.StartOffset)[0];
file[output_len + 1] = (char *)(&variableDesc.StartOffset)[1];
file[output_len + 2] = (char *)(&variableDesc.StartOffset)[2];
file[output_len + 3] = (char *)(&variableDesc.StartOffset)[3];
*(uint32_t *)(file + output_len) = variableDesc.StartOffset;
output_len += 4;

file[output_len] = (char *)(&variableDesc.Size)[0];
file[output_len + 1] = (char *)(&variableDesc.Size)[1];
file[output_len + 2] = (char *)(&variableDesc.Size)[2];
file[output_len + 3] = (char *)(&variableDesc.Size)[3];
*(uint32_t *)(file + output_len) = variableDesc.Size;
output_len += 4;

D3D11_SHADER_TYPE_DESC typeDesc;
Expand Down

0 comments on commit 9c27a3e

Please sign in to comment.