BuraCULa

Members
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

153 Neutral

About BuraCULa

  • Rank
    Member
  1. Hello. I work on a renderer framework. When I create texture with CreateTexture2D, D3D11 device immediatly allocates some memory from virtual space of the process despite there is no cpu access flags etc. or staging usage specified. I've read Windows manage paging of gpu resources so that memory of gpu resources are moved to system memory to create empty space for recently used resources. My process consumes 2 gb of memory for render targets and total gpu memory usage is about 3 gb. Gpu has 8 gb physical memory but 1 gb of system memory(Committed virtual memory) of process is still used by D3D11 resources. I checked this with PerfView tool which tracks all virtual memory allocations. I checked committed address spaces of other D3D11 games but it seems their gpu resources does not consume any system memory. There isn't much information about this behaviour on internet. I would greatly appreciate if anyone enlighten me.   Thanks.
  2. Hello. I am trying to make my flat terrain a little bumpy and I saw Outerra's old implementation.   It looks pretty well but I couldn't figure it out. It seem POM is used but I tried lots of combinations with POM and normal mapping and I couldn't achieve that sight.   Do you have any idea about how to achieve such a perfect bumps on grass.
  3. A8_UNORM Texture sampling problem

    Hmm. So it seems i need to change my format to L8 and it is gonna be loaded as R8. Thank you. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  4. Hi. I have a texture with format A8_UNORM. When i try to sample it in pixel shader it was returning just zero.But when i changed my shader variable from [CODE]Texture2D<float> sth[/CODE] to [CODE]Texture2D<float4> sth[/CODE] and in shader, sampled the alpha component instead of the red component (sth.Sample(...).a instead of sth.Sample(...).r) it worked well.I am really confused with this situation. Although my texture has single channel,i am able to sample it with Texture2d<float4>.Can someone please enlighten me?
  5. Hi. I am trying to pack my view space normals into two float with spheremap transformation. Actually i can pack and unpack them well but, while packing specific vectors - (0,0,1) and (0,0,-1) - , the algorithm is trying to call normalize(0,0). So this is causing a infinite result. Is there any way to solve this without placing some if statements into packing and unpacking functions ? I am using functions from [url="http://aras-p.info/texts/CompactNormalStorage.html"]here[/url].
  6. Texture2D load problem in CS

    Yes i didn't know i have to unset it before bounding it to CS.Now it is working well.Thank you MJP [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  7. Hi. I am trying to implement deferred shading technique.I am encoding my normals into a render target in pixel shader.Then i am bounding shader resource view of this resource to the compute shader.In PIX, i can see that the surface is bounded to CS so everything works fine but when i try to sample any normal data it just returns "0". Here is my simple code but it doesn't work.As you can guess it is just filling surface with blue. [code]#define TILE_SIZE 16 RWTexture2D<float4> gOutTexture : register(u0); Texture2D<float2> gInputTexture : register(t0); /*--------------------- COMPUTE SHADER FUNC ----------------------*/ [numthreads(TILE_SIZE,TILE_SIZE,1)] void DeferredShadingCS(uint3 groupId : SV_GroupID, uint3 dispatchThreadId : SV_DispatchThreadID, uint3 groupThreadId : SV_GroupThreadID ) { float2 data = gInputTexture.Load(uint3(dispatchThreadId.xy,0)); gOutTexture[dispatchThreadId.xy] = float4(data,1,1); } [/code]
  8. RWTexture2D problem with half4

    I am trying to create a output texture for compute shader and copy this texture to render target after CS finished working.Actually I am just trying to start working on deferred shading. Does that conversion cause a performance penalty ? Because my hw doesn't support 128 bit textures for render targets and so i can't create swap chain with R32G32B32A32 etc. --Edit-- After some researches i got some informations like half is not so important and 32 bits surfaces are pretty enough for deferred shading techniques.So i should look for some packing algorithms like this [url="http://aras-p.info/texts/CompactNormalStorage.html"]http://aras-p.info/texts/CompactNormalStorage.html[/url]. Thanks for your reply MJP.
  9. Hi.I can't compile following code.Compiler says "typed UAV stores must write all declared components.".But when I use float4 instead of half4 it works well. What does that error mean? [img]http://public.gamedev.net//public/style_emoticons/default/unsure.png[/img] [code] RWTexture2D<half4> gTexture : register(u0); [numthreads(TILE_SIZE,TILE_SIZE,1)] void CS(uint3 groupId : SV_GroupID, uint3 dispatchThreadId : SV_DispatchThreadID, uint3 groupThreadId : SV_GroupThreadID ) { gTexture[dispatchThreadId.xy] = half4(1,1,1,1); } [/code]
  10. hi. I am trying to implement fft algorithm on gpu via compute shader. Actually i am trying to convert my working c++ code to hlsl code. Since i couldn't do it, i tried to make code as simple as i can,and deleted and updated some parts of the shader function.But still i cant read from the buffers correctly. It reads zeros from the buffers although the buffers were initialized correctly(wValues and rIndices buffers have correct values). I am usin pix to view the buffers. I am new to hlsl and i guess i am making very stupid mistake somewhere.Where is my mistake :/ [code]struct Complex{ float re; float im; }; // group sizes #define FFT_DIM 16 #define log_2_n 4 cbuffer Algo{ int FFT_DIR; float time; }; Buffer<uint> rIndices:register(t0); Buffer<float> wValues:register(t1); RWStructuredBuffer<Complex> hTValues:register(u0); [numthreads(FFT_DIM,1, 1 )] void FFTShader( uint3 threadIDInGroup : SV_GroupThreadID){ float2 c[FFT_DIM]; int w_c=0; int w_cc=1; int loops = FFT_DIM>>1; int size = 1<<1; int size_over_2 = 1; int toffset=0; if(FFT_DIR==0){ for(int i=0 ; i<FFT_DIM ; i++){ c[i] = wValues[i]; } } if(FFT_DIR==0){ for (int i = 0; i < FFT_DIM; i++){ hTValues[i + FFT_DIM*threadIDInGroup.x].re = c[i].x; hTValues[i + FFT_DIM*threadIDInGroup.x].im = c[i].y; } } }[/code]
  11. Heap corruption in std::list

    i am not spending my time to solve their problem.I try to find the mistake because i am sure one day, also i will face with that problm for my own work.
  12. Heap corruption in std::list

    typedef struct DUGUM { int Case[3][3]; float estimated; float current; struct DUGUM * children; int childrenCount; struct DUGUM * parent; }DUGUM,*PDUGUM; this is the DUGUM struct.I am trying to use a* algorithm to solve 8 puzzle problem.Infact my c++ code works fine with directx and can find the solution but i writed this code for my friends,they dont know classes and c++.This is a homework :) case[][] member of struct stores the current positions of the tiles.In memcmp call it looks if the current positons of tiles are same with the goal node. 1 2 3 0 5 6 4 7 8(current) 1 2 3 8 0 4 7 6 5(goal)
  13. Hi I have been trying to find the mistake about 1 day.I use <list> library.When i add somedata to list, it works fine couple of times but then it gives me an error: "windows has triggered a breakpoint. This may be due to a corruption of the heap bla bla" and shows me function __forceinline void * __cdecl _heap_alloc (size_t size). DUGUM* Solve(DUGUM *start){ std::list<PDUGUM> queue; std::list<PDUGUM> queue2; queue.push_front(start); DUGUM* temp = NULL; while(! queue.empty()){ temp = queue.back(); queue.pop_back(); if( memcmp(&temp->Case[0][0],&GOAL[0][0],sizeof(int)*9)==0 )break; queue2.push_back(temp); FindChildren(temp); for(int i=0 ; i<temp->childrenCount ;i++){ queue.push_front(&temp->children[i]); //error line } } } and before the while loop i can add data to list with no error.I belive this line is curved :)
  14. Hi.Im very confused.What is the difference between hDeviceWindow and hFocusWindow.I created a full secreen device,and hDeviceWindow is NULL, but it still collects message like mouse clicks.What job does devicewindow have?
  15. Thank you both.My zbuffer value in clear call was 10.0F, i changed it to 1.0f.Now there is no error.