summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_tgsi.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-04-17 09:00:29 -0700
committerBrian Paul <[email protected]>2014-04-17 11:29:33 -0700
commit851645a3e7f06348d60180ec122b9ad0dc3cf432 (patch)
tree6ff45de67a75286fd7fa9ca94636f67f3887d9c8 /src/gallium/drivers/svga/svga_tgsi.h
parent615a356ee38d882e9f073dba0b8918a903094124 (diff)
svga: add VS code to set attribute W component to 1
There's a few 3-component vertex attribute formats that have no equivalent SVGA3D_DECLTYPE_x format. Previously, we had to use the swtnl code to handle them. This patch lets us use hwtnl for more vertex attribute types by fetching 3-component attributes as 4-component attributes and explicitly setting the W component to 1. This lets us handle PIPE_FORMAT_R16G16B16_SNORM/UNORM and PIPE_FORMAT_R8G8B8_UNORM vertex attribs without using the swtnl path. Fixes piglit normal3b3s GL_SHORT test. Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi.h')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi.h b/src/gallium/drivers/svga/svga_tgsi.h
index cb40560242a..e7a2a134ca5 100644
--- a/src/gallium/drivers/svga/svga_tgsi.h
+++ b/src/gallium/drivers/svga/svga_tgsi.h
@@ -50,6 +50,7 @@ struct svga_vs_compile_key
unsigned need_prescale:1;
unsigned allow_psiz:1;
unsigned adjust_attrib_range:16;
+ unsigned adjust_attrib_w_1:16;
};
struct svga_fs_compile_key