<p>I am pretty new to graphics programming using DX12. I was testing out my skills by building a shader to add 2 buffers and put the result in an output buffer. I have written this code in "ComputeShader.hlsl" however when i tried to invoke it using the following, i get an error sayin "file not found"</p>

<p>ThrowIfFailed(D3DCompileFromFile(GetAssetFullPath(L"ComputeShader.hlsl").c_str(), nullptr, nullptr, "main", "cs_5_0", compileFlags, 0, &amp;computeShader_madhu, nullptr));</p>

<p>Is there something that I am doing wrong?</p>

CC BY-SA 3.0
2017-04-11T21:32:50.467Z
Probably you have problems in D3dcompilefromfile. I would suggest you to print the return of GetAssetFullPath and verify if It has the expected file location.
dsilva.vinicius
CC BY-SA 3.0
2017-04-11T21:42:27.780Z
More info:
when i printed the debug error it says the following:
D3D12GetDebugInterface: This method requires the D3D12 SDK Layers for Windows 10, but they are not present on the system.

would this mean something?
Madhu
CC BY-SA 3.0
2017-04-11T22:13:52.373Z
You dont have directx sdk properly installed or dont have It linked correctly on the binaries of your program. You should check the linker setup in your compilation routine.
dsilva.vinicius
CC BY-SA 3.0
2017-04-11T22:23:05.020Z
But then the NbodyGravity sample runs perfectly well. If the SDk was not properly configured, how is that possible?
Madhu
CC BY-SA 3.0
2017-04-11T22:26:05.793Z
If the sample is running, then you should check if your program is linked with the same libraries as the sample.
dsilva.vinicius
CC BY-SA 3.0
2017-04-11T22:56:03.413Z
Yes, all i am doing is adding code to the same sample. i am not deleting or changing any path as such
Madhu
CC BY-SA 3.0
2017-04-12T08:55:37.637Z
Next time you want to add more information to your question, you should use the "edit" link instead of posting a whole new question.
Dan Hulme
<directx>
DX12- hlsl code invoking
Madhu
# DX12- hlsl code invoking

(Asked by: username_0 on 2017-04-11)

I am pretty new to graphics programming using DX12. I was testing out my skills by building a shader to add 2 buffers and put the result in an output buffer. I have written this code in "ComputeShader.hlsl" however when i tried to invoke it using the following, i get an error sayin "file not found"

ThrowIfFailed(D3DCompileFromFile(GetAssetFullPath(L"ComputeShader.hlsl").c\_str(), nullptr, nullptr, "main", "cs\_5\_0", compileFlags, 0, &computeShader\_madhu, nullptr));

Is there something that I am doing wrong?

**Tags:** directx

> **Comments:**
> **username_1**: Probably you have problems in D3dcompilefromfile. I would suggest you to print the return of GetAssetFullPath and verify if It has the expected file location.  
> **username_0**: More info: when i printed the debug error it says the following: D3D12GetDebugInterface: This method requires the D3D12 SDK Layers for Windows 10, but they are not present on the system.  would this mean something?  
> **username_1**: You dont have directx sdk properly installed or dont have It linked correctly on the binaries of your program. You should check the linker setup in your compilation routine.  
> **username_0**: But then the NbodyGravity sample runs perfectly well. If the SDk was not properly configured, how is that possible?  
> **username_1**: If the sample is running, then you should check if your program is linked with the same libraries as the sample.  
> **username_0**: Yes, all i am doing is adding code to the same sample. i am not deleting or changing any path as such  
> **username_2**: Next time you want to add more information to your question, you should use the "edit" link instead of posting a whole new question.  

---

## 0 answers

