0

How does one benchmark relatively simple shader? I need to determine such things like what to do: discard in the beginning or multiply by 0 in the end of shader.

What I'm struggling with is general approach to benchmark glsl shaders and also, how to benchmark particular shader, because it has no effect on general performance (like fps etc) but I need to determine what is the difference.

genpfault
  • 51,148
  • 11
  • 85
  • 139
s1ddok
  • 4,615
  • 1
  • 18
  • 31
  • as a general rule, discard is not that effective: http://stackoverflow.com/questions/8509051/is-discard-bad-for-program-performance-in-opengl – agnu17 Jul 12 '15 at 20:00
  • thats is just an example. I need general approach because it is one of many many things i want to test. – s1ddok Jul 12 '15 at 20:02

1 Answers1

0

OpenGL ES debugger in Xcode might give you a good insight about which shader takes how much time and what parts of shader are consuming more time than other parts.

https://developer.apple.com/library/mac/recipes/xcode_help-debugger/articles/debugging_opengl_es_frame.html

rgngl
  • 5,353
  • 3
  • 30
  • 34