mirror of https://github.com/xemu-project/xemu.git
Reverted the unrelated change on line 956 of hw/xbox/nv2a/pgraph/vk/draw.c
Removed the call to vkGetPhysicalDeviceFeatures on line 814 of vk/draw.c. This was replaced by storing the result of the same call in vk/instance.c in the PGRAPHVkState struct so it can be retrieved later
This commit is contained in:
parent
c0d6c29074
commit
088cd8a3ff
|
@ -810,11 +810,8 @@ static void create_pipeline(PGRAPHState *pg)
|
|||
// FIXME: Handle in shader?
|
||||
}
|
||||
|
||||
VkPhysicalDeviceFeatures available_features;
|
||||
vkGetPhysicalDeviceFeatures(r->physical_device, &available_features);
|
||||
|
||||
float lineWidth = 1.0f;
|
||||
if(available_features.wideLines == VK_TRUE)
|
||||
if(r->physical_device_features.wideLines == VK_TRUE)
|
||||
{
|
||||
lineWidth = MIN(r->device_props.limits.lineWidthRange[1],
|
||||
MAX(r->device_props.limits.lineWidthRange[0],
|
||||
|
@ -956,7 +953,7 @@ static void create_pipeline(PGRAPHState *pg)
|
|||
.blendConstants[3] = blend_constant[3],
|
||||
};
|
||||
|
||||
VkDynamicState dynamic_states[] = { VK_DYNAMIC_STATE_VIEWPORT,
|
||||
VkDynamicState dynamic_states[2] = { VK_DYNAMIC_STATE_VIEWPORT,
|
||||
VK_DYNAMIC_STATE_SCISSOR };
|
||||
|
||||
VkPipelineDynamicStateCreateInfo dynamic_state = {
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -331,6 +331,7 @@ typedef struct PGRAPHVkState {
|
|||
bool memory_budget_extension_enabled;
|
||||
|
||||
VkPhysicalDevice physical_device;
|
||||
VkPhysicalDeviceFeatures physical_device_features;
|
||||
VkPhysicalDeviceProperties device_props;
|
||||
VkDevice device;
|
||||
VmaAllocator allocator;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 0f1b62c2b3d0898cbab7aa685c2593303ffdc1a2
|
Loading…
Reference in New Issue