mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Remove versioned_ prefix from root signature functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
070de4dfbb
commit
374bcd276e
@ -566,13 +566,13 @@ int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_code *dxbc,
|
||||
const struct vkd3d_shader_compile_arguments *compile_args);
|
||||
void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code);
|
||||
|
||||
int vkd3d_shader_parse_versioned_root_signature(const struct vkd3d_shader_code *dxbc,
|
||||
int vkd3d_shader_parse_root_signature(const struct vkd3d_shader_code *dxbc,
|
||||
struct vkd3d_versioned_root_signature_desc *root_signature);
|
||||
void vkd3d_shader_free_versioned_root_signature(struct vkd3d_versioned_root_signature_desc *root_signature);
|
||||
void vkd3d_shader_free_root_signature(struct vkd3d_root_signature_desc *root_signature);
|
||||
void vkd3d_shader_free_root_signature(struct vkd3d_versioned_root_signature_desc *root_signature);
|
||||
void vkd3d_shader_free_root_signature_v_1_0(struct vkd3d_root_signature_desc *root_signature);
|
||||
|
||||
/* FIXME: Add support for returning error messages (ID3DBlob). */
|
||||
int vkd3d_shader_serialize_versioned_root_signature(const struct vkd3d_versioned_root_signature_desc *root_signature,
|
||||
int vkd3d_shader_serialize_root_signature(const struct vkd3d_versioned_root_signature_desc *root_signature,
|
||||
struct vkd3d_shader_code *dxbc);
|
||||
|
||||
int vkd3d_shader_convert_root_signature(struct vkd3d_versioned_root_signature_desc *dst,
|
||||
@ -599,12 +599,12 @@ typedef int (*PFN_vkd3d_shader_compile_dxbc)(const struct vkd3d_shader_code *dxb
|
||||
const struct vkd3d_shader_compile_arguments *compile_args);
|
||||
typedef void (*PFN_vkd3d_shader_free_shader_code)(struct vkd3d_shader_code *code);
|
||||
|
||||
typedef int (*PFN_vkd3d_shader_parse_versioned_root_signature)(const struct vkd3d_shader_code *dxbc,
|
||||
typedef int (*PFN_vkd3d_shader_parse_root_signature)(const struct vkd3d_shader_code *dxbc,
|
||||
struct vkd3d_versioned_root_signature_desc *root_signature);
|
||||
typedef void (*PFN_vkd3d_shader_free_versioned_root_signature)(struct vkd3d_versioned_root_signature_desc *root_signature);
|
||||
typedef void (*PFN_vkd3d_shader_free_root_signature)(struct vkd3d_root_signature_desc *root_signature);
|
||||
typedef void (*PFN_vkd3d_shader_free_root_signature)(struct vkd3d_versioned_root_signature_desc *root_signature);
|
||||
typedef void (*PFN_vkd3d_shader_free_root_signature_v_1_0)(struct vkd3d_root_signature_desc *root_signature);
|
||||
|
||||
typedef int (*PFN_vkd3d_shader_serialize_versioned_root_signature)(
|
||||
typedef int (*PFN_vkd3d_shader_serialize_root_signature)(
|
||||
const struct vkd3d_versioned_root_signature_desc *root_signature, struct vkd3d_shader_code *dxbc);
|
||||
|
||||
typedef int (*PFN_vkd3d_shader_convert_root_signature)(struct vkd3d_versioned_root_signature_desc *dst,
|
||||
|
@ -2530,7 +2530,7 @@ static int rts0_handler(const char *data, DWORD data_size, DWORD tag, void *cont
|
||||
return shader_parse_root_signature(data, data_size, desc);
|
||||
}
|
||||
|
||||
int vkd3d_shader_parse_versioned_root_signature(const struct vkd3d_shader_code *dxbc,
|
||||
int vkd3d_shader_parse_root_signature(const struct vkd3d_shader_code *dxbc,
|
||||
struct vkd3d_versioned_root_signature_desc *root_signature)
|
||||
{
|
||||
int ret;
|
||||
@ -2540,7 +2540,7 @@ int vkd3d_shader_parse_versioned_root_signature(const struct vkd3d_shader_code *
|
||||
memset(root_signature, 0, sizeof(*root_signature));
|
||||
if ((ret = parse_dxbc(dxbc->code, dxbc->size, rts0_handler, root_signature)) < 0)
|
||||
{
|
||||
vkd3d_shader_free_versioned_root_signature(root_signature);
|
||||
vkd3d_shader_free_root_signature(root_signature);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2913,7 +2913,7 @@ static int shader_write_root_signature(struct root_signature_writer_context *con
|
||||
return shader_write_static_samplers(context, desc);
|
||||
}
|
||||
|
||||
int vkd3d_shader_serialize_versioned_root_signature(const struct vkd3d_versioned_root_signature_desc *root_signature,
|
||||
int vkd3d_shader_serialize_root_signature(const struct vkd3d_versioned_root_signature_desc *root_signature,
|
||||
struct vkd3d_shader_code *dxbc)
|
||||
{
|
||||
struct root_signature_writer_context context;
|
||||
|
@ -5,13 +5,13 @@ global:
|
||||
vkd3d_shader_convert_root_signature;
|
||||
vkd3d_shader_find_signature_element;
|
||||
vkd3d_shader_free_root_signature;
|
||||
vkd3d_shader_free_root_signature_v_1_0;
|
||||
vkd3d_shader_free_shader_code;
|
||||
vkd3d_shader_free_shader_signature;
|
||||
vkd3d_shader_free_versioned_root_signature;
|
||||
vkd3d_shader_parse_input_signature;
|
||||
vkd3d_shader_parse_versioned_root_signature;
|
||||
vkd3d_shader_parse_root_signature;
|
||||
vkd3d_shader_scan_dxbc;
|
||||
vkd3d_shader_serialize_versioned_root_signature;
|
||||
vkd3d_shader_serialize_root_signature;
|
||||
|
||||
local: *;
|
||||
};
|
||||
|
@ -327,7 +327,7 @@ void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *shader_code)
|
||||
vkd3d_free((void *)shader_code->code);
|
||||
}
|
||||
|
||||
void vkd3d_shader_free_root_signature(struct vkd3d_root_signature_desc *root_signature)
|
||||
void vkd3d_shader_free_root_signature_v_1_0(struct vkd3d_root_signature_desc *root_signature)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@ -344,7 +344,7 @@ void vkd3d_shader_free_root_signature(struct vkd3d_root_signature_desc *root_sig
|
||||
memset(root_signature, 0, sizeof(*root_signature));
|
||||
}
|
||||
|
||||
void vkd3d_shader_free_versioned_root_signature(struct vkd3d_versioned_root_signature_desc *desc)
|
||||
void vkd3d_shader_free_root_signature(struct vkd3d_versioned_root_signature_desc *desc)
|
||||
{
|
||||
struct vkd3d_root_signature_desc1 *root_signature;
|
||||
unsigned int i;
|
||||
@ -354,7 +354,7 @@ void vkd3d_shader_free_versioned_root_signature(struct vkd3d_versioned_root_sign
|
||||
|
||||
if (desc->version == VKD3D_ROOT_SIGNATURE_VERSION_1_0)
|
||||
{
|
||||
vkd3d_shader_free_root_signature(&desc->u.v_1_0);
|
||||
vkd3d_shader_free_root_signature_v_1_0(&desc->u.v_1_0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1014,12 +1014,12 @@ HRESULT d3d12_root_signature_create(struct d3d12_device *device,
|
||||
|
||||
if (!(object = vkd3d_malloc(sizeof(*object))))
|
||||
{
|
||||
vkd3d_shader_free_root_signature(&root_signature_desc.vkd3d);
|
||||
vkd3d_shader_free_root_signature_v_1_0(&root_signature_desc.vkd3d);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
hr = d3d12_root_signature_init(object, device, &root_signature_desc.d3d12);
|
||||
vkd3d_shader_free_root_signature(&root_signature_desc.vkd3d);
|
||||
vkd3d_shader_free_root_signature_v_1_0(&root_signature_desc.vkd3d);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
vkd3d_free(object);
|
||||
|
@ -140,7 +140,7 @@ static ULONG STDMETHODCALLTYPE d3d12_root_signature_deserializer_Release(ID3D12R
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
vkd3d_shader_free_root_signature(&deserializer->desc.vkd3d);
|
||||
vkd3d_shader_free_root_signature_v_1_0(&deserializer->desc.vkd3d);
|
||||
vkd3d_free(deserializer);
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ int vkd3d_parse_root_signature_v_1_0(const struct vkd3d_shader_code *dxbc,
|
||||
struct vkd3d_versioned_root_signature_desc desc, converted_desc;
|
||||
int ret;
|
||||
|
||||
if ((ret = vkd3d_shader_parse_versioned_root_signature(dxbc, &desc)) < 0)
|
||||
if ((ret = vkd3d_shader_parse_root_signature(dxbc, &desc)) < 0)
|
||||
{
|
||||
WARN("Failed to parse root signature, vkd3d result %d.\n", ret);
|
||||
return ret;
|
||||
@ -188,7 +188,7 @@ int vkd3d_parse_root_signature_v_1_0(const struct vkd3d_shader_code *dxbc,
|
||||
enum vkd3d_root_signature_version version = desc.version;
|
||||
|
||||
ret = vkd3d_shader_convert_root_signature(&converted_desc, VKD3D_ROOT_SIGNATURE_VERSION_1_0, &desc);
|
||||
vkd3d_shader_free_versioned_root_signature(&desc);
|
||||
vkd3d_shader_free_root_signature(&desc);
|
||||
if (ret < 0)
|
||||
{
|
||||
WARN("Failed to convert from version %#x, vkd3d result %d.\n", version, ret);
|
||||
@ -300,8 +300,8 @@ static ULONG STDMETHODCALLTYPE d3d12_versioned_root_signature_deserializer_Relea
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
vkd3d_shader_free_versioned_root_signature(&deserializer->desc.vkd3d);
|
||||
vkd3d_shader_free_versioned_root_signature(&deserializer->other_desc.vkd3d);
|
||||
vkd3d_shader_free_root_signature(&deserializer->desc.vkd3d);
|
||||
vkd3d_shader_free_root_signature(&deserializer->other_desc.vkd3d);
|
||||
vkd3d_free(deserializer);
|
||||
}
|
||||
|
||||
@ -387,7 +387,7 @@ static HRESULT d3d12_versioned_root_signature_deserializer_init(struct d3d12_ver
|
||||
deserializer->ID3D12VersionedRootSignatureDeserializer_iface.lpVtbl = &d3d12_versioned_root_signature_deserializer_vtbl;
|
||||
deserializer->refcount = 1;
|
||||
|
||||
if ((ret = vkd3d_shader_parse_versioned_root_signature(dxbc, &deserializer->desc.vkd3d)) < 0)
|
||||
if ((ret = vkd3d_shader_parse_root_signature(dxbc, &deserializer->desc.vkd3d)) < 0)
|
||||
{
|
||||
WARN("Failed to parse root signature, vkd3d result %d.\n", ret);
|
||||
return hresult_from_vkd3d_result(ret);
|
||||
@ -563,7 +563,7 @@ HRESULT vkd3d_serialize_root_signature(const D3D12_ROOT_SIGNATURE_DESC *desc,
|
||||
|
||||
vkd3d_desc.version = VKD3D_ROOT_SIGNATURE_VERSION_1_0;
|
||||
vkd3d_desc.u.v_1_0 = *(const struct vkd3d_root_signature_desc *)desc;
|
||||
if ((ret = vkd3d_shader_serialize_versioned_root_signature(&vkd3d_desc, &dxbc)) < 0)
|
||||
if ((ret = vkd3d_shader_serialize_root_signature(&vkd3d_desc, &dxbc)) < 0)
|
||||
{
|
||||
WARN("Failed to serialize root signature, vkd3d result %d.\n", ret);
|
||||
if (error_blob)
|
||||
@ -604,7 +604,7 @@ HRESULT vkd3d_serialize_versioned_root_signature(const D3D12_VERSIONED_ROOT_SIGN
|
||||
*error_blob = NULL;
|
||||
|
||||
vkd3d_desc = (const struct vkd3d_versioned_root_signature_desc *)desc;
|
||||
if ((ret = vkd3d_shader_serialize_versioned_root_signature(vkd3d_desc, &dxbc)) < 0)
|
||||
if ((ret = vkd3d_shader_serialize_root_signature(vkd3d_desc, &dxbc)) < 0)
|
||||
{
|
||||
WARN("Failed to serialize root signature, vkd3d result %d.\n", ret);
|
||||
if (error_blob)
|
||||
|
@ -54,12 +54,12 @@ static void test_invalid_shaders(void)
|
||||
|
||||
static void test_vkd3d_shader_pfns(void)
|
||||
{
|
||||
PFN_vkd3d_shader_serialize_versioned_root_signature pfn_vkd3d_shader_serialize_versioned_root_signature;
|
||||
PFN_vkd3d_shader_parse_versioned_root_signature pfn_vkd3d_shader_parse_versioned_root_signature;
|
||||
PFN_vkd3d_shader_free_versioned_root_signature pfn_vkd3d_shader_free_versioned_root_signature;
|
||||
PFN_vkd3d_shader_serialize_root_signature pfn_vkd3d_shader_serialize_root_signature;
|
||||
PFN_vkd3d_shader_find_signature_element pfn_vkd3d_shader_find_signature_element;
|
||||
PFN_vkd3d_shader_free_shader_signature pfn_vkd3d_shader_free_shader_signature;
|
||||
PFN_vkd3d_shader_parse_input_signature pfn_vkd3d_shader_parse_input_signature;
|
||||
PFN_vkd3d_shader_parse_root_signature pfn_vkd3d_shader_parse_root_signature;
|
||||
PFN_vkd3d_shader_free_root_signature pfn_vkd3d_shader_free_root_signature;
|
||||
PFN_vkd3d_shader_free_shader_code pfn_vkd3d_shader_free_shader_code;
|
||||
PFN_vkd3d_shader_compile_dxbc pfn_vkd3d_shader_compile_dxbc;
|
||||
PFN_vkd3d_shader_scan_dxbc pfn_vkd3d_shader_scan_dxbc;
|
||||
@ -93,21 +93,21 @@ static void test_vkd3d_shader_pfns(void)
|
||||
};
|
||||
static const struct vkd3d_shader_code vs = {vs_code, sizeof(vs_code)};
|
||||
|
||||
pfn_vkd3d_shader_serialize_versioned_root_signature = vkd3d_shader_serialize_versioned_root_signature;
|
||||
pfn_vkd3d_shader_parse_versioned_root_signature = vkd3d_shader_parse_versioned_root_signature;
|
||||
pfn_vkd3d_shader_free_versioned_root_signature = vkd3d_shader_free_versioned_root_signature;
|
||||
pfn_vkd3d_shader_serialize_root_signature = vkd3d_shader_serialize_root_signature;
|
||||
pfn_vkd3d_shader_find_signature_element = vkd3d_shader_find_signature_element;
|
||||
pfn_vkd3d_shader_free_shader_signature = vkd3d_shader_free_shader_signature;
|
||||
pfn_vkd3d_shader_parse_input_signature = vkd3d_shader_parse_input_signature;
|
||||
pfn_vkd3d_shader_parse_root_signature = vkd3d_shader_parse_root_signature;
|
||||
pfn_vkd3d_shader_free_root_signature = vkd3d_shader_free_root_signature;
|
||||
pfn_vkd3d_shader_free_shader_code = vkd3d_shader_free_shader_code;
|
||||
pfn_vkd3d_shader_compile_dxbc = vkd3d_shader_compile_dxbc;
|
||||
pfn_vkd3d_shader_scan_dxbc = vkd3d_shader_scan_dxbc;
|
||||
|
||||
rc = pfn_vkd3d_shader_serialize_versioned_root_signature(&empty_rs_desc, &dxbc);
|
||||
rc = pfn_vkd3d_shader_serialize_root_signature(&empty_rs_desc, &dxbc);
|
||||
ok(rc == VKD3D_OK, "Got unexpected error code %d.\n", rc);
|
||||
rc = pfn_vkd3d_shader_parse_versioned_root_signature(&dxbc, &root_signature_desc);
|
||||
rc = pfn_vkd3d_shader_parse_root_signature(&dxbc, &root_signature_desc);
|
||||
ok(rc == VKD3D_OK, "Got unexpected error code %d.\n", rc);
|
||||
pfn_vkd3d_shader_free_versioned_root_signature(&root_signature_desc);
|
||||
pfn_vkd3d_shader_free_root_signature(&root_signature_desc);
|
||||
pfn_vkd3d_shader_free_shader_code(&dxbc);
|
||||
|
||||
rc = pfn_vkd3d_shader_parse_input_signature(&vs, &signature);
|
||||
|
Loading…
Reference in New Issue
Block a user