[PATCH vkd3d 1/5] include: Document vkd3d-shader swizzles.

Zebediah Figura z.figura12 at gmail.com
Thu Sep 3 10:11:23 CDT 2020


On 9/3/20 10:08 AM, Henri Verbeet wrote:
> On Thu, 3 Sep 2020 at 05:41, Zebediah Figura <z.figura12 at 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200903/9a7dbe12/attachment-0001.sig>


More information about the wine-devel mailing list