Sign in to follow this  

Unable to pass shader parameters

This topic is 4305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys ! We're having a really strange situation running our app on a VAIO computer. It seems we fail to pass shader parameters, although it works fine on other plaforms. When I call ID3DXConstantTable->GetConstantByName , I recieve an invalid handle. Even wierded, I've tried to re-get the constant table from the shader buffer and DirectX debug outputs "D3DX: Unrecognised shader version" I've ran countless of other apps using shaders & constants and they all worked fine so I can't understand why it would fail in out particular case. Is there anybody with a clue as for in which direction to look for ? Thanks Marc

Share this post


Link to post
Share on other sites
You should use the DirectX Caps Viewer to check if the notebook supports the required shader version. If it didn’t you should improve your hardware checkup at the start of your app.

In the other case do you use precompiled or HLSL shaders?

Share this post


Link to post
Share on other sites
Yes, the notebook supports pixelshaders 2.0.. so I don't think the problem is there... the shaders actually run.. but they are all running with parameters set to zero.

We compile the shaders on the fly using:

===============
hr = D3DXCompileShader(shader_source_string.c_str(), shader_source_string.size(), NULL, NULL, "main", profile_, D3DXSHADER_DEBUG, &buffer_, &compilationResultBuffer_, &constants_); assert(hr == S_OK);
================

and the try to acquire the variable name using:

===============
handle = constants_->GetConstantByName(NULL, constant->name.c_str());
===============

Thanks for the reply !
Marc

Share this post


Link to post
Share on other sites

This topic is 4305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this