Menu

#7 Minor error in to tpbo.cpp

open
None
5
2012-09-14
2011-09-14
No

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).

Discussion

  • Christopher John Pepper

    a replacement for the current tpbo.cpp

     
  • Christopher John Pepper

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

     
  • Brian Paul

    Brian Paul - 2012-03-05

    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;
      }
     

Log in to post a comment.