#Debugging "The Parameter Is Incorrect"

23 messages · Page 1 of 1 (latest)

sour sandal
#

When I call CreateRootSignature I'm getting The Parameter is Incorrect for the HRESULT. Is there a way to get more information about which parameter / why it's incorrect? I have some validation layers enabled but they're not logging anything for this.

crisp wasp
#

I had the exact same issue recently, trying to remember how I debugged it

#

But basically, no, you can't really get information about what's incorrect afaik

#

I think I just looked at the documentation for the arguments and looked very carefully at what I was doing

#

Can you paste your function call

sour sandal
#

It's a mishmash of some tutorial code and weird hacks I came up with because I don't really know what I'm doing with this part of DX12 but this code occasionally works
https://hatebin.com/egfyqmlils
my first thought about what's wrong is the part where it sets up the descriptor ranges

crisp wasp
#

I wanna say that the invalid arg parameter literally means that the argument is the wrong type or something, but I'm not sure how that works given that the type system should enforce things

#

Look at the values of the arguments and make sure there aren't any null pointer or anything

#

I don't know DX12 so I can't really judge the rest of your code

#

invalid arg is what you get when the parameter is just straight up uninterpretable I think, if it were getting further than that you'd get a more intelligible validation error

sour sandal
#

hmm, doesn't seem like I'm passing malformed data for the rootParameter info
rootSignatureFlags is set to D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT & I didn't pass any static samplers (nullptr data & 0 size)

#

Am I meant to set Num32bitValues manually after init?

crisp wasp
#

No idea sorry, you'll need to wait for someone who knows DX12

daring crown
#

Does the error blob tell something useful @sour sandal ?

#

DX_CHECK(D3DX12SerializeVersionedRootSignature(&rootSignatureDescription, featureData.HighestVersion, &rootSignatureBlob, &errorBlob /*This thing here */));

daring crown
#

Looks like descriptor range at index 4 and 6 are the same, is this intentional?

sour sandal
#

I'm getting this in the error blob

Shader register range of type SAMPLER (root parameter [2], visibility ALL, descriptor table slot [0]) overlaps with another shader register range (root parameter[0], visibility ALL, descriptor table slot [0]).
so looks like my indices are wrong

daring crown
sour sandal
#

Yeah those shouldn't be the same, I'll check my array

daring crown
sour sandal
sour sandal