some more stuff that idk why i did it
This commit is contained in:
@@ -28,12 +28,13 @@ if (APPLE)
|
|||||||
set(VULKAN_BUILT ON)
|
set(VULKAN_BUILT ON)
|
||||||
set(METAL_BUILT ON)
|
set(METAL_BUILT ON)
|
||||||
endif()
|
endif()
|
||||||
|
add_subdirectory(projects/utils)
|
||||||
add_subdirectory(projects/loader) # build gryphn loader
|
add_subdirectory(projects/loader) # build gryphn loader
|
||||||
add_subdirectory(projects/core) # build gryphn core
|
add_subdirectory(projects/core) # build gryphn core
|
||||||
add_subdirectory(projects/extensions)
|
add_subdirectory(projects/extensions)
|
||||||
add_subdirectory(projects/platform) # build gryphn platform
|
add_subdirectory(projects/platform) # build gryphn platform
|
||||||
add_subdirectory(projects/validation_layers/function_loader/)
|
add_subdirectory(projects/validation_layers/function_loader/)
|
||||||
target_link_libraries(Gryphn INTERFACE GryphnCore GryphnLoader GryphnPlatform GryphnFunctionValidator GryphnExtensions)
|
target_link_libraries(Gryphn INTERFACE GryphnUtils GryphnCore GryphnLoader GryphnPlatform GryphnFunctionValidator GryphnExtensions)
|
||||||
|
|
||||||
if (VULKAN_BUILT)
|
if (VULKAN_BUILT)
|
||||||
target_link_libraries(Gryphn INTERFACE GryphnVulkanImpl)
|
target_link_libraries(Gryphn INTERFACE GryphnVulkanImpl)
|
||||||
|
@@ -89,7 +89,7 @@ gnReturnCode createMetalGraphicsPipeline(gnGraphicsPipeline graphicsPipeline, gn
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* name = info.shaderModules[i]->info.entryPoint.value;
|
const char* name = gnToCString(info.shaderModules[i]->info.entryPoint);
|
||||||
if (strcmp(name, "main") == 0) name = "main0";
|
if (strcmp(name, "main") == 0) name = "main0";
|
||||||
|
|
||||||
gnBool foundFunction = false;
|
gnBool foundFunction = false;
|
||||||
|
@@ -18,6 +18,8 @@ void handle_resources(spirv_cross::CompilerMSL& compiler, spirv_cross::SmallVect
|
|||||||
|
|
||||||
GN_CPP_FUNCTION mtlCompiler mtlCreateCompiler(mtlCompilerInfo* info) {
|
GN_CPP_FUNCTION mtlCompiler mtlCreateCompiler(mtlCompilerInfo* info) {
|
||||||
mtlInternalCompiler* compiler = (mtlInternalCompiler*)malloc(sizeof(mtlInternalCompiler));
|
mtlInternalCompiler* compiler = (mtlInternalCompiler*)malloc(sizeof(mtlInternalCompiler));
|
||||||
|
// if(info->stage == mtlVertex) compiler->mslCompiler->set_entry_point(info->entryPoint, spv::ExecutionModelVertex);
|
||||||
|
// if(info->stage == mtlFragment) compiler->mslCompiler->set_entry_point(info->entryPoint, spv::ExecutionModelFragment);
|
||||||
compiler->mslCompiler = new spirv_cross::CompilerMSL(info->code, info->wordCount);
|
compiler->mslCompiler = new spirv_cross::CompilerMSL(info->code, info->wordCount);
|
||||||
|
|
||||||
spirv_cross::CompilerMSL::Options options = compiler->mslCompiler->get_msl_options();
|
spirv_cross::CompilerMSL::Options options = compiler->mslCompiler->get_msl_options();
|
||||||
|
@@ -12,7 +12,7 @@ gnReturnCode createMetalShaderModule(gnShaderModule module, gnDevice device, gnS
|
|||||||
mtlCompilerInfo info = {
|
mtlCompilerInfo info = {
|
||||||
.code = shaderModuleInfo.code,
|
.code = shaderModuleInfo.code,
|
||||||
.wordCount = shaderModuleInfo.size / 4,
|
.wordCount = shaderModuleInfo.size / 4,
|
||||||
.entryPoint = shaderModuleInfo.entryPoint.value,
|
.entryPoint = gnToCString(shaderModuleInfo.entryPoint),
|
||||||
.stage = (shaderModuleInfo.stage == GN_FRAGMENT_SHADER_MODULE) ? mtlFragment : mtlVertex
|
.stage = (shaderModuleInfo.stage == GN_FRAGMENT_SHADER_MODULE) ? mtlFragment : mtlVertex
|
||||||
};
|
};
|
||||||
if ((device->outputDevice->device.argumentBuffersSupport == MTLArgumentBuffersTier2)) {
|
if ((device->outputDevice->device.argumentBuffersSupport == MTLArgumentBuffersTier2)) {
|
||||||
|
@@ -28,7 +28,7 @@ gnReturnCode createShaderModule(gnShaderModule module, gnDevice device, gnShader
|
|||||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
||||||
.stage = vkGryphnShaderModuleStage(shaderModuleInfo.stage),
|
.stage = vkGryphnShaderModuleStage(shaderModuleInfo.stage),
|
||||||
.module = module->shaderModule->shaderModule,
|
.module = module->shaderModule->shaderModule,
|
||||||
.pName = shaderModuleInfo.entryPoint.value
|
.pName = gnToCString(shaderModuleInfo.entryPoint)
|
||||||
};
|
};
|
||||||
|
|
||||||
return GN_SUCCESS;
|
return GN_SUCCESS;
|
||||||
|
Reference in New Issue
Block a user