Skip to content

[spirv] spirv-tools crash when compiling #1598

Description

@xxxbxxx

hi,

when compiling:

struct PS_INPUT {
	float4 RasterPos	: SV_Position;
	float2 Coord		: TEXCOORD0;
};
struct PS_OUTPUT {
	float4 Color0 		: SV_Target0;
};

SamplerState	SMapColor;
Texture2D		TMapColor;


cbuffer ConstBuf {
	const float2	TexSizeU;
	const float2	TexSizeV;
	const float		v0;
	const float		v1;
};

PS_OUTPUT main(const PS_INPUT v)
{
	PS_OUTPUT Output = { float4(0,0,0,0) };

	float2	Corners[4] = {
		+TexSizeU,
		-TexSizeU,
		+TexSizeV,
		-TexSizeV
	};
	for (int i=0; i<4; i++) {
		float2	Tc = v.Coord + Corners[i];
		float4	CornerColor = TMapColor.SampleLevel(SMapColor, Tc, 0);
		Output.Color0 += CornerColor;
	}

	return Output;
}

the compiler crashes when running spirvtools.
in function spvtools::opt::CopyPropagateArrays::BuildMemoryObjectFromCompositeConstruct()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

spirvWork related to SPIR-V

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions