Fixed array arguments during conversion from HLSL to GLSL#790
Open
Majrusz wants to merge 1 commit intoDiligentGraphics:masterfrom
Open
Fixed array arguments during conversion from HLSL to GLSL#790Majrusz wants to merge 1 commit intoDiligentGraphics:masterfrom
Majrusz wants to merge 1 commit intoDiligentGraphics:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, I think I found a bug in HLSL2GLSLConverterLib where array members within an HLSL shader output structure are incorrectly translated into scalar (non-array) out variables in GLSL. This mismatch results in compilation error:
error C1035: assignment of incompatible types.Minimal Example
Vertex shader
Code
Diligent::IRenderDevice* RenderDevice = ...; std::string Source = ...; Diligent::ShaderCreateInfo ShaderCI; ShaderCI.SourceLanguage = Diligent::SHADER_SOURCE_LANGUAGE_HLSL; ShaderCI.CompileFlags = Diligent::SHADER_COMPILE_FLAG_PACK_MATRIX_ROW_MAJOR; ShaderCI.Desc.UseCombinedTextureSamplers = true; ShaderCI.Desc.ShaderType = Diligent::SHADER_TYPE_VERTEX; ShaderCI.Source = Source.c_str(); Diligent::RefCntAutoPtr<Diligent::IShader> Shader; RenderDevice->CreateShader(ShaderCI, &Shader);HLSL2GLSLConverterLib Output
Error message
0(1209) : error C1035: assignment of incompatible typespoints to_RETURN_(_PSIn_offsets = PSIn.offsets;)