diff options
author | Brian Paul <[email protected]> | 2014-04-17 08:54:47 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-04-17 11:29:33 -0700 |
commit | 615a356ee38d882e9f073dba0b8918a903094124 (patch) | |
tree | b1950dc8b9eb0c612161ff371ef280dc083cd119 /src/gallium/drivers/svga/svga_context.h | |
parent | 52faafa17424a3842f150019a9d76ce626019d9f (diff) |
svga: implement support for signed byte vertex attributes
There's no SVGA3D_DECLTYPE that directly corresponds to
PIPE_FORMAT_R8G8B8_SNORM. Previously, we used the swtnl fallback
path to handle this but that's slow and causes invariance issues.
Now we fetch the attribute as SVGA3D_DECLTYPE_UBYTE4N and insert
some extra VS instructions to remap the attributes from the range
[0,1] to the range[-1,1].
Fixes Sauerbraten sw fallback.
Fixes piglit normal3b3s-invariance test.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_context.h')
-rw-r--r-- | src/gallium/drivers/svga/svga_context.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h index 79cecbf3221..55642773f89 100644 --- a/src/gallium/drivers/svga/svga_context.h +++ b/src/gallium/drivers/svga/svga_context.h @@ -201,6 +201,7 @@ struct svga_velems_state { unsigned count; struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS]; SVGA3dDeclType decl_type[PIPE_MAX_ATTRIBS]; /**< vertex attrib formats */ + unsigned adjust_attrib_range; /* bitmask of attrs needing range adjustment */ }; /* Use to calculate differences between state emitted to hardware and |