mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 02:29:51 +01:00
Merge branch 'master' into TemporaryHackishBranch
This commit is contained in:
commit
a08997ce65
14 files changed
+44
-11
No files matched your search
@@ -77,7 +77,8 @@ VkBool32 VKAPI_CALL Vulkan_Dbg(VkDebugReportFlagsEXT msgFlags, VkDebugReportObje
|
||||
return false;
|
||||
if (msgCode == 64) // Another useless perf warning that will be seen less and less as we optimize - vkCmdClearAttachments() issued on command buffer object 0x00000195296C6D40 prior to any Draw Cmds. It is recommended you use RenderPass LOAD_OP_CLEAR on Attachments prior to any Draw.
|
||||
return false;
|
||||
|
||||
if (msgCode == 5)
|
||||
return false; // Not exactly a false positive, see https://github.com/KhronosGroup/glslang/issues/1418
|
||||
#ifdef _WIN32
|
||||
std::string msg = message.str();
|
||||
OutputDebugStringA(msg.c_str());
|
||||
|
||||
@@ -242,7 +242,16 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade
|
||||
|
||||
std::vector<unsigned int> spirv;
|
||||
// Can't fail, parsing worked, "linking" worked.
|
||||
glslang::GlslangToSpv(*program.getIntermediate(shaderStage), spirv);
|
||||
glslang::SpvOptions options;
|
||||
options.disableOptimizer = false;
|
||||
options.optimizeSize = false;
|
||||
options.generateDebugInfo = false;
|
||||
glslang::GlslangToSpv(*program.getIntermediate(shaderStage), spirv, &options);
|
||||
|
||||
// For whatever reason, with our config, the above outputs an invalid SPIR-V version, 0.
|
||||
// Patch it up so spirv-cross accepts it.
|
||||
spirv[1] = glslang::EShTargetSpv_1_0;
|
||||
|
||||
|
||||
// Alright, step 1 done. Now let's take this SPIR-V shader and output in our desired format.
|
||||
|
||||
@@ -252,9 +261,11 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade
|
||||
{
|
||||
spirv_cross::CompilerHLSL hlsl(spirv);
|
||||
spirv_cross::CompilerHLSL::Options options{};
|
||||
options.fixup_clipspace = true;
|
||||
options.shader_model = 30;
|
||||
hlsl.set_options(options);
|
||||
spirv_cross::CompilerGLSL::Options options_common{};
|
||||
options_common.vertex.fixup_clipspace = true;
|
||||
hlsl.set_hlsl_options(options);
|
||||
hlsl.set_common_options(options_common);
|
||||
*dest = hlsl.compile();
|
||||
return true;
|
||||
}
|
||||
@@ -270,9 +281,11 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade
|
||||
i++;
|
||||
}
|
||||
spirv_cross::CompilerHLSL::Options options{};
|
||||
options.fixup_clipspace = true;
|
||||
options.shader_model = 50;
|
||||
hlsl.set_options(options);
|
||||
spirv_cross::CompilerGLSL::Options options_common{};
|
||||
options_common.vertex.fixup_clipspace = true;
|
||||
hlsl.set_hlsl_options(options);
|
||||
hlsl.set_common_options(options_common);
|
||||
std::string raw = hlsl.compile();
|
||||
*dest = Postprocess(raw, destLang, stage);
|
||||
return true;
|
||||
|
||||
+1
-1
@@ -464,7 +464,7 @@ int GPUCommon::EstimatePerVertexCost() {
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (gstate.isLightChanEnabled(i))
|
||||
cost += 10;
|
||||
cost += 7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -285,6 +285,7 @@
|
||||
<ClInclude Include="..\..\ext\SPIRV-Cross\spirv_cfg.hpp" />
|
||||
<ClInclude Include="..\..\ext\SPIRV-Cross\spirv_common.hpp" />
|
||||
<ClInclude Include="..\..\ext\SPIRV-Cross\spirv_cross.hpp" />
|
||||
<ClInclude Include="..\..\ext\SPIRV-Cross\spirv_cross_util.hpp" />
|
||||
<ClInclude Include="..\..\ext\SPIRV-Cross\spirv_glsl.hpp" />
|
||||
<ClInclude Include="..\..\ext\SPIRV-Cross\spirv_hlsl.hpp" />
|
||||
<ClInclude Include="..\..\ext\SPIRV-Cross\spirv_msl.hpp" />
|
||||
@@ -294,6 +295,7 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\ext\SPIRV-Cross\spirv_cfg.cpp" />
|
||||
<ClCompile Include="..\..\ext\SPIRV-Cross\spirv_cross.cpp" />
|
||||
<ClCompile Include="..\..\ext\SPIRV-Cross\spirv_cross_util.cpp" />
|
||||
<ClCompile Include="..\..\ext\SPIRV-Cross\spirv_glsl.cpp" />
|
||||
<ClCompile Include="..\..\ext\SPIRV-Cross\spirv_hlsl.cpp" />
|
||||
<ClCompile Include="..\..\ext\SPIRV-Cross\spirv_msl.cpp" />
|
||||
@@ -312,4 +314,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -149,6 +149,7 @@ VULKAN_FILES := \
|
||||
SPIRV_CROSS_FILES := \
|
||||
$(SRC)/ext/SPIRV-Cross/spirv_cfg.cpp \
|
||||
$(SRC)/ext/SPIRV-Cross/spirv_cross.cpp \
|
||||
$(SRC)/ext/SPIRV-Cross/spirv_cross_util.cpp \
|
||||
$(SRC)/ext/SPIRV-Cross/spirv_glsl.cpp
|
||||
|
||||
EXEC_AND_LIB_FILES := \
|
||||
|
||||
+1
-1
Submodule ext/SPIRV-Cross updated: 90966d50f5...be7425ef70.
@@ -26,6 +26,7 @@ add_library(spirv-cross-core STATIC
|
||||
${SRCDIR}/spirv.hpp
|
||||
${SRCDIR}/spirv_cross.hpp
|
||||
${SRCDIR}/spirv_cross.cpp
|
||||
${SRCDIR}/spirv_cross_util.cpp
|
||||
${SRCDIR}/spirv_cfg.hpp
|
||||
${SRCDIR}/spirv_cfg.cpp)
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
<ProjectGuid>{4328A62C-F1E9-47ED-B816-A1A81DAF4363}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>SPIRVCross</RootNamespace>
|
||||
<WindowsTargetPlatformVersion></WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>
|
||||
</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -153,6 +154,7 @@
|
||||
<ClInclude Include="SPIRV-Cross\spirv_common.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_cpp.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_cross.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_cross_util.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_glsl.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_hlsl.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_msl.hpp" />
|
||||
@@ -161,6 +163,7 @@
|
||||
<ClCompile Include="SPIRV-Cross\spirv_cfg.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_cpp.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_cross.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_cross_util.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_glsl.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_hlsl.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_msl.cpp" />
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<ClInclude Include="SPIRV-Cross\spirv_glsl.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_hlsl.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_msl.hpp" />
|
||||
<ClInclude Include="SPIRV-Cross\spirv_cross_util.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SPIRV-Cross\spirv_cfg.cpp" />
|
||||
@@ -17,5 +18,6 @@
|
||||
<ClCompile Include="SPIRV-Cross\spirv_glsl.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_hlsl.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_msl.cpp" />
|
||||
<ClCompile Include="SPIRV-Cross\spirv_cross_util.cpp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+1
-1
Submodule ext/glslang updated: 2edde6665d...806af25f74.
@@ -9,6 +9,7 @@ LOCAL_ARM_MODE := arm
|
||||
LOCAL_SRC_FILES := \
|
||||
../glslang/glslang/GenericCodeGen/CodeGen.cpp \
|
||||
../glslang/glslang/GenericCodeGen/Link.cpp \
|
||||
../glslang/glslang/MachineIndependent/attribute.cpp \
|
||||
../glslang/glslang/MachineIndependent/Constant.cpp \
|
||||
../glslang/glslang/MachineIndependent/glslang_tab.cpp \
|
||||
../glslang/glslang/MachineIndependent/InfoSink.cpp \
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glslang\glslang\GenericCodeGen\CodeGen.cpp" />
|
||||
<ClCompile Include="glslang\glslang\GenericCodeGen\Link.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\attribute.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Constant.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\glslang_tab.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\InfoSink.cpp" />
|
||||
@@ -207,6 +208,7 @@
|
||||
<ClInclude Include="glslang\glslang\Include\revision.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\ShHandle.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\Types.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\attribute.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\glslang_tab.cpp.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\gl_types.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\Initialize.h" />
|
||||
|
||||
@@ -137,6 +137,9 @@
|
||||
<ClCompile Include="glslang\hlsl\hlslTokenStream.cpp">
|
||||
<Filter>HLSL</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\attribute.cpp">
|
||||
<Filter>glslang</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glslang\SPIRV\disassemble.h">
|
||||
@@ -290,6 +293,9 @@
|
||||
<ClInclude Include="glslang\hlsl\hlslTokenStream.h">
|
||||
<Filter>HLSL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\attribute.h">
|
||||
<Filter>glslang</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="glslang\glslang\MachineIndependent\glslang.y">
|
||||
|
||||
@@ -242,6 +242,7 @@ SOURCES_CXX += \
|
||||
$(EXTDIR)/glslang/SPIRV/SpvBuilder.cpp \
|
||||
$(EXTDIR)/SPIRV-Cross/spirv_cfg.cpp \
|
||||
$(EXTDIR)/SPIRV-Cross/spirv_cross.cpp \
|
||||
$(EXTDIR)/SPIRV-Cross/spirv_cross_util.cpp \
|
||||
$(EXTDIR)/SPIRV-Cross/spirv_glsl.cpp \
|
||||
$(EXTDIR)/SPIRV-Cross/spirv_hlsl.cpp
|
||||
|
||||
|
||||
Reference in new issue
Block a user