Merge pull request #6220 from aliaspider/master

(D3D11) font + slang fixes.
This commit is contained in:
Twinaphex 2018-02-02 02:38:33 +01:00 committed by GitHub
commit 1d118c46a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View File

@ -244,7 +244,7 @@ static void d3d11_font_render_message(
return;
}
line_height = scale / font->font_driver->get_line_height(font->font_data);
line_height = font->font_driver->get_line_height(font->font_data) * scale / video_info->height;
for (;;)
{

View File

@ -420,18 +420,19 @@ bool slang_process(
std::string& name_of_type) {
if (var_name == "FragCoord")
{
name_of_type = "float4";
}
};
for (Resource& resource : ps_resources.stage_inputs)
{
if (ps->get_name(resource.id) == "FragCoord")
{
uint32_t location = ps->get_decoration(resource.id, spv::DecorationLocation);
ps_attrib_remap.push_back({ location, "SV_Position" });
name_of_type = "float4";
}
}
}
};
ps->set_variable_type_remap_callback(ps_var_remap_cb);
}
}
vs_code = vs->compile(vs_attrib_remap);
ps_code = ps->compile(ps_attrib_remap);