Lines Matching refs:access

250 ConstPixelBufferAccess getSubregion (const ConstPixelBufferAccess& access, int x, int y, int z, int…  in getSubregion()  argument
252 DE_ASSERT(de::inBounds(x, 0, access.getWidth())); in getSubregion()
253 DE_ASSERT(de::inRange(x+width, x+1, access.getWidth())); in getSubregion()
255 DE_ASSERT(de::inBounds(y, 0, access.getHeight())); in getSubregion()
256 DE_ASSERT(de::inRange(y+height, y+1, access.getHeight())); in getSubregion()
258 DE_ASSERT(de::inBounds(z, 0, access.getDepth())); in getSubregion()
259 DE_ASSERT(de::inRange(z+depth, z+1, access.getDepth())); in getSubregion()
261 …return ConstPixelBufferAccess(access.getFormat(), tcu::IVec3(width, height, depth), access.getPitc… in getSubregion()
262 …(const deUint8*)access.getDataPtr() + access.getPixelPitch()*x + access.getRowPitch()*y + access.g… in getSubregion()
276 PixelBufferAccess getSubregion (const PixelBufferAccess& access, int x, int y, int z, int width, in… in getSubregion() argument
278 DE_ASSERT(de::inBounds(x, 0, access.getWidth())); in getSubregion()
279 DE_ASSERT(de::inRange(x+width, x+1, access.getWidth())); in getSubregion()
281 DE_ASSERT(de::inBounds(y, 0, access.getHeight())); in getSubregion()
282 DE_ASSERT(de::inRange(y+height, y+1, access.getHeight())); in getSubregion()
284 DE_ASSERT(de::inBounds(z, 0, access.getDepth())); in getSubregion()
285 DE_ASSERT(de::inRange(z+depth, z+1, access.getDepth())); in getSubregion()
287 return PixelBufferAccess(access.getFormat(), tcu::IVec3(width, height, depth), access.getPitch(), in getSubregion()
288 …(deUint8*)access.getDataPtr() + access.getPixelPitch()*x + access.getRowPitch()*y + access.getSlic… in getSubregion()
300 PixelBufferAccess getSubregion (const PixelBufferAccess& access, int x, int y, int width, int heigh… in getSubregion() argument
302 return getSubregion(access, x, y, 0, width, height, 1); in getSubregion()
314 ConstPixelBufferAccess getSubregion (const ConstPixelBufferAccess& access, int x, int y, int width,… in getSubregion() argument
316 return getSubregion(access, x, y, 0, width, height, 1); in getSubregion()
324 PixelBufferAccess flipYAccess (const PixelBufferAccess& access) in flipYAccess() argument
326 const int rowPitch = access.getRowPitch(); in flipYAccess()
327 const int offsetToLast = rowPitch*(access.getHeight()-1); in flipYAccess()
328 const tcu::IVec3 pitch (access.getPixelPitch(), -rowPitch, access.getSlicePitch()); in flipYAccess()
330 …return PixelBufferAccess(access.getFormat(), access.getSize(), pitch, (deUint8*)access.getDataPtr(… in flipYAccess()
338 ConstPixelBufferAccess flipYAccess (const ConstPixelBufferAccess& access) in flipYAccess() argument
340 const int rowPitch = access.getRowPitch(); in flipYAccess()
341 const int offsetToLast = rowPitch*(access.getHeight()-1); in flipYAccess()
342 const tcu::IVec3 pitch (access.getPixelPitch(), -rowPitch, access.getSlicePitch()); in flipYAccess()
344 …return ConstPixelBufferAccess(access.getFormat(), access.getSize(), pitch, (deUint8*)access.getDat… in flipYAccess()
706 void clear (const PixelBufferAccess& access, const Vec4& color) in clear() argument
708 const int pixelSize = access.getFormat().getPixelSize(); in clear()
709 const int pixelPitch = access.getPixelPitch(); in clear()
712 if (access.getWidth()*access.getHeight()*access.getDepth() >= CLEAR_OPTIMIZE_THRESHOLD && in clear()
722 PixelBufferAccess(access.getFormat(), 1, 1, 1, 0, 0, &pixel.u8[0]).setPixel(color, 0, 0); in clear()
724 for (int z = 0; z < access.getDepth(); z++) in clear()
725 for (int y = 0; y < access.getHeight(); y++) in clear()
726 fillRow(access, y, z, pixelSize, &pixel.u8[0]); in clear()
730 for (int z = 0; z < access.getDepth(); z++) in clear()
731 for (int y = 0; y < access.getHeight(); y++) in clear()
732 for (int x = 0; x < access.getWidth(); x++) in clear()
733 access.setPixel(color, x, y, z); in clear()
737 void clear (const PixelBufferAccess& access, const IVec4& color) in clear() argument
739 const int pixelSize = access.getFormat().getPixelSize(); in clear()
740 const int pixelPitch = access.getPixelPitch(); in clear()
743 if (access.getWidth()*access.getHeight()*access.getDepth() >= CLEAR_OPTIMIZE_THRESHOLD && in clear()
753 PixelBufferAccess(access.getFormat(), 1, 1, 1, 0, 0, &pixel.u8[0]).setPixel(color, 0, 0); in clear()
755 for (int z = 0; z < access.getDepth(); z++) in clear()
756 for (int y = 0; y < access.getHeight(); y++) in clear()
757 fillRow(access, y, z, pixelSize, &pixel.u8[0]); in clear()
761 for (int z = 0; z < access.getDepth(); z++) in clear()
762 for (int y = 0; y < access.getHeight(); y++) in clear()
763 for (int x = 0; x < access.getWidth(); x++) in clear()
764 access.setPixel(color, x, y, z); in clear()
768 void clear (const PixelBufferAccess& access, const UVec4& color) in clear() argument
770 clear(access, color.cast<deInt32>()); in clear()
773 void clearDepth (const PixelBufferAccess& access, float depth) in clearDepth() argument
775 …DE_ASSERT(access.getFormat().order == TextureFormat::DS || access.getFormat().order == TextureForm… in clearDepth()
777 …clear(getEffectiveDepthStencilAccess(access, Sampler::MODE_DEPTH), tcu::Vec4(depth, 0.0f, 0.0f, 0.… in clearDepth()
780 void clearStencil (const PixelBufferAccess& access, int stencil) in clearStencil() argument
782 …DE_ASSERT(access.getFormat().order == TextureFormat::DS || access.getFormat().order == TextureForm… in clearStencil()
784 …clear(getEffectiveDepthStencilAccess(access, Sampler::MODE_STENCIL), tcu::UVec4(stencil, 0u, 0u, 0… in clearStencil()
787 static void fillWithComponentGradients1D (const PixelBufferAccess& access, const Vec4& minVal, cons… in fillWithComponentGradients1D() argument
789 DE_ASSERT(access.getHeight() == 1); in fillWithComponentGradients1D()
790 for (int x = 0; x < access.getWidth(); x++) in fillWithComponentGradients1D()
792 float s = ((float)x + 0.5f) / (float)access.getWidth(); in fillWithComponentGradients1D()
799 access.setPixel(tcu::Vec4(r, g, b, a), x, 0); in fillWithComponentGradients1D()
803 static void fillWithComponentGradients2D (const PixelBufferAccess& access, const Vec4& minVal, cons… in fillWithComponentGradients2D() argument
805 for (int y = 0; y < access.getHeight(); y++) in fillWithComponentGradients2D()
807 for (int x = 0; x < access.getWidth(); x++) in fillWithComponentGradients2D()
809 float s = ((float)x + 0.5f) / (float)access.getWidth(); in fillWithComponentGradients2D()
810 float t = ((float)y + 0.5f) / (float)access.getHeight(); in fillWithComponentGradients2D()
817 access.setPixel(tcu::Vec4(r, g, b, a), x, y); in fillWithComponentGradients2D()
845 void fillWithComponentGradients (const PixelBufferAccess& access, const Vec4& minVal, const Vec4& m… in fillWithComponentGradients() argument
847 if (isCombinedDepthStencilType(access.getFormat().type)) in fillWithComponentGradients()
849 …const bool hasDepth = access.getFormat().order == tcu::TextureFormat::DS || access.getFormat().or… in fillWithComponentGradients()
850 …const bool hasStencil = access.getFormat().order == tcu::TextureFormat::DS || access.getFormat().o… in fillWithComponentGradients()
856 …fillWithComponentGradients(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_DEPTH), minVa… in fillWithComponentGradients()
858 …fillWithComponentGradients(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_STENCIL), min… in fillWithComponentGradients()
862 if (access.getHeight() == 1 && access.getDepth() == 1) in fillWithComponentGradients()
863 fillWithComponentGradients1D(access, minVal, maxVal); in fillWithComponentGradients()
864 else if (access.getDepth() == 1) in fillWithComponentGradients()
865 fillWithComponentGradients2D(access, minVal, maxVal); in fillWithComponentGradients()
867 fillWithComponentGradients3D(access, minVal, maxVal); in fillWithComponentGradients()
871 static void fillWithGrid1D (const PixelBufferAccess& access, int cellSize, const Vec4& colorA, cons… in fillWithGrid1D() argument
873 for (int x = 0; x < access.getWidth(); x++) in fillWithGrid1D()
878 access.setPixel(colorB, x, 0); in fillWithGrid1D()
880 access.setPixel(colorA, x, 0); in fillWithGrid1D()
884 static void fillWithGrid2D (const PixelBufferAccess& access, int cellSize, const Vec4& colorA, cons… in fillWithGrid2D() argument
886 for (int y = 0; y < access.getHeight(); y++) in fillWithGrid2D()
888 for (int x = 0; x < access.getWidth(); x++) in fillWithGrid2D()
894 access.setPixel(colorB, x, y); in fillWithGrid2D()
896 access.setPixel(colorA, x, y); in fillWithGrid2D()
901 static void fillWithGrid3D (const PixelBufferAccess& access, int cellSize, const Vec4& colorA, cons… in fillWithGrid3D() argument
903 for (int z = 0; z < access.getDepth(); z++) in fillWithGrid3D()
905 for (int y = 0; y < access.getHeight(); y++) in fillWithGrid3D()
907 for (int x = 0; x < access.getWidth(); x++) in fillWithGrid3D()
914 access.setPixel(colorB, x, y, z); in fillWithGrid3D()
916 access.setPixel(colorA, x, y, z); in fillWithGrid3D()
922 void fillWithGrid (const PixelBufferAccess& access, int cellSize, const Vec4& colorA, const Vec4& c… in fillWithGrid() argument
924 if (isCombinedDepthStencilType(access.getFormat().type)) in fillWithGrid()
926 …const bool hasDepth = access.getFormat().order == tcu::TextureFormat::DS || access.getFormat().or… in fillWithGrid()
927 …const bool hasStencil = access.getFormat().order == tcu::TextureFormat::DS || access.getFormat().o… in fillWithGrid()
933 …fillWithGrid(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_DEPTH), cellSize, colorA, c… in fillWithGrid()
935 …fillWithGrid(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_STENCIL), cellSize, colorA.… in fillWithGrid()
939 if (access.getHeight() == 1 && access.getDepth() == 1) in fillWithGrid()
940 fillWithGrid1D(access, cellSize, colorA, colorB); in fillWithGrid()
941 else if (access.getDepth() == 1) in fillWithGrid()
942 fillWithGrid2D(access, cellSize, colorA, colorB); in fillWithGrid()
944 fillWithGrid3D(access, cellSize, colorA, colorB); in fillWithGrid()
948 void fillWithRepeatableGradient (const PixelBufferAccess& access, const Vec4& colorA, const Vec4& c… in fillWithRepeatableGradient() argument
950 for (int y = 0; y < access.getHeight(); y++) in fillWithRepeatableGradient()
952 for (int x = 0; x < access.getWidth(); x++) in fillWithRepeatableGradient()
954 float s = ((float)x + 0.5f) / (float)access.getWidth(); in fillWithRepeatableGradient()
955 float t = ((float)y + 0.5f) / (float)access.getHeight(); in fillWithRepeatableGradient()
961 access.setPixel(linearInterpolate(p, colorA, colorB), x, y); in fillWithRepeatableGradient()
1127 void estimatePixelValueRange (const ConstPixelBufferAccess& access, Vec4& minVal, Vec4& maxVal) in estimatePixelValueRange() argument
1129 const TextureFormat& format = access.getFormat(); in estimatePixelValueRange()
1150 for (int z = 0; z < access.getDepth(); z += 2) in estimatePixelValueRange()
1152 for (int y = 0; y < access.getHeight(); y += 2) in estimatePixelValueRange()
1154 for (int x = 0; x < access.getWidth(); x += 2) in estimatePixelValueRange()
1156 Vec4 p = access.getPixel(x, y, z); in estimatePixelValueRange()
1174 void computePixelScaleBias (const ConstPixelBufferAccess& access, Vec4& scale, Vec4& bias) in computePixelScaleBias() argument
1177 estimatePixelValueRange(access, minVal, maxVal); in computePixelScaleBias()