From 3785471ff641b7ec4218a32fcf76363b9ac81bab Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 26 Jun 2018 11:43:06 -0400 Subject: basic first pass at RGBA F32 support Draws basically the same as f16. The existing load_f32, load_f32_dst, and store_f32 stages all had the same bug that we'd never noticed because dy was always 0 until now. Change-Id: Ibbd393fa1acc5df414be4cdef0f5a9d11dcccdb3 Reviewed-on: https://skia-review.googlesource.com/137585 Commit-Queue: Mike Klein Reviewed-by: Brian Osman Reviewed-by: Mike Reed --- src/opts/SkRasterPipeline_opts.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/opts') diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h index fac5d1b93b..2431ad78f9 100644 --- a/src/opts/SkRasterPipeline_opts.h +++ b/src/opts/SkRasterPipeline_opts.h @@ -1712,15 +1712,23 @@ STAGE(store_u16_be, const SkJumper_MemoryCtx* ctx) { } STAGE(load_f32, const SkJumper_MemoryCtx* ctx) { - auto ptr = ptr_at_xy(ctx, 4*dx,dy); + auto ptr = ptr_at_xy(ctx, 4*dx,4*dy); load4(ptr,tail, &r,&g,&b,&a); } STAGE(load_f32_dst, const SkJumper_MemoryCtx* ctx) { - auto ptr = ptr_at_xy(ctx, 4*dx,dy); + auto ptr = ptr_at_xy(ctx, 4*dx,4*dy); load4(ptr,tail, &dr,&dg,&db,&da); } +STAGE(gather_f32, const SkJumper_GatherCtx* ctx) { + const float* ptr; + U32 ix = ix_and_ptr(&ptr, ctx, r,g); + r = gather(ptr, 4*ix + 0); + g = gather(ptr, 4*ix + 1); + b = gather(ptr, 4*ix + 2); + a = gather(ptr, 4*ix + 3); +} STAGE(store_f32, const SkJumper_MemoryCtx* ctx) { - auto ptr = ptr_at_xy(ctx, 4*dx,dy); + auto ptr = ptr_at_xy(ctx, 4*dx,4*dy); store4(ptr,tail, r,g,b,a); } -- cgit v1.2.3