Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  SkSLSPIRVtoHLSL.cpp   Sprache: C

 
/*
 * Copyright 2020 Google LLC
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#include "src/sksl/codegen/SkSLSPIRVtoHLSL.h"

#include <spirv_hlsl.hpp>

/*
 * This translation unit serves as a bridge between Skia/SkSL and SPIRV-Cross.
 * Each library is built with a separate copy of spirv.h (or spirv.hpp), so we
 * avoid conflicts by never including both in the same cpp.
 */


namespace SkSL {

void SPIRVtoHLSL(const std::string& spirv, std::string* hlsl) {
    spirv_cross::CompilerHLSL hlslCompiler((const uint32_t*)spirv.c_str(),
                                           spirv.size() / sizeof(uint32_t));

    spirv_cross::CompilerGLSL::Options optionsGLSL;
    // Force all uninitialized variables to be 0, otherwise they will fail to compile
    // by FXC.
    optionsGLSL.force_zero_initialized_variables = true;

    spirv_cross::CompilerHLSL::Options optionsHLSL;
    optionsHLSL.shader_model = 51;
    // PointCoord and PointSize are not supported in HLSL
    optionsHLSL.point_coord_compat = true;
    optionsHLSL.point_size_compat = true;

    hlslCompiler.set_common_options(optionsGLSL);
    hlslCompiler.set_hlsl_options(optionsHLSL);
    hlsl->assign(hlslCompiler.compile());
}

}  // namespace SkSL

Messung V0.5
C=97 H=94 G=95

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge