Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in StructureByeStride #894

Open
krupitskas opened this issue Nov 21, 2024 · 0 comments
Open

Typo in StructureByeStride #894

krupitskas opened this issue Nov 21, 2024 · 0 comments

Comments

@krupitskas
Copy link

krupitskas commented Nov 21, 2024

It's not a proper place to ask but maybe you can point me where I can actually report this:

When Im creating SRV incorrectly, I have D3D12 Error:

D3D12 ERROR: ID3D12Device::CreateShaderResourceView: The Dimensions of the View are invalid due to at least one of the following conditions. Assuming StructureByeStride 48, FirstElement (value = 0) must be between 0 and the maximum offset of the Buffer, -1, inclusively. With the current FirstElement, NumElements (value = 140698833649689) must be between 1 and 0, inclusively, in order that the View fit on the Buffer. [ STATE_CREATION ERROR #31: CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS]
D3D12: **BREAK** enabled for the previous message, which was: [ ERROR STATE_CREATION #31: CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS ]

StructureByeStride have a typo. Where to report such problems to help DirectX team?

Thanks

P.S. Also I think NumElements (value = 140698833649689) is incorrect

This is how Im creating my SRV

// Create SRV
D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc = {};
srv_desc.Format = DXGI_FORMAT_UNKNOWN;
srv_desc.ViewDimension = D3D12_SRV_DIMENSION_BUFFER;
srv_desc.Buffer.FirstElement = 0;
srv_desc.Buffer.NumElements = 25;// static_cast<UINT>(all_materials_buffer.size());
srv_desc.Buffer.StructureByteStride = sizeof(SurfaceShaderParameters);
srv_desc.Buffer.Flags = D3D12_BUFFER_SRV_FLAG_NONE;
srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant