mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 23:02:47 +01:00
Merge pull request #3767 from ReinUsesLisp/point-size-pipeline
vk_pipeline_cache: Fix unintentional memcpy into optional
This commit is contained in:
commit
2c806c5fd3
1 changed files with 4 additions and 2 deletions
|
@ -330,8 +330,10 @@ VKPipelineCache::DecompileShaders(const GraphicsPipelineCacheKey& key) {
|
|||
|
||||
Specialization specialization;
|
||||
if (fixed_state.rasterizer.Topology() == Maxwell::PrimitiveTopology::Points) {
|
||||
ASSERT(fixed_state.rasterizer.point_size != 0);
|
||||
std::memcpy(&specialization.point_size, &fixed_state.rasterizer.point_size, sizeof(u32));
|
||||
float point_size;
|
||||
std::memcpy(&point_size, &fixed_state.rasterizer.point_size, sizeof(float));
|
||||
specialization.point_size = point_size;
|
||||
ASSERT(point_size != 0.0f);
|
||||
}
|
||||
for (std::size_t i = 0; i < Maxwell::NumVertexAttributes; ++i) {
|
||||
specialization.attribute_types[i] = fixed_state.vertex_input.attributes[i].Type();
|
||||
|
|
Loading…
Reference in a new issue