mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/dxbc: Introduce API for serialising DXBC blobs.
This commit is contained in:
committed by
Alexandre Julliard
parent
c87492ed21
commit
b1e13d6e33
Notes:
Alexandre Julliard
2023-02-23 22:20:24 +01:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/103
@@ -1946,6 +1946,34 @@ VKD3D_SHADER_API void vkd3d_shader_free_dxbc(struct vkd3d_shader_dxbc_desc *dxbc
|
||||
VKD3D_SHADER_API int vkd3d_shader_parse_dxbc(const struct vkd3d_shader_code *dxbc,
|
||||
uint32_t flags, struct vkd3d_shader_dxbc_desc *desc, char **messages);
|
||||
|
||||
/**
|
||||
* Serialise a DXBC description into a blob stored in a vkd3d_shader_code
|
||||
* structure.
|
||||
*
|
||||
* \param section_count The number of DXBC sections to serialise.
|
||||
*
|
||||
* \param sections An array of vkd3d_shader_dxbc_section_desc structures
|
||||
* to serialise.
|
||||
*
|
||||
* \param dxbc A pointer to a vkd3d_shader_code structure in which the
|
||||
* serialised blob will be stored.
|
||||
* \n
|
||||
* The output blob is allocated by vkd3d-shader and should be freed with
|
||||
* vkd3d_shader_free_shader_code() when no longer needed.
|
||||
*
|
||||
* \param messages Optional output location for error or informational messages
|
||||
* produced by the serialiser.
|
||||
* \n
|
||||
* This parameter behaves identically to the \a messages parameter of
|
||||
* vkd3d_shader_compile().
|
||||
*
|
||||
* \return A member of \ref vkd3d_result.
|
||||
*
|
||||
* \since 1.7
|
||||
*/
|
||||
VKD3D_SHADER_API int vkd3d_shader_serialize_dxbc(size_t section_count,
|
||||
const struct vkd3d_shader_dxbc_section_desc *sections, struct vkd3d_shader_code *dxbc, char **messages);
|
||||
|
||||
#endif /* VKD3D_SHADER_NO_PROTOTYPES */
|
||||
|
||||
/** Type of vkd3d_shader_get_version(). */
|
||||
@@ -2007,6 +2035,9 @@ typedef void (*PFN_vkd3d_shader_free_dxbc)(struct vkd3d_shader_dxbc_desc *dxbc);
|
||||
/** Type of vkd3d_shader_parse_dxbc(). \since 1.7 */
|
||||
typedef int (*PFN_vkd3d_shader_parse_dxbc)(const struct vkd3d_shader_code *dxbc,
|
||||
uint32_t flags, struct vkd3d_shader_dxbc_desc *desc, char **messages);
|
||||
/** Type of vkd3d_shader_serialize_dxbc(). \since 1.7 */
|
||||
typedef int (*PFN_vkd3d_shader_serialize_dxbc)(size_t section_count,
|
||||
const struct vkd3d_shader_dxbc_section_desc *sections, struct vkd3d_shader_code *dxbc, char **messages);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user