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

Blur (DX11TextureFX) broken in 1.3.1 with VLC output #344

Open
mediadog opened this issue Jun 27, 2018 · 6 comments
Open

Blur (DX11TextureFX) broken in 1.3.1 with VLC output #344

mediadog opened this issue Jun 27, 2018 · 6 comments

Comments

@mediadog
Copy link

When given a texture from VLC (B8G8R8A8_UNorm and 1 Mips level) there is no texture output, and the following error is thrown. This does not happen with DX11 1.3, and in fact the file Blur.tfx did change in 1.3.1, and the changes look Mips related. This is with 35.8_x64, on a desktop with a GTX1080 as well as an old laptop with an Intel HD4000.

00:02:25 ERR : Exception caused by node during update :/73/4
00:02:25 ERR : Exception node name :Blur (DX11.TextureFX)
00:02:25 ERR : SlimDX.Direct3D11.Direct3D11Exception in SlimDX: E_INVALIDARG: An invalid parameter was passed to the returning function (-2147024809)

Stacktrace:
at SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
at SlimDX.Direct3D11.Texture2D.Build(Device device, Texture2DDescription description, D3D11_SUBRESOURCE_DATA* data)
at SlimDX.Direct3D11.Texture2D..ctor(Device device, Texture2DDescription description)
at FeralTic.DX11.Resources.DX11RenderTarget2D..ctor(DX11RenderContext context, Int32 w, Int32 h, SampleDescription sd, Format format, Boolean genMipMaps, Int32 mmLevels, Boolean allowUAV, Boolean allowShare)
at FeralTic.DX11.DX11RenderTargetPool.Lock(Int32 w, Int32 h, Format format, SampleDescription sd, Boolean genMM, Int32 mmLevels, Boolean oneframe, Boolean shared)
at VVVV.DX11.Nodes.Layers.DX11ImageShaderNode.Update(DX11RenderContext context)
at VVVV.DX11.Lib.RenderGraph.DX11DeviceRenderer.UpdateNode(DX11Node node)

00:02:25 - : Stack Trace
00:02:25 - : at SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
at SlimDX.Direct3D11.Texture2D.Build(Device device, Texture2DDescription description, D3D11_SUBRESOURCE_DATA* data)
at SlimDX.Direct3D11.Texture2D..ctor(Device device, Texture2DDescription description)
at FeralTic.DX11.Resources.DX11RenderTarget2D..ctor(DX11RenderContext context, Int32 w, Int32 h, SampleDescription sd, Format format, Boolean genMipMaps, Int32 mmLevels, Boolean allowUAV, Boolean allowShare)
at FeralTic.DX11.DX11RenderTargetPool.Lock(Int32 w, Int32 h, Format format, SampleDescription sd, Boolean genMM, Int32 mmLevels, Boolean oneframe, Boolean shared)
at VVVV.DX11.Nodes.Layers.DX11ImageShaderNode.Update(DX11RenderContext context)
at VVVV.DX11.Lib.RenderGraph.DX11DeviceRenderer.UpdateNode(DX11Node node)
00:02:25 * : Render State Stack should now have a size of 0!
00:02:25 - : Clearing

@mrvux
Copy link
Owner

mrvux commented Jun 28, 2018

mm I just did a try (and I recalled I checked with a vlc texture), but can not reproduce.

Is swapping with the old tfx working?

@mediadog
Copy link
Author

Yup, replacing it with the previous version works.

BlurGlow and BlurPerfector show the same problem, but interestingly not BlurDirectional, which looks like it changed this release too. BlurRadial is OK, but it did not change.

More details: This is on Win7 x64, and using the Stallone video in the assets folder, with FileStream (DX11.Texture Vlc). I have not tried this on Win10 but will.

The main thing I can see with VLC that is different from a file texture is the Mip levels count (1 vs. 10 for earth_512x512) and the reversed color format.

For now I'll just revert those files back to the previous versions in my local copy. Thanks!

@mediadog
Copy link
Author

Hmmm, works OK under Win10 on a GTX1060 laptop. Why could that be - different HLSL compiler?

@mrvux
Copy link
Owner

mrvux commented Jun 28, 2018

Ah, ok, OS was not mentioned.

It's very unlikely to be hlsl compiler, since I call auto mip gen, but indeed bgra was rather limited in win7 (no uav support, and seems no autogen mip maps).

Since now mips are built outside of shader, I use pipeline for it (win10 allows that by the look of it) .

This commit should check format support in a better way: 5f1b9de

And here is latest build for trying it out (I don't have win7 or win8 machine around as traveling)

https://ci.appveyor.com/project/mrvux/dx11-vvvv/build/1.3.1.6-alpha/artifacts

@mrvux
Copy link
Owner

mrvux commented Jun 28, 2018

One thing about earth working is that this is now optimizing it

since mip is already there for filetextures, the runtime now sees it and avoids that default mip pass on shader which requires it, and, just use it as it is, saving some performance.

@mediadog
Copy link
Author

Ayup, that fixes it! I tried the three blurs that were failing before (and Directional and Radial, just to be sure) and all are good. Thank you sir for the fast service!

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

2 participants