Signed-off-by: Hans-Kristian Arntzen post@arntzen-software.no --- libs/vkd3d-shader/dxil.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 2a363c4..a4bd87b 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -406,6 +406,25 @@ int vkd3d_shader_compile_dxil(const struct vkd3d_shader_code *dxbc, goto end; } } + + for (i = 0; i < compiler_args->parameter_count; i++) + { + const struct vkd3d_shader_parameter *argument = &compiler_args->parameters[i]; + if (argument->name == VKD3D_SHADER_PARAMETER_NAME_RASTERIZER_SAMPLE_COUNT) + { + bool spec_constant = argument->type == VKD3D_SHADER_PARAMETER_TYPE_SPECIALIZATION_CONSTANT; + const dxil_spv_option_rasterizer_sample_count helper = + { { DXIL_SPV_OPTION_RASTERIZER_SAMPLE_COUNT }, + spec_constant ? argument->u.specialization_constant.id : argument->u.immediate_constant.u.u32, + spec_constant ? DXIL_SPV_TRUE : DXIL_SPV_FALSE }; + if (dxil_spv_converter_add_option(converter, &helper.base) != DXIL_SPV_SUCCESS) + { + ERR("dxil-spirv does not support RASTERIZER_SAMPLE_COUNT.\n"); + ret = VKD3D_ERROR_NOT_IMPLEMENTED; + goto end; + } + } + } }
dxil_spv_converter_set_root_constant_word_count(converter, root_constant_words);