Mesa (master): ilo: fix format of edge flag pointer
Chia-I Wu
olv at kemper.freedesktop.org
Tue Sep 30 08:47:24 UTC 2014
Module: Mesa
Branch: master
Commit: 594e1a2f4b67ceb01d76980f54db40a4e7d56c40
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=594e1a2f4b67ceb01d76980f54db40a4e7d56c40
Author: Chia-I Wu <olvaffe at gmail.com>
Date: Tue Sep 30 16:21:15 2014 +0800
ilo: fix format of edge flag pointer
The VE format of edge flag pointers was changed in
780ce576bb1781f027797039693b98253ee4813e.
Signed-off-by: Chia-I Wu <olvaffe at gmail.com>
---
src/gallium/drivers/ilo/ilo_state_gen6.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/ilo/ilo_state_gen6.c b/src/gallium/drivers/ilo/ilo_state_gen6.c
index 2da2de2..0192c60 100644
--- a/src/gallium/drivers/ilo/ilo_state_gen6.c
+++ b/src/gallium/drivers/ilo/ilo_state_gen6.c
@@ -354,12 +354,12 @@ ilo_gpe_set_ve_edgeflag(const struct ilo_dev_info *dev,
cso->payload[0] |= GEN6_VE_STATE_DW0_EDGE_FLAG_ENABLE;
/*
- * Edge flags have format GEN6_FORMAT_R8_UINT when defined via
+ * Edge flags have format GEN6_FORMAT_R8_USCALED when defined via
* glEdgeFlagPointer(), and format GEN6_FORMAT_R32_FLOAT when defined
* via glEdgeFlag(), as can be seen in vbo_attrib_tmp.h.
*
* Since all the hardware cares about is whether the flags are zero or not,
- * we can treat them as GEN6_FORMAT_R32_UINT in the latter case.
+ * we can treat them as the corresponding _UINT formats.
*/
format = GEN_EXTRACT(cso->payload[0], GEN6_VE_STATE_DW0_FORMAT);
cso->payload[0] &= ~GEN6_VE_STATE_DW0_FORMAT__MASK;
@@ -368,8 +368,10 @@ ilo_gpe_set_ve_edgeflag(const struct ilo_dev_info *dev,
case GEN6_FORMAT_R32_FLOAT:
format = GEN6_FORMAT_R32_UINT;
break;
+ case GEN6_FORMAT_R8_USCALED:
+ format = GEN6_FORMAT_R8_UINT;
+ break;
default:
- assert(format == GEN6_FORMAT_R8_UINT);
break;
}
More information about the mesa-commit
mailing list