Fix issues with MaxDualSourceDrawBuffersEXT
This commit is contained in:
parent
dcae187376
commit
a88f674124
@ -505,6 +505,8 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config)
|
|||||||
resources->maxTaskWorkGroupSizeZ_EXT = value;
|
resources->maxTaskWorkGroupSizeZ_EXT = value;
|
||||||
else if (tokenStr == "MaxMeshViewCountEXT")
|
else if (tokenStr == "MaxMeshViewCountEXT")
|
||||||
resources->maxMeshViewCountEXT = value;
|
resources->maxMeshViewCountEXT = value;
|
||||||
|
else if (tokenStr == "MaxDualSourceDrawBuffersEXT")
|
||||||
|
resources->maxDualSourceDrawBuffersEXT = value;
|
||||||
else if (tokenStr == "nonInductiveForLoops")
|
else if (tokenStr == "nonInductiveForLoops")
|
||||||
resources->limits.nonInductiveForLoops = (value != 0);
|
resources->limits.nonInductiveForLoops = (value != 0);
|
||||||
else if (tokenStr == "whileLoops")
|
else if (tokenStr == "whileLoops")
|
||||||
|
@ -157,7 +157,13 @@ typedef struct glslang_resource_s {
|
|||||||
int max_task_work_group_size_y_ext;
|
int max_task_work_group_size_y_ext;
|
||||||
int max_task_work_group_size_z_ext;
|
int max_task_work_group_size_z_ext;
|
||||||
int max_mesh_view_count_ext;
|
int max_mesh_view_count_ext;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
int max_dual_source_draw_buffers_ext;
|
||||||
|
|
||||||
|
/* Incorrectly capitalized name retained for backward compatibility */
|
||||||
int maxDualSourceDrawBuffersEXT;
|
int maxDualSourceDrawBuffersEXT;
|
||||||
|
};
|
||||||
|
|
||||||
glslang_limits_t limits;
|
glslang_limits_t limits;
|
||||||
} glslang_resource_t;
|
} glslang_resource_t;
|
||||||
|
@ -53,5 +53,15 @@ TEST_F(DefaultResourceTest, FromFile)
|
|||||||
ASSERT_EQ(expectedConfig, realConfig);
|
ASSERT_EQ(expectedConfig, realConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(DefaultResourceTest, UnrecognizedLimit)
|
||||||
|
{
|
||||||
|
const std::string defaultConfig = GetDefaultTBuiltInResourceString();
|
||||||
|
testing::internal::CaptureStdout();
|
||||||
|
TBuiltInResource resources;
|
||||||
|
DecodeResourceLimits(&resources, const_cast<char*>(defaultConfig.c_str()));
|
||||||
|
std::string output = testing::internal::GetCapturedStdout();
|
||||||
|
ASSERT_EQ(output.find("unrecognized limit"), std::string::npos);
|
||||||
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
} // namespace glslangtest
|
} // namespace glslangtest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user