mirror of https://github.com/xemu-project/xemu.git
Added a check of available physical device features. If the wideLines feature is not supported then the lineWidth is left at 1.0f
This commit is contained in:
parent
b3d9c09732
commit
a07f0facf0
|
@ -810,9 +810,16 @@ static void create_pipeline(PGRAPHState *pg)
|
|||
// FIXME: Handle in shader?
|
||||
}
|
||||
|
||||
float lineWidth = MIN(r->device_props.limits.lineWidthRange[1],
|
||||
MAX(r->device_props.limits.lineWidthRange[0],
|
||||
(float)pg->surface_scale_factor));
|
||||
VkPhysicalDeviceFeatures available_features;
|
||||
vkGetPhysicalDeviceFeatures(r->physical_device, &available_features);
|
||||
|
||||
float lineWidth = 1.0f;
|
||||
if(available_features.wideLines == VK_TRUE)
|
||||
{
|
||||
lineWidth = MIN(r->device_props.limits.lineWidthRange[1],
|
||||
MAX(r->device_props.limits.lineWidthRange[0],
|
||||
(float)pg->surface_scale_factor));
|
||||
}
|
||||
|
||||
VkPipelineRasterizationStateCreateInfo rasterizer = {
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
|
||||
|
|
Loading…
Reference in New Issue