vkd3d-shader/hlsl: Avoid some uses of the default case when switching over hlsl_base_type.

Since we have -Wswitch, this forces the developer to update all relevant
switches when an enum case is added.

Places where the default is just a FIXME are left alone.
This commit is contained in:
Elizabeth Figura
2024-10-30 11:51:04 -05:00
committed by Henri Verbeet
parent 646087d54c
commit 1ff1a51e4b
Notes: Henri Verbeet 2025-01-10 20:14:49 +01:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1326
4 changed files with 17 additions and 71 deletions

View File

@@ -3328,9 +3328,8 @@ static D3D_SHADER_VARIABLE_TYPE sm4_base_type(const struct hlsl_type *type)
return D3D_SVT_INT;
case HLSL_TYPE_UINT:
return D3D_SVT_UINT;
default:
vkd3d_unreachable();
}
vkd3d_unreachable();
}
static void write_sm4_type(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *buffer, struct hlsl_type *type)
@@ -3446,10 +3445,9 @@ static enum vkd3d_sm4_data_type sm4_data_type(const struct hlsl_type *type)
case HLSL_TYPE_BOOL:
case HLSL_TYPE_UINT:
return VKD3D_SM4_DATA_UINT;
default:
vkd3d_unreachable();
}
vkd3d_unreachable();
}
static D3D_SRV_DIMENSION sm4_rdef_resource_dimension(const struct hlsl_type *type)