donguow

Members
  • Content count

    54
  • Joined

  • Last visited

Community Reputation

173 Neutral

About donguow

  • Rank
    Member
  1. Disable pixel shader

    [quote name='vNeeki' timestamp='1340693309' post='4952928'] [CODE] uniform int enabled; void main () { if (enabled) { RunMyPixelShaderTask(); } } [/CODE] [/quote] It is possible to pass [i]varying variable[/i]s and [i]attribute variables [/i]down to pixel shader but I don't think this works for functions. Anw, I still appreciate your idea What I am doing now is as follows [code] void main () { discard; } [/code] However, this, of course, can't give me accurate results.
  2. Disable pixel shader

    [quote name='Aks9' timestamp='1340665466' post='4952826'] [quote name='donguow' timestamp='1340634594' post='4952666'] Nope. I just want to measure the processing time when pixel processing stage is disabled. [/quote] It sounds like you want to check whether your program is fragment shader bound. In that case, just make ultra simple fragment shader and measure execution time. Otherwise, [b]glEnable(GL_RASTERIZER_DISCARD)[/b] is the way to disable fragment shaders execution. Also, you could try to discard fragments in the fragment shader. It is, of course, meaningless, but maybe that will trigger some optimization in the drivers and totally eliminate FS. [/quote] I did use this way. This happens before rasterization stage. I am now testing with discarding fragments. This way, of course, is not perfectly correct but giving pixel shader as little work as possible seems not a bad idea though.
  3. Disable pixel shader

    [quote name='japro' timestamp='1340630612' post='4952649'] What are you trying to achieve? Occlusion culling? [/quote] Nope. I just want to measure the processing time when pixel processing stage is disabled.
  4. Disable pixel shader

    glCullFace won't let the data get into the rasterization stage, but in my case, I still want primitives to be processed at rasterization stage.
  5. Hi guys, For some reasons, I want to disable the pixel shader (fragment shader). It means that the hardware will throw fragments away right after they come out of the rasterization stage so that the fragments can't be able to get into the next stage (pixel shader). I know that we can disable rasterization stage by enabling RASTERIZER_DISCARD, is there any similarity with pixel? or any trick to do that? Thank in advance, -D
  6. [quote] I think the concept of Unified Shader Model is about the hardware design. That is, the shader "execution unit" is not specialized for vertex shading and fragment shading, which allows for more flexible usage. [/quote] Agree
  7. Hi Phantom, If I understand you correctly, suppose the time it takes to render 1 frame is 0.5 ms it means that the execution time at vertex shader and pixel shader are also 0.5 ms, right? is it something called unified shader model?
  8. At the moment, I just want to investigate GPU in terms of processing time. The outcome could be a comparison of avg. processing time among shaders including vertex shader, fragment shader.
  9. I'm still looking for more accurate ways anw.
  10. Thank you guys. My current approach is to disable rasterzation stage (glEnable(GL_RASTERIZER_DISCARD_NV)) by using transform feedback mode. But I think inaccuracy occurs as the time it takes to copy data to transform feedback buffer is significant. -D
  11. Thanks. I will check it out
  12. In my case, at first I just take the vertex shader into account, I mentioned geometry shader just because it is part of rendering pipeline. There is nothing to do with it at the moment. I know there are ways to measure the processing time of GPU, or in other words, of the entire rendering pipeline. Now I just want to measure the processing time consumed by part of it.
  13. Thank for your response, Larspensjo, here is my case: Giving a vertex shader program, assuming that I have 1000 vertices now I want to know how long does it take the vertex shader to process 1000 vertices. Is there any way to put the timer in the middle to measure the processing time? Thanks, -D
  14. Hi guys, At the moment, I aim to estimate the time it takes to perform vertex processing. Say, I have a graphics rendering pipeline as follows: -------------------- ------------------------ ------------------------ [i]Vertices --->| Vertex Shader |------->[/i] | [i]Geometry shader | -------> .... --------> | Fragment shader | ------ Frame buffer -----> Display[/i] [i] -------------------- ------------------------ ------------------------ [/i] Now, I just want to estimate the average processing time at Vertex shader. Is there any possible way to do that? Thanks in advance, -D
  15. OpenGL Transform feedback problem

    I finally got it fixed. Before linking the shaders, we need to put the following commands [code] glActiveVaryingNV( shaderProgram, "position\0" ); glActiveVaryingNV( shaderProgram, "normal\0" ); [/code] Cheers, -D