• Create Account

DX11 - Shader Reflection - Interface not supported

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

#1Migi0027 (肉コーダ)  Members

Posted 03 November 2013 - 07:03 AM

Hi guys.

So I'm having a slight problem here, I've just started on the shader reflection as it might prove useful for me, but some obstacles came along the way, some were fixed, but not this one.

How I'm attempting it:

// Compile e.g. the Vertex Shader
D3DX11CompileFromFile(...)

// Set up the shader reflection
HRESULT hr =

if (FAILED(hr)) // I didn't directly just check the returned HR, because it's used later...
{
std::string error = std::string((std::string)"Shader Reflection Failed, Error:\n" + _com_error(hr).ErrorMessage()).c_str(); // Yeah, this is a bit ugly, but it works.
}

pReflector->GetDesc( &desc );


So what happens is that the HR fails, with the following error message: (Please keep in mind that the message was in another language, so this is just a rough translation):

This interface is not supported


So my questions are:

• What have I done wrong?
• (Bonus) Is there any way of setting the error messages to english?

I've stumbled across several threads, like this one:

http://xboxforums.create.msdn.com/forums/t/63358.aspx

But unfortunately I didn't get it to work.

-MIGI0027

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/cuboidzone.wordpress.com/

#2MJP  Moderators

Posted 04 November 2013 - 12:12 AM

#3N.I.B.  Members

Posted 04 November 2013 - 12:40 AM

D3DX11CompileFromFile() is deprecated. Shader compilation functions are now part of D3D, not D3DX.

You should use D3DCompileFromFile() to compile you shaders, that should solve your issues.

Edited by N.I.B., 04 November 2013 - 12:41 AM.

#4Migi0027 (肉コーダ)  Members

Posted 04 November 2013 - 07:05 AM

Yes I'm using VS 2012 (v11), so that's most likely the issue, I'm going to try and copy the IID from the Dx headers. And I'll also adapt to the D3DCompileFromFile.

I'll post the results here as soon as I can.

Thank you.

-MIGI0027

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/cuboidzone.wordpress.com/

#5Migi0027 (肉コーダ)  Members

Posted 06 November 2013 - 01:56 PM

Ok, thanks guys, It seems like the problem has been fixed (For now!  )

Actually, this was partly my fault as well, it seems like I was linking against DX11Effects.lib, which had a different definition for D3DReflect, which only accepted the GUI for the effects, so removing this link fixed the issue (I'm not really sure why it was linked, as I never used it...)

Anyways, thanks for you help!

-MIGI0027

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/cuboidzone.wordpress.com/

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.