chromium/third_party/skia/src/gpu/ganesh/GrSPIRVUniformHandler.cpp

/*
 * Copyright 2019 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#include "src/gpu/ganesh/GrSPIRVUniformHandler.h"

#include "include/core/SkString.h"
#include "include/gpu/ganesh/GrBackendSurface.h"
#include "include/private/base/SkAssert.h"
#include "src/core/SkSLTypeShared.h"
#include "src/gpu/ganesh/GrShaderVar.h"
#include "src/gpu/ganesh/GrUtil.h"
#include "src/gpu/ganesh/glsl/GrGLSLProgramBuilder.h"

#include <string.h>
#include <algorithm>
#include <cstddef>
#include <utility>

class GrProcessor;
struct GrShaderCaps;

static constexpr int kUniformBinding =;
static constexpr size_t kUniformsPerBlock =;

GrSPIRVUniformHandler::GrSPIRVUniformHandler(GrGLSLProgramBuilder* program)
    :{}

const GrShaderVar& GrSPIRVUniformHandler::getUniformVariable(UniformHandle u) const {}

const char* GrSPIRVUniformHandler::getUniformCStr(UniformHandle u) const {}

// FIXME: this code was ripped from GrVkUniformHandler; should be refactored.
namespace {

uint32_t sksltype_to_alignment_mask(SkSLType type) {}

static inline uint32_t sksltype_to_size(SkSLType type) {}

uint32_t get_ubo_offset(uint32_t* currentOffset, SkSLType type, int arrayCount) {}

}  // namespace

GrGLSLUniformHandler::UniformHandle GrSPIRVUniformHandler::internalAddUniformArray(
        const GrProcessor* owner,
        uint32_t visibility,
        SkSLType type,
        const char* name,
        bool mangleName,
        int arrayCount,
        const char** outName) {}

GrGLSLUniformHandler::SamplerHandle GrSPIRVUniformHandler::addSampler(
        const GrBackendFormat& backendFormat,
        GrSamplerState,
        const skgpu::Swizzle& swizzle,
        const char* name,
        const GrShaderCaps* caps) {}

const char* GrSPIRVUniformHandler::samplerVariable(
        GrGLSLUniformHandler::SamplerHandle handle) const {}

skgpu::Swizzle GrSPIRVUniformHandler::samplerSwizzle(
        GrGLSLUniformHandler::SamplerHandle handle) const {}

void GrSPIRVUniformHandler::appendUniformDecls(GrShaderFlags visibility, SkString* out) const {}

uint32_t GrSPIRVUniformHandler::getRTFlipOffset() const {}