Ejemplo n.º 1
0
void
OsdCudaComputeController::ApplyCatmarkTriQuadFaceVerticesKernel(
    FarKernelBatch const &batch, OsdCudaComputeContext const *context) const {

    assert(context);

    const OsdCudaTable * F_IT = context->GetTable(FarSubdivisionTables::F_IT);
    assert(F_IT);

    float *vertex = _currentBindState.GetOffsettedVertexBuffer();
    float *varying = _currentBindState.GetOffsettedVaryingBuffer();

    OsdCudaComputeTriQuadFace(
        vertex, varying,
        _currentBindState.vertexDesc.length, _currentBindState.vertexDesc.stride,
        _currentBindState.varyingDesc.length, _currentBindState.varyingDesc.stride,
        static_cast<int*>(F_IT->GetCudaMemory()),
        batch.GetVertexOffset(), batch.GetTableOffset(), batch.GetStart(), batch.GetEnd());
}
Ejemplo n.º 2
0
void
OsdCudaComputeController::ApplyBilinearFaceVerticesKernel(
    FarKernelBatch const &batch, void * clientdata) const {

    OsdCudaComputeContext * context =
        static_cast<OsdCudaComputeContext*>(clientdata);
    assert(context);

    const OsdCudaTable * F_IT = context->GetTable(FarSubdivisionTables<OsdVertex>::F_IT);
    const OsdCudaTable * F_ITa = context->GetTable(FarSubdivisionTables<OsdVertex>::F_ITa);
    assert(F_IT);
    assert(F_ITa);

    OsdCudaComputeFace(
        context->GetCurrentVertexBuffer(),
        context->GetCurrentVaryingBuffer(),
        context->GetVertexDescriptor().numVertexElements-3,
        context->GetVertexDescriptor().numVaryingElements,
        static_cast<int*>(F_IT->GetCudaMemory()),
        static_cast<int*>(F_ITa->GetCudaMemory()),
        batch.GetVertexOffset(), batch.GetTableOffset(), batch.GetStart(), batch.GetEnd());
}
Ejemplo n.º 3
0
void
OsdCudaComputeController::ApplyLoopVertexVerticesKernelA2(
    FarKernelBatch const &batch, void * clientdata) const {

    OsdCudaComputeContext * context =
        static_cast<OsdCudaComputeContext*>(clientdata);
    assert(context);

    const OsdCudaTable * V_ITa = context->GetTable(FarSubdivisionTables<OsdVertex>::V_ITa);
    const OsdCudaTable * V_W = context->GetTable(FarSubdivisionTables<OsdVertex>::V_W);
    assert(V_ITa);
    assert(V_W);

    OsdCudaComputeVertexA(
        context->GetCurrentVertexBuffer(),
        context->GetCurrentVaryingBuffer(),
        context->GetVertexDescriptor().numVertexElements-3,
        context->GetVertexDescriptor().numVaryingElements,
        static_cast<int*>(V_ITa->GetCudaMemory()),
        static_cast<float*>(V_W->GetCudaMemory()),
        batch.GetVertexOffset(), batch.GetTableOffset(), batch.GetStart(), batch.GetEnd(), true);
}
Ejemplo n.º 4
0
void
OsdCudaComputeController::ApplyLoopVertexVerticesKernelA2(
    FarKernelBatch const &batch, OsdCudaComputeContext const *context) const {

    assert(context);

    const OsdCudaTable * V_ITa = context->GetTable(FarSubdivisionTables::V_ITa);
    const OsdCudaTable * V_W = context->GetTable(FarSubdivisionTables::V_W);
    assert(V_ITa);
    assert(V_W);

    float *vertex = _currentBindState.GetOffsettedVertexBuffer();
    float *varying = _currentBindState.GetOffsettedVaryingBuffer();

    OsdCudaComputeVertexA(
        vertex, varying,
        _currentBindState.vertexDesc.length, _currentBindState.vertexDesc.stride,
        _currentBindState.varyingDesc.length, _currentBindState.varyingDesc.stride,
        static_cast<int*>(V_ITa->GetCudaMemory()),
        static_cast<float*>(V_W->GetCudaMemory()),
        batch.GetVertexOffset(), batch.GetTableOffset(), batch.GetStart(), batch.GetEnd(), true);
}