mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Use SPIR-V built-ins for hull shader inputs.
I missed this case before because apps don't seem to use SV_Position for hull shader inputs. vkd3d_siv_from_sysval() needs to be restored for hull shaders. 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
67a160683d
commit
7fc98ade64
@ -129,6 +129,20 @@ static const void *vkd3d_find_struct_(const struct vkd3d_struct *chain,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval(enum vkd3d_sysval_semantic sysval)
|
||||
{
|
||||
switch (sysval)
|
||||
{
|
||||
case VKD3D_SV_NONE:
|
||||
return VKD3D_SIV_NONE;
|
||||
case VKD3D_SV_POSITION:
|
||||
return VKD3D_SIV_POSITION;
|
||||
default:
|
||||
FIXME("Unhandled sysval %#x.\n", sysval);
|
||||
return VKD3D_SIV_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
#define VKD3D_SPIRV_VERSION 0x00010000
|
||||
#define VKD3D_SPIRV_GENERATOR_ID 18
|
||||
#define VKD3D_SPIRV_GENERATOR_VERSION 1
|
||||
@ -3590,6 +3604,9 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (compiler->shader_type == VKD3D_SHADER_TYPE_HULL && !sysval && signature_element->sysval_semantic)
|
||||
sysval = vkd3d_siv_from_sysval(signature_element->sysval_semantic);
|
||||
|
||||
builtin = get_spirv_builtin_for_sysval(compiler, sysval);
|
||||
|
||||
component_idx = vkd3d_write_mask_get_component_idx(dst->write_mask);
|
||||
|
Loading…
x
Reference in New Issue
Block a user