Commit a01a9395 by Philipp Adolf

Run edge shader first

parent cd851b80
...@@ -739,13 +739,12 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) { ...@@ -739,13 +739,12 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
runCopyShader(input.vertex_buffer.size(), input.vb_handle, output_handle); runCopyShader(input.vertex_buffer.size(), input.vb_handle, output_handle);
int copyTime = timer.elapsed(); int copyTime = timer.elapsed();
timer.restart(); timer.restart();
runVertexShader(input.vertex_buffer.size(), input.vb_handle, vertex_indices_handle, vertex_offsets_handle, output_handle);
int vertexTime = timer.elapsed();
timer.restart();
int edge_offset = input.vertex_buffer.size(); int edge_offset = input.vertex_buffer.size();
runEdgeShader(tables.edge_indices.size() / 4, input.vb_handle, edge_indices_handle, output_handle, edge_offset); runEdgeShader(tables.edge_indices.size() / 4, input.vb_handle, edge_indices_handle, output_handle, edge_offset);
int edgeTime = timer.elapsed(); int edgeTime = timer.elapsed();
timer.restart(); timer.restart();
runVertexShader(input.vertex_buffer.size(), input.vb_handle, vertex_indices_handle, vertex_offsets_handle, output_handle);
int vertexTime = timer.elapsed();
// Map the output buffer so we can read the results // Map the output buffer so we can read the results
f->glBindBuffer(GL_SHADER_STORAGE_BUFFER, output_handle); f->glBindBuffer(GL_SHADER_STORAGE_BUFFER, output_handle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment