Lines Matching refs:access

245 ConstPixelBufferAccess getSubregion (const ConstPixelBufferAccess& access, int x, int y, int z, int…  in getSubregion()  argument
247 DE_ASSERT(de::inBounds(x, 0, access.getWidth())); in getSubregion()
248 DE_ASSERT(de::inRange(x+width, x+1, access.getWidth())); in getSubregion()
250 DE_ASSERT(de::inBounds(y, 0, access.getHeight())); in getSubregion()
251 DE_ASSERT(de::inRange(y+height, y+1, access.getHeight())); in getSubregion()
253 DE_ASSERT(de::inBounds(z, 0, access.getDepth())); in getSubregion()
254 DE_ASSERT(de::inRange(z+depth, z+1, access.getDepth())); in getSubregion()
256 …return ConstPixelBufferAccess(access.getFormat(), tcu::IVec3(width, height, depth), access.getPitc… in getSubregion()
257 …(const deUint8*)access.getDataPtr() + access.getPixelPitch()*x + access.getRowPitch()*y + access.g… in getSubregion()
271 PixelBufferAccess getSubregion (const PixelBufferAccess& access, int x, int y, int z, int width, in… in getSubregion() argument
273 DE_ASSERT(de::inBounds(x, 0, access.getWidth())); in getSubregion()
274 DE_ASSERT(de::inRange(x+width, x+1, access.getWidth())); in getSubregion()
276 DE_ASSERT(de::inBounds(y, 0, access.getHeight())); in getSubregion()
277 DE_ASSERT(de::inRange(y+height, y+1, access.getHeight())); in getSubregion()
279 DE_ASSERT(de::inBounds(z, 0, access.getDepth())); in getSubregion()
280 DE_ASSERT(de::inRange(z+depth, z+1, access.getDepth())); in getSubregion()
282 return PixelBufferAccess(access.getFormat(), tcu::IVec3(width, height, depth), access.getPitch(), in getSubregion()
283 …(deUint8*)access.getDataPtr() + access.getPixelPitch()*x + access.getRowPitch()*y + access.getSlic… in getSubregion()
295 PixelBufferAccess getSubregion (const PixelBufferAccess& access, int x, int y, int width, int heigh… in getSubregion() argument
297 return getSubregion(access, x, y, 0, width, height, 1); in getSubregion()
309 ConstPixelBufferAccess getSubregion (const ConstPixelBufferAccess& access, int x, int y, int width,… in getSubregion() argument
311 return getSubregion(access, x, y, 0, width, height, 1); in getSubregion()
319 PixelBufferAccess flipYAccess (const PixelBufferAccess& access) in flipYAccess() argument
321 const int rowPitch = access.getRowPitch(); in flipYAccess()
322 const int offsetToLast = rowPitch*(access.getHeight()-1); in flipYAccess()
323 const tcu::IVec3 pitch (access.getPixelPitch(), -rowPitch, access.getSlicePitch()); in flipYAccess()
325 …return PixelBufferAccess(access.getFormat(), access.getSize(), pitch, (deUint8*)access.getDataPtr(… in flipYAccess()
333 ConstPixelBufferAccess flipYAccess (const ConstPixelBufferAccess& access) in flipYAccess() argument
335 const int rowPitch = access.getRowPitch(); in flipYAccess()
336 const int offsetToLast = rowPitch*(access.getHeight()-1); in flipYAccess()
337 const tcu::IVec3 pitch (access.getPixelPitch(), -rowPitch, access.getSlicePitch()); in flipYAccess()
339 …return ConstPixelBufferAccess(access.getFormat(), access.getSize(), pitch, (deUint8*)access.getDat… in flipYAccess()
696 void clear (const PixelBufferAccess& access, const Vec4& color) in clear() argument
698 const int pixelSize = access.getFormat().getPixelSize(); in clear()
699 const int pixelPitch = access.getPixelPitch(); in clear()
702 if (access.getWidth()*access.getHeight()*access.getDepth() >= CLEAR_OPTIMIZE_THRESHOLD && in clear()
712 PixelBufferAccess(access.getFormat(), 1, 1, 1, 0, 0, &pixel.u8[0]).setPixel(color, 0, 0); in clear()
714 for (int z = 0; z < access.getDepth(); z++) in clear()
715 for (int y = 0; y < access.getHeight(); y++) in clear()
716 fillRow(access, y, z, pixelSize, &pixel.u8[0]); in clear()
720 for (int z = 0; z < access.getDepth(); z++) in clear()
721 for (int y = 0; y < access.getHeight(); y++) in clear()
722 for (int x = 0; x < access.getWidth(); x++) in clear()
723 access.setPixel(color, x, y, z); in clear()
727 void clear (const PixelBufferAccess& access, const IVec4& color) in clear() argument
729 const int pixelSize = access.getFormat().getPixelSize(); in clear()
730 const int pixelPitch = access.getPixelPitch(); in clear()
733 if (access.getWidth()*access.getHeight()*access.getDepth() >= CLEAR_OPTIMIZE_THRESHOLD && in clear()
743 PixelBufferAccess(access.getFormat(), 1, 1, 1, 0, 0, &pixel.u8[0]).setPixel(color, 0, 0); in clear()
745 for (int z = 0; z < access.getDepth(); z++) in clear()
746 for (int y = 0; y < access.getHeight(); y++) in clear()
747 fillRow(access, y, z, pixelSize, &pixel.u8[0]); in clear()
751 for (int z = 0; z < access.getDepth(); z++) in clear()
752 for (int y = 0; y < access.getHeight(); y++) in clear()
753 for (int x = 0; x < access.getWidth(); x++) in clear()
754 access.setPixel(color, x, y, z); in clear()
758 void clear (const PixelBufferAccess& access, const UVec4& color) in clear() argument
760 clear(access, color.cast<deInt32>()); in clear()
763 void clearDepth (const PixelBufferAccess& access, float depth) in clearDepth() argument
765 …DE_ASSERT(access.getFormat().order == TextureFormat::DS || access.getFormat().order == TextureForm… in clearDepth()
767 …clear(getEffectiveDepthStencilAccess(access, Sampler::MODE_DEPTH), tcu::Vec4(depth, 0.0f, 0.0f, 0.… in clearDepth()
770 void clearStencil (const PixelBufferAccess& access, int stencil) in clearStencil() argument
772 …DE_ASSERT(access.getFormat().order == TextureFormat::DS || access.getFormat().order == TextureForm… in clearStencil()
774 …clear(getEffectiveDepthStencilAccess(access, Sampler::MODE_STENCIL), tcu::UVec4(stencil, 0u, 0u, 0… in clearStencil()
777 static void fillWithComponentGradients1D (const PixelBufferAccess& access, const Vec4& minVal, cons… in fillWithComponentGradients1D() argument
779 DE_ASSERT(access.getHeight() == 1); in fillWithComponentGradients1D()
780 for (int x = 0; x < access.getWidth(); x++) in fillWithComponentGradients1D()
782 float s = ((float)x + 0.5f) / (float)access.getWidth(); in fillWithComponentGradients1D()
789 access.setPixel(tcu::Vec4(r, g, b, a), x, 0); in fillWithComponentGradients1D()
793 static void fillWithComponentGradients2D (const PixelBufferAccess& access, const Vec4& minVal, cons… in fillWithComponentGradients2D() argument
795 for (int y = 0; y < access.getHeight(); y++) in fillWithComponentGradients2D()
797 for (int x = 0; x < access.getWidth(); x++) in fillWithComponentGradients2D()
799 float s = ((float)x + 0.5f) / (float)access.getWidth(); in fillWithComponentGradients2D()
800 float t = ((float)y + 0.5f) / (float)access.getHeight(); in fillWithComponentGradients2D()
807 access.setPixel(tcu::Vec4(r, g, b, a), x, y); in fillWithComponentGradients2D()
835 void fillWithComponentGradients (const PixelBufferAccess& access, const Vec4& minVal, const Vec4& m… in fillWithComponentGradients() argument
837 if (isCombinedDepthStencilType(access.getFormat().type)) in fillWithComponentGradients()
839 …const bool hasDepth = access.getFormat().order == tcu::TextureFormat::DS || access.getFormat().or… in fillWithComponentGradients()
840 …const bool hasStencil = access.getFormat().order == tcu::TextureFormat::DS || access.getFormat().o… in fillWithComponentGradients()
846 …fillWithComponentGradients(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_DEPTH), minVa… in fillWithComponentGradients()
848 …fillWithComponentGradients(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_STENCIL), min… in fillWithComponentGradients()
852 if (access.getHeight() == 1 && access.getDepth() == 1) in fillWithComponentGradients()
853 fillWithComponentGradients1D(access, minVal, maxVal); in fillWithComponentGradients()
854 else if (access.getDepth() == 1) in fillWithComponentGradients()
855 fillWithComponentGradients2D(access, minVal, maxVal); in fillWithComponentGradients()
857 fillWithComponentGradients3D(access, minVal, maxVal); in fillWithComponentGradients()
861 static void fillWithGrid1D (const PixelBufferAccess& access, int cellSize, const Vec4& colorA, cons… in fillWithGrid1D() argument
863 for (int x = 0; x < access.getWidth(); x++) in fillWithGrid1D()
868 access.setPixel(colorB, x, 0); in fillWithGrid1D()
870 access.setPixel(colorA, x, 0); in fillWithGrid1D()
874 static void fillWithGrid2D (const PixelBufferAccess& access, int cellSize, const Vec4& colorA, cons… in fillWithGrid2D() argument
876 for (int y = 0; y < access.getHeight(); y++) in fillWithGrid2D()
878 for (int x = 0; x < access.getWidth(); x++) in fillWithGrid2D()
884 access.setPixel(colorB, x, y); in fillWithGrid2D()
886 access.setPixel(colorA, x, y); in fillWithGrid2D()
891 static void fillWithGrid3D (const PixelBufferAccess& access, int cellSize, const Vec4& colorA, cons… in fillWithGrid3D() argument
893 for (int z = 0; z < access.getDepth(); z++) in fillWithGrid3D()
895 for (int y = 0; y < access.getHeight(); y++) in fillWithGrid3D()
897 for (int x = 0; x < access.getWidth(); x++) in fillWithGrid3D()
904 access.setPixel(colorB, x, y, z); in fillWithGrid3D()
906 access.setPixel(colorA, x, y, z); in fillWithGrid3D()
912 void fillWithGrid (const PixelBufferAccess& access, int cellSize, const Vec4& colorA, const Vec4& c… in fillWithGrid() argument
914 if (isCombinedDepthStencilType(access.getFormat().type)) in fillWithGrid()
916 …const bool hasDepth = access.getFormat().order == tcu::TextureFormat::DS || access.getFormat().or… in fillWithGrid()
917 …const bool hasStencil = access.getFormat().order == tcu::TextureFormat::DS || access.getFormat().o… in fillWithGrid()
923 …fillWithGrid(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_DEPTH), cellSize, colorA, c… in fillWithGrid()
925 …fillWithGrid(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_STENCIL), cellSize, colorA.… in fillWithGrid()
929 if (access.getHeight() == 1 && access.getDepth() == 1) in fillWithGrid()
930 fillWithGrid1D(access, cellSize, colorA, colorB); in fillWithGrid()
931 else if (access.getDepth() == 1) in fillWithGrid()
932 fillWithGrid2D(access, cellSize, colorA, colorB); in fillWithGrid()
934 fillWithGrid3D(access, cellSize, colorA, colorB); in fillWithGrid()
938 void fillWithRepeatableGradient (const PixelBufferAccess& access, const Vec4& colorA, const Vec4& c… in fillWithRepeatableGradient() argument
940 for (int y = 0; y < access.getHeight(); y++) in fillWithRepeatableGradient()
942 for (int x = 0; x < access.getWidth(); x++) in fillWithRepeatableGradient()
944 float s = ((float)x + 0.5f) / (float)access.getWidth(); in fillWithRepeatableGradient()
945 float t = ((float)y + 0.5f) / (float)access.getHeight(); in fillWithRepeatableGradient()
951 access.setPixel(linearInterpolate(p, colorA, colorB), x, y); in fillWithRepeatableGradient()
1117 void estimatePixelValueRange (const ConstPixelBufferAccess& access, Vec4& minVal, Vec4& maxVal) in estimatePixelValueRange() argument
1119 const TextureFormat& format = access.getFormat(); in estimatePixelValueRange()
1140 for (int z = 0; z < access.getDepth(); z += 2) in estimatePixelValueRange()
1142 for (int y = 0; y < access.getHeight(); y += 2) in estimatePixelValueRange()
1144 for (int x = 0; x < access.getWidth(); x += 2) in estimatePixelValueRange()
1146 Vec4 p = access.getPixel(x, y, z); in estimatePixelValueRange()
1164 void computePixelScaleBias (const ConstPixelBufferAccess& access, Vec4& scale, Vec4& bias) in computePixelScaleBias() argument
1167 estimatePixelValueRange(access, minVal, maxVal); in computePixelScaleBias()