Jump to content

  • Log In with Google      Sign In   
  • Create Account

NightCreature83

Member Since 21 Feb 2008
Offline Last Active Today, 05:48 PM

Posts I've Made

In Topic: Price for this GPU

Yesterday, 01:26 PM

I have a ATi 4850 thats doing that


In Topic: c++ segmentation fault

15 October 2014 - 05:58 AM

You could also modify the default stack size in your compile settings which will allow you to use larger stacks.

 

gcc: --stack=reserve, commit

MSVC: /STACK: reserve,commit

 

reserve is virtual memory size, commit is actual physical size

 

I couldnt find the clang version but it will be similar to gcc to be honest.

 

Be careful of messing with these settings because they are set to be small for a reason, large stack sizes will not detected endless recursion fast.


In Topic: D3DCompileFromFile

06 October 2014 - 05:59 AM

its the function that the HLSL shader will use to set as the function to execute when you call this shader. Its the same as the main function in a C/C++ application and you need to provide this so that the HLSL compiler and runtime know where to start from.


In Topic: Updated from VC 8 To VC 10 and My App Has a Error in VC10 xstring Help

01 October 2014 - 03:39 AM

Expect even more fun if you use custom allocators with STL, the allocator interface for STL changed with VC10.


In Topic: Multiples of 16B constant buffer or Microsoft gone mad.

18 September 2014 - 07:37 AM

 


http://thecodinglove.com/post/97565023437/when-i-use-a-new-library-without-reading-the

Also, alignment.

 

a-har a-har a-har... not.

 

seriously, one thing is to read documentation the other is reading hundreds of pages just to prevent something you have no idea of what. most functions and other programming instruments offer functionality that isn't needed most of the time. that's like reading about rocket science just because you are interested in a fuel tank that is also used in rockets by coincidence.

 

RTFM, when reading msdn documentation always, ALWAYS, read the remarks section! In this case the allignment of 16 bytes is done because you can nicely stuff 4 floats in there, or a vector4. Coincidentally CPUs like this allignement because the can now write a nice block to another nice block without having to do address computations.

 

By allowing you to specify your own buffers you can enforce the allignment by using __declspec( align( 16 ) ) before struct in MSVC.

__declspec( align( 16 ) ) struct MyStruct
{
}

This will pad your structure so it always lands on a 16 byte boundary.

And even in D3D9 times MS actually always wrote on a 16Byte boundary to the shaders in the effect code everything was sent as a float4 to the shader even if you called a setFloatParam on the effect or shader. MS has just made it easier for you to construct your buffers, without lifting this restriction.


PARTNERS