Page 1 of 1

[2.2] Issues with dx11 samples

Posted: Sat Feb 03, 2018 7:09 pm
by al2950
Due to some restrictions in Ogre 2.1 I have decided to take a look at Ogre 2.2. Sadly the ogre samples are not working, well some of them work. HDR sample definitely does not work. It seems to be trying to create a compressed 3d texture with a resolution which is not multiple of 4 and directx throws a wobbly.

Probably an easy fix, but will take me a while to get up to speed with the 2.2 codebase. I shall assume if I asked is 2.2 ready for production you would say yes!?

Re: [2.2] Issues with dx11 samples

Posted: Sat Feb 03, 2018 8:23 pm
by dark_sylinc
I'll take a look. But what error are you getting?

They should all be working. Probably some stupid error was introduced inadvertently

Re: [2.2] Issues with dx11 samples

Posted: Sat Feb 03, 2018 8:27 pm
by al2950

Code: Select all

19:26:52: OGRE EXCEPTION(-2147024809:RenderingAPIException): Error creating StagingTexture
Error Description:invalid parameters were passed.
ID3D11Device::CreateTexture3D: A Texture3D created with the following Format (0x46, BC1_TYPELESS) experiences aligment restrictions on the dimensions of the Resource. The dimensions, which are (Width: 1025, Height: 1025, Depth: 16), must be multiples of (Width: 4, Height: 4, Depth: 1).
ID3D11Device::CreateTexture3D: Returning E_INVALIDARG, meaning invalid parameters were passed.
 in D3D11StagingTexture::D3D11StagingTexture at C:/Projects/ogre/RenderSystems/Direct3D11/src/OgreD3D11StagingTexture.cpp (line 115)

Re: [2.2] Issues with dx11 samples

Posted: Sat Feb 03, 2018 8:40 pm
by dark_sylinc
OH. I thought you mixed two problems in one (samples not working + you tried a non multiple of 4 BC4 volume texture).

You actually meant the samples internally created this and caused the crash. Mmmm.... I'll take a look at what could be causing this.

Could you post the callstack before the exception is thrown?
i.e. place a breakpoint at RenderSystems\Direct3D11\src\OgreD3D11StagingTexture.cpp constructor line 111 or so

Edit: Aw yeah, nevermind. I was able to repro on my machine using VS2015

Re: [2.2] Issues with dx11 samples

Posted: Sat Feb 03, 2018 9:04 pm
by dark_sylinc
Fixed.

Thanks for the report!

Re: [2.2] Issues with dx11 samples

Posted: Sat Feb 03, 2018 10:15 pm
by al2950
Great thanks. Whilst you are at it, can you merge some of the recent fixes from the 2.1 branch into the 2.2 branch :)