gtcasl / gpuocelot

GPUOCelot: A dynamic compilation framework for PTX
http://gpuocelot.gatech.edu/
BSD 3-Clause "New" or "Revised" License
280 stars 69 forks source link

Software texture sampling off by one pixel #33

Closed jwang323 closed 9 years ago

jwang323 commented 9 years ago

From arkerr@gmail.com on November 05, 2009 14:06:39

To reproduce problem:

  1. Execute 'SimpleTexture' and 'BicubicTexture' applications compiled using the native CUDA toolchain executing on the GPU.
  2. Copy their outputs into the 'data/' directory to be used as reference inputs for GPU Ocelot.
  3. Execute SimpleTexture and BicubicTexture with emulated and LLVM devices.

The expected output should match the reference inputs. Instead, the output consists of images shifted by approximately one pixel.

The current reference inputs were produced by GPU Ocelot and not provided by the CUDA toolchain. We should see this as a defect in the texture sampling procedures used by GPU Ocelot's emulated and translated devices.

Original issue: http://code.google.com/p/gpuocelot/issues/detail?id=34

jwang323 commented 9 years ago

From gregory....@gatech.edu on May 04, 2010 06:28:27

It turns out that pixels are centered dead center rather than on the edge of a grid. Realigning the implementation of texture sampling fixed this problem.

Status: Done