Skip to content
  • Marek Olšák's avatar
    drawoverhead: new microbenchmark · c12816f7
    Marek Olšák authored
    Based on a benchmark from mesa/demos, but rewritten and extended.
    It's a benchmark expected to be run separately, not a piglit test.
    So why piglit? Because it's a good framework for writing apps like this.
    
    mesa_glthread won't show an improvement here, because there is no app
    overhead.
    
    This is what the output looks like. The percentage is relative to
    the first test of the given draw call.
    
    The obvious thing there is that enabled vertex attribs decrease
    Mesa performance even if there are no state changes.
    
    Using Core profile.
    Draw calls per second:
       DrawElements ( 1 VBOs, 0 UBOs,  0 Tex) w/ no state change:          5.71 million (100.0%)
       DrawElements ( 4 VBOs, 0 UBOs,  0 Tex) w/ no state change:          5.18 million (90.8%)
       DrawElements (16 VBOs, 0 UBOs,  0 Tex) w/ no state change:          3.65 million (63.9%)
       DrawElements ( 1 VBOs, 0 UBOs, 16 Tex) w/ no state change:          5.71 million (100.0%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ no state change:          5.78 million (101.2%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ shader program change:    220.11 thousand (3.9%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ vertex attrib change:     1.06 million (18.5%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ 1 texture change:         483.27 thousand (8.5%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ 8 textures change:        291.20 thousand (5.1%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ 1 UBO change:             1.84 million (32.3%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ 4 UBOs change:            1.12 million (19.7%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ few uniforms / 1 change:  2.27 million (39.8%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ many uniforms / 1 change: 966.00 thousand (16.9%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ blend enable change:      1.37 million (24.0%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ depth enable change:      1.86 million (32.6%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ stencil enable change:    1.66 million (29.0%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ scissor enable change:    1.09 million (19.1%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ MSAA enable change:       1.94 million (34.0%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ cull face enable change:  1.56 million (27.3%)
       DrawElements ( 1 VBOs, 4 UBOs,  8 Tex) w/ FB sRGB enable change:    200.81 thousand (3.5%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ shader program change:    186.92 thousand (3.3%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ vertex attrib change:     638.49 thousand (11.2%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ 1 texture change:         452.39 thousand (7.9%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ 8 textures change:        278.79 thousand (4.9%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ 1 UBO change:             1.47 million (25.7%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ 4 UBOs change:            974.30 thousand (17.1%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ few uniforms / 1 change:  1.79 million (31.3%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ many uniforms / 1 change: 853.07 thousand (14.9%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ blend enable change:      1.16 million (20.3%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ depth enable change:      1.49 million (26.2%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ stencil enable change:    1.35 million (23.7%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ scissor enable change:    946.45 thousand (16.6%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ MSAA enable change:       1.62 million (28.3%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ cull face enable change:  1.29 million (22.5%)
       DrawElements (16 VBOs, 4 UBOs,  8 Tex) w/ FB sRGB enable change:    126.44 thousand (2.2%)
       DrawArrays ( 1 VBOs, 0 UBOs,  0 Tex) w/ no state change:          8.02 million (100.0%)
       DrawArrays ( 4 VBOs, 0 UBOs,  0 Tex) w/ no state change:          7.14 million (89.0%)
       DrawArrays (16 VBOs, 0 UBOs,  0 Tex) w/ no state change:          4.26 million (53.0%)
       DrawArrays ( 1 VBOs, 0 UBOs, 16 Tex) w/ no state change:          7.89 million (98.4%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ no state change:          8.01 million (99.9%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ shader program change:    221.09 thousand (2.8%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ vertex attrib change:     1.13 million (14.1%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ 1 texture change:         500.25 thousand (6.2%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ 8 textures change:        294.30 thousand (3.7%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ 1 UBO change:             2.02 million (25.2%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ 4 UBOs change:            1.18 million (14.7%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ few uniforms / 1 change:  2.28 million (28.4%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ many uniforms / 1 change: 617.79 thousand (7.7%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ blend enable change:      1.59 million (19.8%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ depth enable change:      2.09 million (26.0%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ stencil enable change:    2.02 million (25.2%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ scissor enable change:    1.18 million (14.7%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ MSAA enable change:       2.27 million (28.3%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ cull face enable change:  1.77 million (22.1%)
       DrawArrays ( 1 VBOs, 4 UBOs,  8 Tex) w/ FB sRGB enable change:    204.60 thousand (2.6%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ shader program change:    191.50 thousand (2.4%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ vertex attrib change:     679.98 thousand (8.5%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ 1 texture change:         472.00 thousand (5.9%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ 8 textures change:        286.70 thousand (3.6%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ 1 UBO change:             1.69 million (21.0%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ 4 UBOs change:            1.04 million (13.0%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ few uniforms / 1 change:  2.04 million (25.5%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ many uniforms / 1 change: 620.41 thousand (7.7%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ blend enable change:      1.30 million (16.2%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ depth enable change:      1.69 million (21.0%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ stencil enable change:    1.55 million (19.3%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ scissor enable change:    1.04 million (13.0%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ MSAA enable change:       1.82 million (22.7%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ cull face enable change:  1.47 million (18.3%)
       DrawArrays (16 VBOs, 4 UBOs,  8 Tex) w/ FB sRGB enable change:    129.25 thousand (1.6%)
    c12816f7