[Mesa-dev,demos,v2,3/3] perf: Add script to run collection of texture formats

Submitted by Courtney Goeltzenleuchter on Nov. 12, 2013, 12:53 a.m.

Details

Message ID 1384217610-10874-4-git-send-email-courtney@LunarG.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Courtney Goeltzenleuchter Nov. 12, 2013, 12:53 a.m.
bench_teximage.sh runs all the same formats that teximage
ran. Also passes the command line arguments of the script
to the benchmark to allow tester to set --csvstyle to full
or data for output more easily parsed by scripts and such.

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>
---
 src/perf/bench_teximage.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100755 src/perf/bench_teximage.sh

Patch hide | download patch | download mbox

diff --git a/src/perf/bench_teximage.sh b/src/perf/bench_teximage.sh
new file mode 100755
index 0000000..29a2aa6
--- /dev/null
+++ b/src/perf/bench_teximage.sh
@@ -0,0 +1,44 @@ 
+#!/bin/bash
+./teximage --width 16 --height 16 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
+./teximage --width 64 --height 64 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
+./teximage --width 1024 --height 1024 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
+./teximage --width 4096 --height 4096 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
+echo ""
+./teximage --width 16 --height 16 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
+./teximage --width 64 --height 64 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
+./teximage --width 1024 --height 1024 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
+./teximage --width 4096 --height 4096 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
+echo ""
+./teximage --width 16 --height 16 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
+./teximage --width 64 --height 64 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
+./teximage --width 1024 --height 1024 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
+./teximage --width 4096 --height 4096 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
+echo ""
+# TexImage(RGB/ubyte 256 x 256): 3287.3 images/sec, 616.4 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGB --internalformat GL_RGB --test TexImage $@
+#TexSubImage(RGB/ubyte 256 x 256): 3335.5 images/sec, 625.4 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGB --internalformat GL_RGB --test TexSubImage $@
+#GetTexImage(RGB/ubyte 256 x 256): 1161.0 images/sec, 217.7 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGB --internalformat GL_RGB --test GetTexImage $@
+#TexImage(RGB/565 256 x 256): 266.2 images/sec, 33.3 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_SHORT_5_6_5 --format GL_RGB --internalformat GL_RGB --test TexImage $@
+#TexSubImage(RGB/565 256 x 256): 264.6 images/sec, 33.1 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_SHORT_5_6_5 --format GL_RGB --internalformat GL_RGB --test TexSubImage $@
+#GetTexImage(RGB/565 256 x 256): 641.2 images/sec, 80.2 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_SHORT_5_6_5 --format GL_RGB --internalformat GL_RGB --test GetTexImage $@
+#TexImage(BGRA/ubyte 256 x 256): 8691.8 images/sec, 2172.9 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_BGRA --internalformat GL_RGBA --test TexImage $@
+#TexSubImage(BGRA/ubyte 256 x 256): 8953.0 images/sec, 2238.3 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_BGRA --internalformat GL_RGBA --test TexSubImage $@
+#GetTexImage(BGRA/ubyte 256 x 256): 11736.4 images/sec, 2934.1 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_BGRA --internalformat GL_RGBA --test GetTexImage $@
+#TexImage(L/ubyte 256 x 256): 20898.0 images/sec, 1306.1 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_LUMINANCE --internalformat GL_LUMINANCE --test TexImage $@
+#TexSubImage(L/ubyte 256 x 256): 21830.8 images/sec, 1364.4 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_LUMINANCE --internalformat GL_LUMINANCE --test TexSubImage $@
+#GetTexImage(L/ubyte 256 x 256): 30453.5 images/sec, 1903.3 MB/sec
+./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_LUMINANCE --internalformat GL_LUMINANCE --test GetTexImage $@
+

Comments

On 12/11/13 00:53, Courtney Goeltzenleuchter wrote:
> bench_teximage.sh runs all the same formats that teximage
> ran. Also passes the command line arguments of the script
> to the benchmark to allow tester to set --csvstyle to full
> or data for output more easily parsed by scripts and such.
> 
> Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>
> ---
Hi Courtney,

FWIW, I have always found loops to be cleaner, but I do not have a
strong opinion either way.

~Emil
---
#!/bin/bash

dimensions="16 64 256 1024 4096"
tests="Create_TexImage TexImage GetTexImage"
for test in $tests; do
  for dim in $dimensions; do
    ./teximage --width ${dim} --height ${dim} --type GL_UNSIGNED_BYTE
--format GL_RGBA --internalformat GL_RGBA --test ${test} $@
  done
  echo ""
done

tests="TexImage TexSubImage GetTexImage"
types=("GL_UNSIGNED_BYTE" "GL_UNSIGNED_SHORT_5_6_5" "GL_UNSIGNED_BYTE"
"GL_UNSIGNED_BYTE")
formats=("GL_RGB" "GL_RGB" "GL_BGRA" "GL_LUMINANCE")
internalformats=("GL_RGB" "GL_RGB" "GL_RGBA" "GL_LUMINANCE")
for ((i=0; i<${#types[@]}; ++i)); do
  for test in $tests; do
    ./teximage --width 256 --height 256 --type ${types[i]} --format
${formats[i]} --internalformat ${internalformats[i]} --test ${test} $@
  done
done

---
>  src/perf/bench_teximage.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100755 src/perf/bench_teximage.sh
> 
> diff --git a/src/perf/bench_teximage.sh b/src/perf/bench_teximage.sh
> new file mode 100755
> index 0000000..29a2aa6
> --- /dev/null
> +++ b/src/perf/bench_teximage.sh
> @@ -0,0 +1,44 @@
> +#!/bin/bash
> +./teximage --width 16 --height 16 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
> +./teximage --width 64 --height 64 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
> +./teximage --width 1024 --height 1024 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
> +./teximage --width 4096 --height 4096 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test Create_TexImage $@
> +echo ""
> +./teximage --width 16 --height 16 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
> +./teximage --width 64 --height 64 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
> +./teximage --width 1024 --height 1024 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
> +./teximage --width 4096 --height 4096 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test TexImage $@
> +echo ""
> +./teximage --width 16 --height 16 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
> +./teximage --width 64 --height 64 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
> +./teximage --width 1024 --height 1024 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
> +./teximage --width 4096 --height 4096 --type GL_UNSIGNED_BYTE --format GL_RGBA --internalformat GL_RGBA --test GetTexImage $@
> +echo ""
> +# TexImage(RGB/ubyte 256 x 256): 3287.3 images/sec, 616.4 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGB --internalformat GL_RGB --test TexImage $@
> +#TexSubImage(RGB/ubyte 256 x 256): 3335.5 images/sec, 625.4 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGB --internalformat GL_RGB --test TexSubImage $@
> +#GetTexImage(RGB/ubyte 256 x 256): 1161.0 images/sec, 217.7 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_RGB --internalformat GL_RGB --test GetTexImage $@
> +#TexImage(RGB/565 256 x 256): 266.2 images/sec, 33.3 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_SHORT_5_6_5 --format GL_RGB --internalformat GL_RGB --test TexImage $@
> +#TexSubImage(RGB/565 256 x 256): 264.6 images/sec, 33.1 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_SHORT_5_6_5 --format GL_RGB --internalformat GL_RGB --test TexSubImage $@
> +#GetTexImage(RGB/565 256 x 256): 641.2 images/sec, 80.2 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_SHORT_5_6_5 --format GL_RGB --internalformat GL_RGB --test GetTexImage $@
> +#TexImage(BGRA/ubyte 256 x 256): 8691.8 images/sec, 2172.9 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_BGRA --internalformat GL_RGBA --test TexImage $@
> +#TexSubImage(BGRA/ubyte 256 x 256): 8953.0 images/sec, 2238.3 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_BGRA --internalformat GL_RGBA --test TexSubImage $@
> +#GetTexImage(BGRA/ubyte 256 x 256): 11736.4 images/sec, 2934.1 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_BGRA --internalformat GL_RGBA --test GetTexImage $@
> +#TexImage(L/ubyte 256 x 256): 20898.0 images/sec, 1306.1 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_LUMINANCE --internalformat GL_LUMINANCE --test TexImage $@
> +#TexSubImage(L/ubyte 256 x 256): 21830.8 images/sec, 1364.4 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_LUMINANCE --internalformat GL_LUMINANCE --test TexSubImage $@
> +#GetTexImage(L/ubyte 256 x 256): 30453.5 images/sec, 1903.3 MB/sec
> +./teximage --width 256 --height 256 --type GL_UNSIGNED_BYTE --format GL_LUMINANCE --internalformat GL_LUMINANCE --test GetTexImage $@
> +
>