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

Texture2DMS isn't recognized by the slang #74

Closed
bryan05 opened this issue May 31, 2018 · 3 comments
Closed

Texture2DMS isn't recognized by the slang #74

bryan05 opened this issue May 31, 2018 · 3 comments

Comments

@bryan05
Copy link

bryan05 commented May 31, 2018

I encounter an error:
my shader code is like this:
Texture2DMS<float4,2> s_texture_0 : register(t0);

in c++ code its kind is NULL
ReflectionType::SharedPtr reflectType(TypeLayoutReflection* pSlangType, const ReflectionPath* pPath)
{
auto kind = pSlangType->getType()->getKind();

@tangent-vector
Copy link
Collaborator

Thanks for reporting this. I’ll look into it.

@tangent-vector
Copy link
Collaborator

I think the issue here is that Slang does not support passing an explicit sample count to the Texture2DMS type. When I write a stand-alone shader with a declaration like:

Texture2DMS<float4, 2> gTexture;

I get an error from the Slang compiler:

test.slang(1): error 39999: too many arguments to call (got 2, expected 1)

While that error message isn't great, it is accurate because the Slang compiler only expects a single argument for the Texture2D generic type. If I rewrite my declaration as follows:

Texture2DMS<float4> gTexture;

I find that the shader compiles without error to DXBC for Shader Model 5.0, and in my stand-alone testing the reflection info I get back appears to be valid.

Can you confirm what version of Falcor you are using, and perhaps share a minimal example that reproduces the problem?

@bryan05
Copy link
Author

bryan05 commented Jun 1, 2018

I passed slangFlags |= SLANG_COMPILE_FLAG_NO_CHECKING as the compile flag, so I don't get that error.
after passing single argument for the Texture2D generic type, I get the valid reflection info.

My version is 3.0.
thanks very much

@bryan05 bryan05 closed this as completed Jun 1, 2018
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