December 17, 2021 8:35 PM, "Zebediah Figura (she/her)" zfigura@codeweavers.com wrote:
On 12/17/21 17:29, Zebediah Figura (she/her) wrote:
On 12/17/21 13:12, Francisco Casas wrote:
diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index be35d125..cefe173d 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1291,7 +1291,7 @@ static void write_sm4_ld(struct hlsl_ctx *ctx, >> struct vkd3d_bytecode_buffer *buf case HLSL_SAMPLER_DIM_CUBE: break;
case HLSL_SAMPLER_DIM_GENERIC:
default:
assert(0); }
I prefer to err on the side of avoiding 'default', to force one to > explicitly deal with adding new cases to an enum. In this case especially it seems especially incorrect, since at least > some of the new enum values are valid cases and should be handled.
Along the same lines I would probably merge patches 08/12 and 10/12 into this one.
Note also that fixing this hunk makes the subject of patch 11/12 not make sense anymore, so that should be rewritten. I would also suggest reordering that patch before this one, to save yourself some work.
I gave it some thought, I think it makes sense to merge 07/12, 09/12, 10/12 and 11/12 in the same patch:
vkd3d-shader/hlsl: Handle additional dimension types for textures.