diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-06-22 12:14:24 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-06-22 12:14:24 +0300 |
commit | f9da366ae6693e0f9bbc833345fa665297f3d6cf (patch) | |
tree | 31ef736a39462e855ae9cd4a93bbd45dddd76b83 /spirv_cross_c.cpp | |
parent | 7edaea87cf052b9c18a92f919dfec27be2ce9ad9 (diff) |
MSL: Remove the old VertexAttr API.fix-1399
Too many issues with deprecated declarations on various compilers, just
get rid of it.
Diffstat (limited to 'spirv_cross_c.cpp')
-rw-r--r-- | spirv_cross_c.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/spirv_cross_c.cpp b/spirv_cross_c.cpp index 1c42ad01..ec1edd99 100644 --- a/spirv_cross_c.cpp +++ b/spirv_cross_c.cpp @@ -1019,11 +1019,11 @@ spvc_result spvc_compiler_msl_add_vertex_attribute(spvc_compiler compiler, const } auto &msl = *static_cast<CompilerMSL *>(compiler->compiler.get()); - MSLVertexAttr attr; + MSLShaderInput attr; attr.location = va->location; - attr.format = static_cast<MSLVertexFormat>(va->format); + attr.format = static_cast<MSLShaderInputFormat>(va->format); attr.builtin = static_cast<spv::BuiltIn>(va->builtin); - msl.add_msl_vertex_attribute(attr); + msl.add_msl_shader_input(attr); return SPVC_SUCCESS; #else (void)va; @@ -1163,7 +1163,7 @@ spvc_result spvc_compiler_msl_set_argument_buffer_device_address_space(spvc_comp #endif } -spvc_bool spvc_compiler_msl_is_vertex_attribute_used(spvc_compiler compiler, unsigned location) +spvc_bool spvc_compiler_msl_is_shader_input_used(spvc_compiler compiler, unsigned location) { #if SPIRV_CROSS_C_API_MSL if (compiler->backend != SPVC_BACKEND_MSL) @@ -1173,7 +1173,7 @@ spvc_bool spvc_compiler_msl_is_vertex_attribute_used(spvc_compiler compiler, uns } auto &msl = *static_cast<CompilerMSL *>(compiler->compiler.get()); - return msl.is_msl_vertex_attribute_used(location) ? SPVC_TRUE : SPVC_FALSE; + return msl.is_msl_shader_input_used(location) ? SPVC_TRUE : SPVC_FALSE; #else (void)location; compiler->context->report_error("MSL function used on a non-MSL backend."); @@ -1181,6 +1181,11 @@ spvc_bool spvc_compiler_msl_is_vertex_attribute_used(spvc_compiler compiler, uns #endif } +spvc_bool spvc_compiler_msl_is_vertex_attribute_used(spvc_compiler compiler, unsigned location) +{ + return spvc_compiler_msl_is_shader_input_used(compiler, location); +} + spvc_bool spvc_compiler_msl_is_resource_used(spvc_compiler compiler, SpvExecutionModel model, unsigned set, unsigned binding) { @@ -2282,7 +2287,7 @@ void spvc_msl_vertex_attribute_init(spvc_msl_vertex_attribute *attr) { #if SPIRV_CROSS_C_API_MSL // Crude, but works. - MSLVertexAttr attr_default; + MSLShaderInput attr_default; attr->location = attr_default.location; attr->format = static_cast<spvc_msl_vertex_format>(attr_default.format); attr->builtin = static_cast<SpvBuiltIn>(attr_default.builtin); |