diff options
| author | Mat M <mathew1800@gmail.com> | 2020-04-22 21:20:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-22 21:20:14 -0400 |
| commit | dfd7bb2971b2840edc9d603d62d5c121875ebd98 (patch) | |
| tree | cbae28c1b2262fdf8fe4bd30977995281d493148 /src | |
| parent | a8a37d9d068d00a5f577ce2dd856bc9dbe6b4ee6 (diff) | |
| parent | 910decd9cb8e7bdbf10b8901a741137fe0a6680b (diff) | |
Merge pull request #3767 from ReinUsesLisp/point-size-pipeline
vk_pipeline_cache: Fix unintentional memcpy into optional
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 8fdc6400dc..a792130fdf 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -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(); |
