#7 Minor error in to tpbo.cpp

Brian Paul

The variable "max" correctly poles the maximum supported pixel buffer size from our chip. However later the variable "size" is checked against the hard coded value 256. Our driver supports much higher then this and was therefore failing this test. changing the hardc oded value "256" to max allows our driver to pass. If however the intention was to check the driver could support at least 256 maybe the line if(size != max) could be changed to if(size < 256).


  • a replacement for the current tpbo.cpp

  • Sorry to assign you out of the blue brian, i just wanted to get this moving again

  • Brian Paul
    Brian Paul

    I don't quite follow what you're saying. We don't clamp max to 256 anywhere. The i%256 expression is used for initializing the values in the pixel maps.
    I think there's a problem at line 439 though. Can you try this patch:

    diff --git a/src/glean/tpbo.cpp b/src/glean/tpbo.cpp
    index 85a7dba..a13398f 100644
    --- a/src/glean/tpbo.cpp
    +++ b/src/glean/tpbo.cpp
    @@ -436,7 +436,7 @@ bool PBOTest::testPixelMap(void)

          for (i = 0; i < max; i++) {
    • if (pboMem[i] != (255 - i)) {
    • if (pboMem[i] != max - i - 1) {
      REPORT_FAILURE("get PixelMap failed");
      return false;