Module: vkd3d Branch: master Commit: d5fd309ef8b3ed10a0f862a1acb1e6c1681a7ca1 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/d5fd309ef8b3ed10a0f862a1acb1e6...
Author: Giovanni Mascellani gmascellani@codeweavers.com Date: Wed Aug 31 13:25:24 2022 +0200
vkd3d: Add a macro to mark unreachable code.
This should silence warnings about some branches non returning any value without requiring additional "return 0" statement or similar.
Also, in theory this might enable to compiler to optimize the program a little bit more, though that's unlikely to have any measurable effect.
---
include/private/vkd3d_common.h | 14 ++++++++++++ libs/vkd3d-shader/hlsl.c | 14 +++++------- libs/vkd3d-shader/hlsl.h | 3 +-- libs/vkd3d-shader/hlsl.y | 12 +++++----- libs/vkd3d-shader/hlsl_codegen.c | 9 +++----- libs/vkd3d-shader/hlsl_constant_ops.c | 12 +++------- libs/vkd3d-shader/hlsl_sm1.c | 9 ++++---- libs/vkd3d-shader/hlsl_sm4.c | 42 ++++++++++++----------------------- libs/vkd3d-shader/vkd3d_shader_main.c | 2 +- tests/shader_runner_d3d9.c | 6 ++--- 10 files changed, 52 insertions(+), 71 deletions(-)