mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Remove vkd3d_shader_parse_root_signature().
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
f300781c79
commit
16f36b0c9b
@ -566,13 +566,10 @@ 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_root_signature(const struct vkd3d_shader_code *dxbc,
|
||||
struct vkd3d_root_signature_desc *root_signature);
|
||||
void vkd3d_shader_free_root_signature(struct vkd3d_root_signature_desc *root_signature);
|
||||
|
||||
int vkd3d_shader_parse_versioned_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);
|
||||
|
||||
/* FIXME: Add support for returning error messages (ID3DBlob). */
|
||||
int vkd3d_shader_serialize_root_signature(const struct vkd3d_root_signature_desc *root_signature,
|
||||
@ -602,13 +599,10 @@ 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_root_signature)(const struct vkd3d_shader_code *dxbc,
|
||||
struct vkd3d_root_signature_desc *root_signature);
|
||||
typedef void (*PFN_vkd3d_shader_free_root_signature)(struct vkd3d_root_signature_desc *root_signature);
|
||||
|
||||
typedef int (*PFN_vkd3d_shader_parse_versioned_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 int (*PFN_vkd3d_shader_serialize_root_signature)(const struct vkd3d_root_signature_desc *root_signature,
|
||||
enum vkd3d_root_signature_version version, struct vkd3d_shader_code *dxbc);
|
||||
|
@ -2503,32 +2503,6 @@ 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_root_signature(const struct vkd3d_shader_code *dxbc,
|
||||
struct vkd3d_root_signature_desc *root_signature)
|
||||
{
|
||||
struct vkd3d_versioned_root_signature_desc desc = {0};
|
||||
int ret;
|
||||
|
||||
TRACE("dxbc {%p, %zu}, root_signature %p.\n", dxbc->code, dxbc->size, root_signature);
|
||||
|
||||
memset(root_signature, 0, sizeof(*root_signature));
|
||||
if ((ret = parse_dxbc(dxbc->code, dxbc->size, rts0_handler, &desc)) < 0)
|
||||
{
|
||||
vkd3d_shader_free_versioned_root_signature(&desc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (desc.version != VKD3D_ROOT_SIGNATURE_VERSION_1_0)
|
||||
{
|
||||
vkd3d_shader_free_versioned_root_signature(&desc);
|
||||
return VKD3D_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
*root_signature = desc.u.v_1_0;
|
||||
|
||||
return VKD3D_OK;
|
||||
}
|
||||
|
||||
int vkd3d_shader_parse_versioned_root_signature(const struct vkd3d_shader_code *dxbc,
|
||||
struct vkd3d_versioned_root_signature_desc *root_signature)
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ global:
|
||||
vkd3d_shader_free_shader_signature;
|
||||
vkd3d_shader_free_versioned_root_signature;
|
||||
vkd3d_shader_parse_input_signature;
|
||||
vkd3d_shader_parse_root_signature;
|
||||
vkd3d_shader_parse_versioned_root_signature;
|
||||
vkd3d_shader_scan_dxbc;
|
||||
vkd3d_shader_serialize_root_signature;
|
||||
|
@ -54,17 +54,17 @@ static void test_invalid_shaders(void)
|
||||
|
||||
static void test_vkd3d_shader_pfns(void)
|
||||
{
|
||||
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;
|
||||
|
||||
struct vkd3d_root_signature_desc root_signature_desc;
|
||||
struct vkd3d_versioned_root_signature_desc root_signature_desc;
|
||||
struct vkd3d_shader_signature_element *element;
|
||||
struct vkd3d_shader_scan_info scan_info;
|
||||
struct vkd3d_shader_signature signature;
|
||||
@ -90,21 +90,21 @@ static void test_vkd3d_shader_pfns(void)
|
||||
};
|
||||
static const struct vkd3d_shader_code vs = {vs_code, sizeof(vs_code)};
|
||||
|
||||
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_root_signature(&empty_rs_desc, VKD3D_ROOT_SIGNATURE_VERSION_1_0, &dxbc);
|
||||
ok(rc == VKD3D_OK, "Got unexpected error code %d.\n", rc);
|
||||
rc = pfn_vkd3d_shader_parse_root_signature(&dxbc, &root_signature_desc);
|
||||
rc = pfn_vkd3d_shader_parse_versioned_root_signature(&dxbc, &root_signature_desc);
|
||||
ok(rc == VKD3D_OK, "Got unexpected error code %d.\n", rc);
|
||||
pfn_vkd3d_shader_free_root_signature(&root_signature_desc);
|
||||
pfn_vkd3d_shader_free_versioned_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