vkd3d-shader: Scan multi-register descriptor ranges properly.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
parent
ffaa31e1d9
commit
1c9b07e8b3
|
@ -137,6 +137,8 @@ struct vkd3d_shader_parameter
|
|||
} u;
|
||||
};
|
||||
|
||||
#define VKD3D_SHADER_DESCRIPTOR_RANGE_UNBOUNDED (~0u)
|
||||
|
||||
struct vkd3d_shader_resource_binding
|
||||
{
|
||||
enum vkd3d_shader_descriptor_type type;
|
||||
|
|
|
@ -2399,7 +2399,9 @@ static const struct vkd3d_shader_resource_binding *vkd3d_dxbc_compiler_get_resou
|
|||
if (!vkd3d_dxbc_compiler_check_shader_visibility(compiler, current->shader_visibility))
|
||||
continue;
|
||||
|
||||
if (current->type == descriptor_type && current->register_index == reg_idx && current->register_space == reg_space)
|
||||
if (descriptor_type == current->type && reg_space == current->register_space && reg_idx >= current->register_index
|
||||
&& (current->register_count == VKD3D_SHADER_DESCRIPTOR_RANGE_UNBOUNDED
|
||||
|| reg_idx < current->register_index + current->register_count))
|
||||
return current;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue