diff options
author | Mike Klein <mtklein@chromium.org> | 2016-10-05 09:36:26 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-05 13:56:40 +0000 |
commit | d0ccb57ec45f354d795d714ae6be6cdb86e21a54 (patch) | |
tree | f287e8d3ce596bb082f05e05a57631119f3cab2b /tests/SkRasterPipelineTest.cpp | |
parent | c876e99d4c814547aec80b84dd65179c6924aff3 (diff) |
looks like red and blue start wrong (more unit test debugging)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3001
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN-Trybot
Change-Id: I8d26b5484a2bf67d5d5891475640970046e470d8
Reviewed-on: https://skia-review.googlesource.com/3001
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/SkRasterPipelineTest.cpp')
-rw-r--r-- | tests/SkRasterPipelineTest.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/SkRasterPipelineTest.cpp b/tests/SkRasterPipelineTest.cpp index aa9595be46..2014671933 100644 --- a/tests/SkRasterPipelineTest.cpp +++ b/tests/SkRasterPipelineTest.cpp @@ -17,6 +17,12 @@ DEF_TEST(SkRasterPipeline, r) { blue = SkFloatToHalf_finite_ftz({ 0.0f, 0.0f, 0.5f, 0.5f }), result = { 1, 2, 3, 4 }; + uint64_t bits; + memcpy(&bits, &red, 8); + SkDebugf("SkRasterPipeline red: 0x%016llx, want 0x3c00000000003c00\n", bits); + memcpy(&bits, &blue, 8); + SkDebugf("SkRasterPipeline blue: 0x%016llx, want 0x3800380000000000\n", bits); + SkRasterPipeline p; p.append(SkRasterPipeline::load_s_f16, &blue); p.append(SkRasterPipeline::load_d_f16, &red); @@ -26,9 +32,8 @@ DEF_TEST(SkRasterPipeline, r) { Sk4f f = SkHalfToFloat_finite_ftz(result); - uint64_t bits; memcpy(&bits, &result, 8); - SkDebugf("SkRasterPipeline: 0x%016llx\n", bits); + SkDebugf("SkRasterPipeline result: 0x%016llx, want 0x3c00380000003800\n", bits); // We should see half-intensity magenta. REPORTER_ASSERT(r, f[0] == 0.5f); |