mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Get rid of the "use_vocp" field in the vkd3d_shader_scan_info structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
760bafd620
commit
015a9aacaf
@@ -640,8 +640,6 @@ struct vkd3d_shader_scan_info
|
|||||||
|
|
||||||
struct vkd3d_shader_descriptor_info *descriptors;
|
struct vkd3d_shader_descriptor_info *descriptors;
|
||||||
unsigned int descriptor_count;
|
unsigned int descriptor_count;
|
||||||
|
|
||||||
bool use_vocp;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum vkd3d_component_type
|
enum vkd3d_component_type
|
||||||
|
@@ -2106,6 +2106,7 @@ struct vkd3d_dxbc_compiler
|
|||||||
const struct vkd3d_shader_scan_info *scan_info;
|
const struct vkd3d_shader_scan_info *scan_info;
|
||||||
unsigned int input_control_point_count;
|
unsigned int input_control_point_count;
|
||||||
unsigned int output_control_point_count;
|
unsigned int output_control_point_count;
|
||||||
|
bool use_vocp;
|
||||||
|
|
||||||
unsigned int shader_phase_count;
|
unsigned int shader_phase_count;
|
||||||
struct vkd3d_shader_phase *shader_phases;
|
struct vkd3d_shader_phase *shader_phases;
|
||||||
@@ -5456,6 +5457,9 @@ static void vkd3d_dxbc_compiler_emit_dcl_input(struct vkd3d_dxbc_compiler *compi
|
|||||||
vkd3d_dxbc_compiler_emit_input(compiler, dst, VKD3D_SIV_NONE, VKD3DSIM_NONE);
|
vkd3d_dxbc_compiler_emit_input(compiler, dst, VKD3D_SIV_NONE, VKD3DSIM_NONE);
|
||||||
else
|
else
|
||||||
vkd3d_dxbc_compiler_emit_input_register(compiler, dst);
|
vkd3d_dxbc_compiler_emit_input_register(compiler, dst);
|
||||||
|
|
||||||
|
if (dst->reg.type == VKD3DSPR_OUTCONTROLPOINT)
|
||||||
|
compiler->use_vocp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vkd3d_dxbc_compiler_emit_dcl_input_ps(struct vkd3d_dxbc_compiler *compiler,
|
static void vkd3d_dxbc_compiler_emit_dcl_input_ps(struct vkd3d_dxbc_compiler *compiler,
|
||||||
@@ -5987,7 +5991,6 @@ static void vkd3d_dxbc_compiler_emit_hull_shader_barrier(struct vkd3d_dxbc_compi
|
|||||||
|
|
||||||
static void vkd3d_dxbc_compiler_emit_hull_shader_main(struct vkd3d_dxbc_compiler *compiler)
|
static void vkd3d_dxbc_compiler_emit_hull_shader_main(struct vkd3d_dxbc_compiler *compiler)
|
||||||
{
|
{
|
||||||
const struct vkd3d_shader_scan_info *scan_info = compiler->scan_info;
|
|
||||||
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
|
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
|
||||||
const struct vkd3d_shader_phase *control_point_phase, *phase;
|
const struct vkd3d_shader_phase *control_point_phase, *phase;
|
||||||
uint32_t phase_instance_id;
|
uint32_t phase_instance_id;
|
||||||
@@ -6003,7 +6006,7 @@ static void vkd3d_dxbc_compiler_emit_hull_shader_main(struct vkd3d_dxbc_compiler
|
|||||||
else
|
else
|
||||||
vkd3d_dxbc_compiler_emit_default_control_point_phase(compiler);
|
vkd3d_dxbc_compiler_emit_default_control_point_phase(compiler);
|
||||||
|
|
||||||
if (scan_info->use_vocp)
|
if (compiler->use_vocp)
|
||||||
vkd3d_dxbc_compiler_emit_hull_shader_barrier(compiler);
|
vkd3d_dxbc_compiler_emit_hull_shader_barrier(compiler);
|
||||||
|
|
||||||
for (i = 0; i < compiler->shader_phase_count; ++i)
|
for (i = 0; i < compiler->shader_phase_count; ++i)
|
||||||
|
@@ -305,15 +305,6 @@ static void vkd3d_shader_scan_constant_buffer_declaration(struct vkd3d_shader_sc
|
|||||||
cb->register_index, VKD3D_SHADER_RESOURCE_BUFFER, VKD3D_SHADER_RESOURCE_DATA_UINT, 0);
|
cb->register_index, VKD3D_SHADER_RESOURCE_BUFFER, VKD3D_SHADER_RESOURCE_DATA_UINT, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vkd3d_shader_scan_input_declaration(struct vkd3d_shader_scan_info *scan_info,
|
|
||||||
const struct vkd3d_shader_instruction *instruction)
|
|
||||||
{
|
|
||||||
const struct vkd3d_shader_dst_param *dst = &instruction->declaration.dst;
|
|
||||||
|
|
||||||
if (dst->reg.type == VKD3DSPR_OUTCONTROLPOINT)
|
|
||||||
scan_info->use_vocp = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vkd3d_shader_scan_sampler_declaration(struct vkd3d_shader_scan_context *context,
|
static void vkd3d_shader_scan_sampler_declaration(struct vkd3d_shader_scan_context *context,
|
||||||
const struct vkd3d_shader_instruction *instruction)
|
const struct vkd3d_shader_instruction *instruction)
|
||||||
{
|
{
|
||||||
@@ -412,9 +403,6 @@ static void vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *cont
|
|||||||
case VKD3DSIH_DCL_CONSTANT_BUFFER:
|
case VKD3DSIH_DCL_CONSTANT_BUFFER:
|
||||||
vkd3d_shader_scan_constant_buffer_declaration(context, instruction);
|
vkd3d_shader_scan_constant_buffer_declaration(context, instruction);
|
||||||
break;
|
break;
|
||||||
case VKD3DSIH_DCL_INPUT:
|
|
||||||
vkd3d_shader_scan_input_declaration(context->scan_info, instruction);
|
|
||||||
break;
|
|
||||||
case VKD3DSIH_DCL_SAMPLER:
|
case VKD3DSIH_DCL_SAMPLER:
|
||||||
vkd3d_shader_scan_sampler_declaration(context, instruction);
|
vkd3d_shader_scan_sampler_declaration(context, instruction);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user