Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Visual 2013 problem with debugging shader

4: Adsense

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.


  • You cannot reply to this topic
1 reply to this topic

#1 kolarz3   Members   

164
Like
0Likes
Like

Posted 31 May 2014 - 10:11 AM

Hello guys, I try to use brakepoint in my shader file but visual tell me that he didnt see file with flags to debuging. I comppile shader with:

D3DCompile(buffer.data(), buffer.size(), NULL, NULL, NULL, mainFucName, "ps_5_0", D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION, NULL, &PS_Buffer, &errorPS);

In hlsl proporties in both shaders is enable debugging information and shader verision is 5_0.

Project: http://www.dropbox.com/s/0wgbjqdxgvi2g1o/DirectXTest.rar

 



#2 spazzarama   GDNet+   

1643
Like
1Likes
Like

Posted 31 May 2014 - 11:45 PM

VS can't work out which file your shader belongs to.

 

In your ShaderEngine.cpp

 

Change line 13 from:

hr = D3DCompile(buffer.data(), buffer.size(), NULL, NULL, NULL, mainFucName, "vs_5_0", D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION, NULL, &VS_Buffer, &errorVS);

to

hr = D3DCompile(buffer.data(), buffer.size(), name, NULL, NULL, mainFucName, "vs_5_0", D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION, NULL, &VS_Buffer, &errorVS);

then do the same for your pixel shader compiler function.

 

That worked for me with your sample (passing name into the pSourceName parameter). Not very intuitive smile.png


Edited by spazzarama, 01 June 2014 - 03:00 AM.

Justin Stenning | Blog | Book - Direct3D Rendering Cookbook (using C# and SharpDX)

Projects: Direct3D Hook, EasyHook, Shared Memory (IPC), SharpDisasm (x86/64 disassembler in C#)

@spazzarama

 




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.