mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d: Require D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT for stream output.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bb7d1046da
commit
15713840b4
@ -899,11 +899,12 @@ static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signa
|
|||||||
root_signature->vk_push_set_layout = VK_NULL_HANDLE;
|
root_signature->vk_push_set_layout = VK_NULL_HANDLE;
|
||||||
root_signature->vk_set_layout = VK_NULL_HANDLE;
|
root_signature->vk_set_layout = VK_NULL_HANDLE;
|
||||||
root_signature->parameters = NULL;
|
root_signature->parameters = NULL;
|
||||||
|
root_signature->flags = desc->Flags;
|
||||||
root_signature->descriptor_mapping = NULL;
|
root_signature->descriptor_mapping = NULL;
|
||||||
root_signature->static_sampler_count = 0;
|
root_signature->static_sampler_count = 0;
|
||||||
root_signature->static_samplers = NULL;
|
root_signature->static_samplers = NULL;
|
||||||
|
|
||||||
if (desc->Flags)
|
if (desc->Flags & ~D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT)
|
||||||
FIXME("Ignoring root signature flags %#x.\n", desc->Flags);
|
FIXME("Ignoring root signature flags %#x.\n", desc->Flags);
|
||||||
|
|
||||||
if (FAILED(hr = d3d12_root_signature_info_from_desc(&info, desc)))
|
if (FAILED(hr = d3d12_root_signature_info_from_desc(&info, desc)))
|
||||||
@ -2168,10 +2169,17 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
|||||||
graphics->xfb_enabled = false;
|
graphics->xfb_enabled = false;
|
||||||
if (so_desc->NumEntries)
|
if (so_desc->NumEntries)
|
||||||
{
|
{
|
||||||
|
if (!(root_signature->flags & D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT))
|
||||||
|
{
|
||||||
|
WARN("Stream output is used without D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT.\n");
|
||||||
|
hr = E_INVALIDARG;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if (!vk_info->EXT_transform_feedback)
|
if (!vk_info->EXT_transform_feedback)
|
||||||
{
|
{
|
||||||
hr = E_NOTIMPL;
|
|
||||||
FIXME("Transform feedback is not supported by Vulkan implementation.\n");
|
FIXME("Transform feedback is not supported by Vulkan implementation.\n");
|
||||||
|
hr = E_NOTIMPL;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -568,6 +568,8 @@ struct d3d12_root_signature
|
|||||||
unsigned int parameter_count;
|
unsigned int parameter_count;
|
||||||
uint32_t main_set;
|
uint32_t main_set;
|
||||||
|
|
||||||
|
D3D12_ROOT_SIGNATURE_FLAGS flags;
|
||||||
|
|
||||||
unsigned int descriptor_count;
|
unsigned int descriptor_count;
|
||||||
struct vkd3d_shader_resource_binding *descriptor_mapping;
|
struct vkd3d_shader_resource_binding *descriptor_mapping;
|
||||||
struct vkd3d_shader_descriptor_binding dummy_sampler;
|
struct vkd3d_shader_descriptor_binding dummy_sampler;
|
||||||
|
@ -2425,6 +2425,12 @@ static void test_create_graphics_pipeline_state(void)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
static const D3D12_SO_DECLARATION_ENTRY so_declaration[] =
|
||||||
|
{
|
||||||
|
{0, "SV_Position", 0, 0, 4, 0},
|
||||||
|
};
|
||||||
|
static const unsigned int strides[] = {16};
|
||||||
|
|
||||||
if (!(device = create_device()))
|
if (!(device = create_device()))
|
||||||
{
|
{
|
||||||
skip("Failed to create device.\n");
|
skip("Failed to create device.\n");
|
||||||
@ -2537,6 +2543,16 @@ static void test_create_graphics_pipeline_state(void)
|
|||||||
&IID_ID3D12PipelineState, (void **)&pipeline_state);
|
&IID_ID3D12PipelineState, (void **)&pipeline_state);
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
|
/* Stream output without D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT. */
|
||||||
|
init_pipeline_state_desc(&pso_desc, root_signature, DXGI_FORMAT_R8G8B8A8_UNORM, NULL, NULL, NULL);
|
||||||
|
pso_desc.StreamOutput.NumEntries = ARRAY_SIZE(so_declaration);
|
||||||
|
pso_desc.StreamOutput.pSODeclaration = so_declaration;
|
||||||
|
pso_desc.StreamOutput.pBufferStrides = strides;
|
||||||
|
pso_desc.StreamOutput.NumStrides = ARRAY_SIZE(strides);
|
||||||
|
hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc,
|
||||||
|
&IID_ID3D12PipelineState, (void **)&pipeline_state);
|
||||||
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
refcount = ID3D12RootSignature_Release(root_signature);
|
refcount = ID3D12RootSignature_Release(root_signature);
|
||||||
ok(!refcount, "ID3D12RootSignature has %u references left.\n", (unsigned int)refcount);
|
ok(!refcount, "ID3D12RootSignature has %u references left.\n", (unsigned int)refcount);
|
||||||
refcount = ID3D12Device_Release(device);
|
refcount = ID3D12Device_Release(device);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user