From 1334c21eee8c5b0b216895934e7a8e1c08c6f510 Mon Sep 17 00:00:00 2001 From: jvanverth Date: Thu, 18 Dec 2014 05:44:55 -0800 Subject: One more pass at getting half float texture configs correct. Added in check for sized internal format. Made choice between RED and ALPHA orthogonal to HALF_FLOAT and HALF_FLOAT_OES. Enabled rendertarget support on ES 2.0. Review URL: https://codereview.chromium.org/805033002 --- tests/FloatingPointTextureTest.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/FloatingPointTextureTest.cpp') diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp index 5cf1f0a449..346c737992 100644 --- a/tests/FloatingPointTextureTest.cpp +++ b/tests/FloatingPointTextureTest.cpp @@ -90,7 +90,7 @@ DEF_GPUTEST(HalfFloatTextureTest, reporter, factory) { controlPixelData[i + 2] = SK_HalfEpsilon; controlPixelData[i + 3] = 0x6800; // 2^11 } - + for (int origin = 0; origin < 2; ++origin) { int glCtxTypeCnt = 1; glCtxTypeCnt = GrContextFactory::kGLContextTypeCnt; @@ -102,7 +102,7 @@ DEF_GPUTEST(HalfFloatTextureTest, reporter, factory) { desc.fConfig = kAlpha_half_GrPixelConfig; desc.fOrigin = 0 == origin ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; - + GrContext* context = NULL; GrContextFactory::GLContextType type = static_cast(glCtxType); @@ -113,16 +113,16 @@ DEF_GPUTEST(HalfFloatTextureTest, reporter, factory) { if (NULL == context){ continue; } - + SkAutoTUnref fpTexture(context->createUncachedTexture(desc, NULL, 0)); - + // 16-bit floating point textures are NOT supported everywhere if (NULL == fpTexture) { continue; } - + // write square fpTexture->writePixels(0, 0, DEV_W, DEV_H, desc.fConfig, controlPixelData, 0); fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer, 0); -- cgit v1.2.3