Some of the other calls are followed by resetting it to 0, but not all (notably in that same file line 335 sets it to a potentially non-zero value and does not reset it).

Actually, I just noticed that this one is using PACK_SKIP, but the other cases are using UNPACK_SKIP. Still, between the two attributes, there is inconsistency on whether or not the code expects an operation to reset the values, or must set them all up before each operation...

                        ...jim

On 4/21/14 7:52 AM, Andrew Brygin wrote:
Hello Sergey,

  the fast path skips j2d_glPixelStorei(GL_PACK_SKIP_ROWS, dsty).

  Could you please clarify why? I think that initial value of dsty
  (dstInfo.bounds.y1) can be non-zero, and this operation
  seem to be required...

Thanks,
Andrew

On 4/21/2014 6:17 PM, Sergey Bylokhov wrote:
Hello.
Please review the fix for jdk 9.
This issue initially was found in FX[1], and there is description of
this problem.
In the fix the flip operation is done using memcpy after the whole
image was moved from gpu to cpu.

[1] https://javafx-jira.kenai.com/browse/RT-30035
Bug: https://bugs.openjdk.java.net/browse/JDK-8041129
Webrev can be found at:
http://cr.openjdk.java.net/~serb/8041129/webrev.01

Benchmarks:
==========================================================
Windows 7 x64, lenovo T410, nvidia NVS 3100M
http://cr.openjdk.java.net/~serb/8041129/J2DBench/results
base ogl vs base d3d vs fixed ogl
Summary:
  OGL-base-nvidia-windows:
    Number of tests:  10
    Overall average:  2239.9261323744704
    Best spread:      1.72% variance
    Worst spread:     88.61% variance
    (Basis for results comparison)

  OGL-fix-nvidia-windows:
    Number of tests:  10
    Overall average:  166667.93024226945
    Best spread:      1.23% variance
    Worst spread:     66.19% variance
    Comparison to basis:
      Best result:      13719.74% of basis
      Worst result:     97.17% of basis
      Number of wins:   8
      Number of ties:   1
      Number of losses: 1

  D3D-base-nvidia-windows:
    Number of tests:  10
    Overall average:  29755.21747098
    Best spread:      0.34% variance
    Worst spread:     61.12% variance
    Comparison to basis:
      Best result:      12068.41% of basis
      Worst result:     8.05% of basis
      Number of wins:   6
      Number of ties:   0
      Number of losses: 4

==========================================================
OSX 10.8.5, macbook pro retina, nvidia GeForce GT 650M 1024 MB
http://cr.openjdk.java.net/~serb/8041129/J2DBench-osx/results-nvidia-osx.txt

Summary:
  OGL-base-nvidia-osx:
    Number of tests:  10
    Overall average:  710.7070782394075
    Best spread:      0.73% variance
    Worst spread:     5.72% variance
    (Basis for results comparison)

  OGL-fix-nvidia-osx:
    Number of tests:  10
    Overall average:  11032.674771293528
    Best spread:      0.62% variance
    Worst spread:     8.14% variance
    Comparison to basis:
      Best result:      4659.95% of basis
      Worst result:     169.66% of basis
      Number of wins:   10
      Number of ties:   0
      Number of losses: 0

==========================================================
OSX 10.8.5, macbook pro retina, Intel HD Graphics 4000
http://cr.openjdk.java.net/~serb/8041129/J2DBench-osx/results-intel-osx.txt

Summary:
  OGL-base-intel-osx:
    Number of tests:  10
    Overall average:  3993.5366388495613
    Best spread:      0.65% variance
    Worst spread:     20.91% variance
    (Basis for results comparison)

  OGL-fix-intel-osx:
    Number of tests:  10
    Overall average:  10197.361705976433
    Best spread:      0.72% variance
    Worst spread:     38.4% variance
    Comparison to basis:
      Best result:      491.0% of basis
      Worst result:     108.61% of basis
      Number of wins:   10
      Number of ties:   0
      Number of losses: 0

Thanks to Anton for the initial version of the fix.


Reply via email to