diff --git a/hw/xbox/nv2a/pgraph/vk/draw.c b/hw/xbox/nv2a/pgraph/vk/draw.c index c082c5cfb4..5ba452d82d 100644 --- a/hw/xbox/nv2a/pgraph/vk/draw.c +++ b/hw/xbox/nv2a/pgraph/vk/draw.c @@ -809,6 +809,14 @@ static void create_pipeline(PGRAPHState *pg) } else { // FIXME: Handle in shader? } + + float lineWidth = 1.0f; + if(r->physical_device_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, @@ -816,7 +824,7 @@ static void create_pipeline(PGRAPHState *pg) .rasterizerDiscardEnable = VK_FALSE, .polygonMode = pgraph_polygon_mode_vk_map[r->shader_binding->state .polygon_front_mode], - .lineWidth = 1.0f, + .lineWidth = lineWidth, .frontFace = (pgraph_reg_r(pg, NV_PGRAPH_SETUPRASTER) & NV_PGRAPH_SETUPRASTER_FRONTFACE) ? VK_FRONT_FACE_COUNTER_CLOCKWISE : @@ -946,7 +954,7 @@ static void create_pipeline(PGRAPHState *pg) }; VkDynamicState dynamic_states[2] = { VK_DYNAMIC_STATE_VIEWPORT, - VK_DYNAMIC_STATE_SCISSOR }; + VK_DYNAMIC_STATE_SCISSOR }; VkPipelineDynamicStateCreateInfo dynamic_state = { .sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, diff --git a/hw/xbox/nv2a/pgraph/vk/instance.c b/hw/xbox/nv2a/pgraph/vk/instance.c index 9df440930c..416f12dff8 100644 --- a/hw/xbox/nv2a/pgraph/vk/instance.c +++ b/hw/xbox/nv2a/pgraph/vk/instance.c @@ -523,15 +523,15 @@ static bool create_logical_device(PGRAPHState *pg, Error **errp) }; // Ensure device supports required features - VkPhysicalDeviceFeatures available_features, enabled_features; - vkGetPhysicalDeviceFeatures(r->physical_device, &available_features); + VkPhysicalDeviceFeatures enabled_features; + vkGetPhysicalDeviceFeatures(r->physical_device, &r->physical_device_features); memset(&enabled_features, 0, sizeof(enabled_features)); struct { const char *name; VkBool32 available, *enabled; } required_features[] = { - #define F(n) { #n, available_features.n, &enabled_features.n } + #define F(n) { #n, r->physical_device_features.n, &enabled_features.n } F(shaderClipDistance), F(geometryShader), F(shaderTessellationAndGeometryPointSize), diff --git a/hw/xbox/nv2a/pgraph/vk/renderer.h b/hw/xbox/nv2a/pgraph/vk/renderer.h index d728805475..e5b43fce21 100644 --- a/hw/xbox/nv2a/pgraph/vk/renderer.h +++ b/hw/xbox/nv2a/pgraph/vk/renderer.h @@ -332,6 +332,7 @@ typedef struct PGRAPHVkState { bool memory_budget_extension_enabled; VkPhysicalDevice physical_device; + VkPhysicalDeviceFeatures physical_device_features; VkPhysicalDeviceProperties device_props; VkDevice device; VmaAllocator allocator; diff --git a/subprojects/cpp-httplib b/subprojects/cpp-httplib new file mode 160000 index 0000000000..0f1b62c2b3 --- /dev/null +++ b/subprojects/cpp-httplib @@ -0,0 +1 @@ +Subproject commit 0f1b62c2b3d0898cbab7aa685c2593303ffdc1a2