Fix for empty statement segfault.

This commit is contained in:
LoopDawg 2016-06-03 09:17:51 -06:00
parent 9f1f818083
commit ef764a24b2
2 changed files with 5 additions and 3 deletions

View File

@ -298,7 +298,7 @@ float4 VertexShaderFunction(float4 inF0, float4 inF1, float4 inF2)
float2x2 VertexShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
{
// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
MATFNS()
MATFNS();
// TODO: ... add when float1 prototypes are generated
return float2x2(2,2,2,2);
@ -307,7 +307,7 @@ float2x2 VertexShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
float3x3 VertexShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
{
// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
MATFNS()
MATFNS();
// TODO: ... add when float1 prototypes are generated
return float3x3(3,3,3,3,3,3,3,3,3);
@ -316,7 +316,7 @@ float3x3 VertexShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
float4x4 VertexShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
{
// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
MATFNS()
MATFNS();
// TODO: ... add when float1 prototypes are generated
return float4x4(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);

View File

@ -492,6 +492,8 @@ bool HlslGrammar::acceptFunctionDefinition(TFunction& function, TIntermNode*& no
//
bool HlslGrammar::acceptExpression(TIntermTyped*& node)
{
node = nullptr;
// assignment_expression
if (! acceptAssignmentExpression(node))
return false;