void OsdGLSLComputeKernelBundle::ApplyLoopVertexVerticesKernelB( int vertexOffset, int tableOffset, int start, int end) { glUniformSubroutinesuiv(GL_COMPUTE_SHADER, 1, &_subComputeLoopVertexB); dispatchCompute(vertexOffset, tableOffset, start, end); }
void OsdGLSLComputeKernelBundle::ApplyLoopVertexVerticesKernelA( int vertexOffset, int tableOffset, int start, int end, bool pass) { glUniformSubroutinesuiv(GL_COMPUTE_SHADER, 1, &_subComputeVertexA); glUniform1i(_uniformVertexPass, pass ? 1 : 0); dispatchCompute(vertexOffset, tableOffset, start, end); }
void OsdGLSLComputeKernelBundle::ApplyBilinearFaceVerticesKernel( int vertexOffset, int tableOffset, int start, int end) { glUniformSubroutinesuiv(GL_COMPUTE_SHADER, 1, &_subComputeFace); dispatchCompute(vertexOffset, tableOffset, start, end); // glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT); }
void OsdGLSLComputeKernelBundle::ApplyEditAdd( int primvarOffset, int primvarWidth, int vertexOffset, int tableOffset, int start, int end) { glUniformSubroutinesuiv(GL_COMPUTE_SHADER, 1, &_subEditAdd); glUniform1i(_uniformEditPrimVarOffset, primvarOffset); glUniform1i(_uniformEditPrimVarWidth, primvarWidth); dispatchCompute(vertexOffset, tableOffset, start, end); }
void OsdGLSLComputeKernelBundle::ApplyCatmarkFaceVerticesKernel( int vertexOffset, int tableOffset, int start, int end) { glUniformSubroutinesuiv(GL_COMPUTE_SHADER, 1, &_subComputeFace); dispatchCompute(vertexOffset, tableOffset, start, end); // see the comment in dispatchCompute() // this workaround causes a performance problem. // glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT); }
void OsdD3D11ComputeKernelBundle::ApplyBilinearVertexVerticesKernel( int V_ITa_ofs, int offset, int start, int end) { KernelCB args; ZeroMemory(&args, sizeof(args)); args.indexOffset = offset; args.indexStart = start; args.indexEnd = end; args.V_ITa_ofs = V_ITa_ofs; dispatchCompute(_kernelComputeVertex, args); }
void OsdD3D11ComputeKernelBundle::ApplyLoopEdgeVerticesKernel( int E_IT_ofs, int E_W_ofs, int offset, int start, int end) { KernelCB args; ZeroMemory(&args, sizeof(args)); args.indexOffset = offset; args.indexStart = start; args.indexEnd = end; args.E_IT_ofs = E_IT_ofs; args.E_W_ofs = E_W_ofs; dispatchCompute(_kernelComputeEdge, args); }
void OsdD3D11ComputeKernelBundle::ApplyCatmarkFaceVerticesKernel( int F_IT_ofs, int F_ITa_ofs, int offset, int start, int end) { KernelCB args; ZeroMemory(&args, sizeof(args)); args.indexOffset = offset; args.indexStart = start; args.indexEnd = end; args.F_IT_ofs = F_IT_ofs; args.F_ITa_ofs = F_ITa_ofs; dispatchCompute(_kernelComputeFace, args); }
void OsdD3D11ComputeKernelBundle::ApplyLoopVertexVerticesKernelA( int V_ITa_ofs, int V_W_ofs, int offset, bool pass, int start, int end) { KernelCB args; ZeroMemory(&args, sizeof(args)); args.indexOffset = offset; args.indexStart = start; args.indexEnd = end; args.vertexPass = pass ? 1 : 0; args.V_ITa_ofs = V_ITa_ofs; args.V_W_ofs = V_W_ofs; dispatchCompute(_kernelComputeVertexA, args); }
void OsdD3D11ComputeKernelBundle::ApplyLoopVertexVerticesKernelB( int vertexOffset, int tableOffset, int start, int end, int vertexBaseOffset, int varyingBaseOffset) { KernelCB args; ZeroMemory(&args, sizeof(args)); args.vertexOffset = vertexOffset; args.tableOffset = tableOffset; args.indexStart = start; args.indexEnd = end; args.vertexBaseOffset = vertexBaseOffset; args.varyingBaseOffset = varyingBaseOffset; dispatchCompute(_kernelComputeLoopVertexB, args); }
void OsdD3D11ComputeKernelBundle::ApplyCatmarkVertexVerticesKernelA( int vertexOffset, int tableOffset, int start, int end, bool pass, int vertexBaseOffset, int varyingBaseOffset) { KernelCB args; ZeroMemory(&args, sizeof(args)); args.vertexOffset = vertexOffset; args.tableOffset = tableOffset; args.indexStart = start; args.indexEnd = end; args.vertexPass = pass ? 1 : 0; args.vertexBaseOffset = vertexBaseOffset; args.varyingBaseOffset = varyingBaseOffset; dispatchCompute(_kernelComputeVertexA, args); }
void OsdD3D11ComputeKernelBundle::ApplyEditAdd( int numEditVertices, int editIndices_ofs, int editValues_ofs, int primvarOffset, int primvarWidth) { KernelCB args; ZeroMemory(&args, sizeof(args)); args.indexOffset = 0; args.indexStart = 0; args.indexEnd = numEditVertices; args.editIndices_ofs = editIndices_ofs; args.editValues_ofs = editValues_ofs; args.editPrimVarOffset = primvarOffset; args.editPrimVarWidth = primvarWidth; args.editNumVertices = numEditVertices; dispatchCompute(_kernelEditAdd, args); }
void OsdD3D11ComputeKernelBundle::ApplyEditAdd( int primvarOffset, int primvarWidth, int vertexOffset, int tableOffset, int start, int end, int vertexBaseOffset, int varyingBaseOffset) { KernelCB args; ZeroMemory(&args, sizeof(args)); args.vertexOffset = vertexOffset; args.tableOffset = tableOffset; args.indexStart = start; args.indexEnd = end; args.editPrimVarOffset = primvarOffset; args.editPrimVarWidth = primvarWidth; args.vertexBaseOffset = vertexBaseOffset; args.varyingBaseOffset = varyingBaseOffset; dispatchCompute(_kernelEditAdd, args); }
void Program::dispatchCompute(const glm::uvec3 & numGroups) { dispatchCompute(numGroups.x, numGroups.y, numGroups.z); }