On 9/3/20 10:08 AM, Henri Verbeet wrote:
On Thu, 3 Sep 2020 at 05:41, Zebediah Figura z.figura12@gmail.com wrote:
+/**
- A helper macro which returns a vkd3d-shader swizzle with the given
- components. The components are specified as the suffixes to members of
- \ref vkd3d_shader_swizzle_component. For example, the swizzle ".xwyy" can be
- represented as:
- \code
- VKD3D_SHADER_SWIZZLE(X, W, Y, Y)
- \endcode
- */
#define VKD3D_SHADER_SWIZZLE(x, y, z, w) \ vkd3d_shader_create_swizzle(VKD3D_SHADER_SWIZZLE_ ## x, \ VKD3D_SHADER_SWIZZLE_ ## y, \ VKD3D_SHADER_SWIZZLE_ ## z, \ VKD3D_SHADER_SWIZZLE_ ## w)
+/** The identity swizzle, ie ".xyzw". */ #define VKD3D_SHADER_NO_SWIZZLE VKD3D_SHADER_SWIZZLE(X, Y, Z, W)
"i.e."
Yeah, I know; unfortunately that confuses doxygen, which thinks it's the end of a sentence. I'll try harder to see if there's a way around it.
+/** Programmatically build a vkd3d-shader swizzle with the given components. */ static inline uint32_t vkd3d_shader_create_swizzle(enum vkd3d_shader_swizzle_component x, enum vkd3d_shader_swizzle_component y, enum vkd3d_shader_swizzle_component z, enum vkd3d_shader_swizzle_component w)
"Programmatically", as opposed to what? If this is about distinguishing it from VKD3D_SHADER_SWIZZLE, it probably makes more sense to describe that one explicitly as a convenience macro in terms of vkd3d_shader_create_swizzle().
Yeah, there's not really much reason for that word to be there.