Skip to content

Instantly share code, notes, and snippets.

@Subv
Created June 26, 2015 04:14
Show Gist options
  • Select an option

  • Save Subv/dd81aeaffc7abc6ed9a5 to your computer and use it in GitHub Desktop.

Select an option

Save Subv/dd81aeaffc7abc6ed9a5 to your computer and use it in GitHub Desktop.
static auto call = [&program_code](VertexShaderState& state, u32 offset, u32 num_instructions,
u32 return_offset, u8 repeat_count, u8 loop_increment) {
state.program_counter = &program_code[offset] - 1; // -1 to make sure when incrementing the PC we end up at the correct offset
state.call_stack.push({ offset + num_instructions, return_offset, repeat_count, loop_increment, offset });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment