[PATCH vkd3d 3/3] vkd3d-shader: Rename vkd3d_shader_interface to vkd3d_shader_interface_info.
Józef Kucia
joseph.kucia at gmail.com
Wed Jan 16 05:44:59 CST 2019
From: Józef Kucia <jkucia at codeweavers.com>
For consistency with other vkd3d and vkd3d-shader structures.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
include/vkd3d_shader.h | 8 ++++----
libs/vkd3d-shader/spirv.c | 14 +++++++-------
libs/vkd3d-shader/vkd3d_shader_main.c | 12 ++++++------
libs/vkd3d-shader/vkd3d_shader_private.h | 2 +-
libs/vkd3d/state.c | 10 +++++-----
5 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h
index 2ac8e0fd9505..67884254a88b 100644
--- a/include/vkd3d_shader.h
+++ b/include/vkd3d_shader.h
@@ -29,7 +29,7 @@ extern "C" {
enum vkd3d_shader_structure_type
{
- VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE,
+ VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_ARGUMENTS,
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_TRANSFORM_FEEDBACK_INFO,
@@ -129,7 +129,7 @@ struct vkd3d_shader_push_constant_buffer
unsigned int size; /* in bytes */
};
-struct vkd3d_shader_interface
+struct vkd3d_shader_interface_info
{
enum vkd3d_shader_structure_type type;
const void *next;
@@ -163,7 +163,7 @@ struct vkd3d_shader_transform_feedback_element
uint8_t output_slot;
};
-/* Extends vkd3d_shader_interface. */
+/* Extends vkd3d_shader_interface_info. */
struct vkd3d_shader_transform_feedback_info
{
enum vkd3d_shader_structure_type type;
@@ -197,7 +197,7 @@ struct vkd3d_shader_compile_arguments
int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_code *spirv, unsigned int compiler_options,
- const struct vkd3d_shader_interface *shader_interface,
+ const struct vkd3d_shader_interface_info *shader_interface_info,
const struct vkd3d_shader_compile_arguments *compile_args);
void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code);
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index 82a9f628ba88..7afc255edf4e 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -1898,7 +1898,7 @@ struct vkd3d_dxbc_compiler
struct vkd3d_control_flow_info *control_flow_info;
size_t control_flow_info_size;
- struct vkd3d_shader_interface shader_interface;
+ struct vkd3d_shader_interface_info shader_interface;
struct vkd3d_push_constant_buffer_binding *push_constants;
const struct vkd3d_shader_compile_arguments *compile_args;
@@ -1925,7 +1925,7 @@ static void vkd3d_dxbc_compiler_emit_initial_declarations(struct vkd3d_dxbc_comp
struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader_version *shader_version,
const struct vkd3d_shader_desc *shader_desc, uint32_t compiler_options,
- const struct vkd3d_shader_interface *shader_interface,
+ const struct vkd3d_shader_interface_info *shader_interface,
const struct vkd3d_shader_compile_arguments *compile_args,
const struct vkd3d_shader_scan_info *scan_info)
{
@@ -2039,7 +2039,7 @@ static struct vkd3d_push_constant_buffer_binding *vkd3d_dxbc_compiler_find_push_
static bool vkd3d_dxbc_compiler_have_combined_sampler(const struct vkd3d_dxbc_compiler *compiler,
const struct vkd3d_shader_register *resource, const struct vkd3d_shader_register *sampler)
{
- const struct vkd3d_shader_interface *shader_interface = &compiler->shader_interface;
+ const struct vkd3d_shader_interface_info *shader_interface = &compiler->shader_interface;
const struct vkd3d_shader_combined_resource_sampler *combined_sampler;
unsigned int i;
@@ -2065,7 +2065,7 @@ static struct vkd3d_shader_descriptor_binding vkd3d_dxbc_compiler_get_descriptor
struct vkd3d_dxbc_compiler *compiler, const struct vkd3d_shader_register *reg,
enum vkd3d_shader_resource_type resource_type, bool is_uav_counter)
{
- const struct vkd3d_shader_interface *shader_interface = &compiler->shader_interface;
+ const struct vkd3d_shader_interface_info *shader_interface = &compiler->shader_interface;
enum vkd3d_shader_descriptor_type descriptor_type;
enum vkd3d_shader_binding_flag resource_type_flag;
struct vkd3d_shader_descriptor_binding binding;
@@ -3993,7 +3993,7 @@ static void vkd3d_dxbc_compiler_emit_dcl_sampler(struct vkd3d_dxbc_compiler *com
static uint32_t vkd3d_dxbc_compiler_get_dummy_sampler_id(struct vkd3d_dxbc_compiler *compiler)
{
- const struct vkd3d_shader_interface *shader_interface = &compiler->shader_interface;
+ const struct vkd3d_shader_interface_info *shader_interface = &compiler->shader_interface;
const SpvStorageClass storage_class = SpvStorageClassUniformConstant;
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
uint32_t type_id, ptr_type_id, var_id;
@@ -4079,7 +4079,7 @@ static void vkd3d_dxbc_compiler_emit_combined_sampler_declarations(struct vkd3d_
enum vkd3d_component_type sampled_type, unsigned int structure_stride, bool raw,
const struct vkd3d_spirv_resource_type *resource_type_info)
{
- const struct vkd3d_shader_interface *shader_interface = &compiler->shader_interface;
+ const struct vkd3d_shader_interface_info *shader_interface = &compiler->shader_interface;
const struct vkd3d_shader_scan_info *scan_info = compiler->scan_info;
const SpvStorageClass storage_class = SpvStorageClassUniformConstant;
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
@@ -5662,7 +5662,7 @@ static const struct vkd3d_symbol *vkd3d_dxbc_compiler_find_resource(struct vkd3d
static const struct vkd3d_symbol *vkd3d_dxbc_compiler_find_combined_sampler(struct vkd3d_dxbc_compiler *compiler,
const struct vkd3d_shader_register *resource_reg, const struct vkd3d_shader_register *sampler_reg)
{
- const struct vkd3d_shader_interface *shader_interface = &compiler->shader_interface;
+ const struct vkd3d_shader_interface_info *shader_interface = &compiler->shader_interface;
unsigned int resource_index, sampler_index;
struct vkd3d_symbol key;
struct rb_entry *entry;
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index 37aee0f6fce4..73a9236799d0 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -85,7 +85,7 @@ static int vkd3d_shader_validate_compile_args(const struct vkd3d_shader_compile_
int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_code *spirv, unsigned int compiler_options,
- const struct vkd3d_shader_interface *shader_interface,
+ const struct vkd3d_shader_interface_info *shader_interface_info,
const struct vkd3d_shader_compile_arguments *compile_args)
{
struct vkd3d_shader_instruction instruction;
@@ -94,12 +94,12 @@ int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_parser parser;
int ret;
- TRACE("dxbc {%p, %zu}, spirv %p, compiler_options %#x, shader_interface %p, compile_args %p.\n",
- dxbc->code, dxbc->size, spirv, compiler_options, shader_interface, compile_args);
+ TRACE("dxbc {%p, %zu}, spirv %p, compiler_options %#x, shader_interface_info %p, compile_args %p.\n",
+ dxbc->code, dxbc->size, spirv, compiler_options, shader_interface_info, compile_args);
- if (shader_interface && shader_interface->type != VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE)
+ if (shader_interface_info && shader_interface_info->type != VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE_INFO)
{
- WARN("Invalid structure type %#x.\n", shader_interface->type);
+ WARN("Invalid structure type %#x.\n", shader_interface_info->type);
return VKD3D_ERROR_INVALID_ARGUMENT;
}
@@ -118,7 +118,7 @@ int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_code *dxbc,
vkd3d_shader_trace(parser.data);
if (!(spirv_compiler = vkd3d_dxbc_compiler_create(&parser.shader_version,
- &parser.shader_desc, compiler_options, shader_interface, compile_args, &scan_info)))
+ &parser.shader_desc, compiler_options, shader_interface_info, compile_args, &scan_info)))
{
ERR("Failed to create DXBC compiler.\n");
vkd3d_shader_parser_destroy(&parser);
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index bf2f45571375..2942a3408498 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -806,7 +806,7 @@ struct vkd3d_dxbc_compiler;
struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader_version *shader_version,
const struct vkd3d_shader_desc *shader_desc, uint32_t compiler_options,
- const struct vkd3d_shader_interface *shader_interface,
+ const struct vkd3d_shader_interface_info *shader_interface_info,
const struct vkd3d_shader_compile_arguments *compile_args,
const struct vkd3d_shader_scan_info *scan_info) DECLSPEC_HIDDEN;
int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler,
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c
index 18addf39409d..eb7c8be3c6c4 100644
--- a/libs/vkd3d/state.c
+++ b/libs/vkd3d/state.c
@@ -1310,7 +1310,7 @@ static void dump_shader_stage(VkShaderStageFlagBits stage, const void *data, siz
static HRESULT create_shader_stage(struct d3d12_device *device,
struct VkPipelineShaderStageCreateInfo *stage_desc, enum VkShaderStageFlagBits stage,
- const D3D12_SHADER_BYTECODE *code, const struct vkd3d_shader_interface *shader_interface,
+ const D3D12_SHADER_BYTECODE *code, const struct vkd3d_shader_interface_info *shader_interface,
const struct vkd3d_shader_compile_arguments *compile_args)
{
struct vkd3d_shader_code dxbc = {code->pShaderBytecode, code->BytecodeLength};
@@ -1435,8 +1435,8 @@ static HRESULT d3d12_pipeline_state_init_compute(struct d3d12_pipeline_state *st
struct d3d12_device *device, const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc)
{
const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs;
+ struct vkd3d_shader_interface_info shader_interface;
const struct d3d12_root_signature *root_signature;
- struct vkd3d_shader_interface shader_interface;
VkComputePipelineCreateInfo pipeline_info;
struct vkd3d_shader_scan_info shader_info;
struct vkd3d_shader_code dxbc;
@@ -1475,7 +1475,7 @@ static HRESULT d3d12_pipeline_state_init_compute(struct d3d12_pipeline_state *st
return hr;
}
- shader_interface.type = VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE;
+ shader_interface.type = VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE_INFO;
shader_interface.next = NULL;
shader_interface.bindings = root_signature->descriptor_mapping;
shader_interface.binding_count = root_signature->descriptor_count;
@@ -1949,8 +1949,8 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
uint32_t aligned_offsets[D3D12_VS_INPUT_REGISTER_COUNT];
struct vkd3d_shader_compile_arguments ps_compile_args;
struct vkd3d_shader_transform_feedback_info xfb_info;
+ struct vkd3d_shader_interface_info shader_interface;
const struct d3d12_root_signature *root_signature;
- struct vkd3d_shader_interface shader_interface;
struct vkd3d_shader_signature input_signature;
struct VkSubpassDescription sub_pass_desc;
struct VkRenderPassCreateInfo pass_desc;
@@ -2202,7 +2202,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
xfb_stage = VK_SHADER_STAGE_VERTEX_BIT;
}
- shader_interface.type = VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE;
+ shader_interface.type = VKD3D_SHADER_STRUCTURE_TYPE_SHADER_INTERFACE_INFO;
shader_interface.next = NULL;
shader_interface.bindings = root_signature->descriptor_mapping;
shader_interface.binding_count = root_signature->descriptor_count;
--
2.19.2
More information about the wine-devel
mailing list