<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 12, 2019 at 5:57 AM Iago Toral Quiroga <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is available since gen8.<br>
<br>
v2: restore previously existing assertion.<br>
<br>
v3: don't use separate tables for gen7 and gen8, just assert that we<br>
don't use half-float before gen8 (Matt)<br>
<br>
Reviewed-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com" target="_blank">topi.pohjolainen@intel.com</a>> (v1)<br>
---<br>
src/intel/compiler/brw_reg_type.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/intel/compiler/brw_reg_type.c b/src/intel/compiler/brw_reg_type.c<br>
index 60240ba1513..feabee2f53b 100644<br>
--- a/src/intel/compiler/brw_reg_type.c<br>
+++ b/src/intel/compiler/brw_reg_type.c<br>
@@ -138,6 +138,7 @@ enum hw_3src_reg_type {<br>
GEN7_3SRC_TYPE_D = 1,<br>
GEN7_3SRC_TYPE_UD = 2,<br>
GEN7_3SRC_TYPE_DF = 3,<br>
+ GEN8_3SRC_TYPE_HF = 4,<br>
<br>
/** When ExecutionDatatype is 1: @{ */<br>
GEN10_ALIGN1_3SRC_REG_TYPE_HF = 0b000,<br>
@@ -166,6 +167,7 @@ static const struct hw_3src_type {<br>
[BRW_REGISTER_TYPE_D] = { GEN7_3SRC_TYPE_D },<br>
[BRW_REGISTER_TYPE_UD] = { GEN7_3SRC_TYPE_UD },<br>
[BRW_REGISTER_TYPE_DF] = { GEN7_3SRC_TYPE_DF },<br>
+ [BRW_REGISTER_TYPE_HF] = { GEN8_3SRC_TYPE_HF },<br>
}, gen10_hw_3src_align1_type[] = {<br>
#define E(x) BRW_ALIGN1_3SRC_EXEC_TYPE_##x<br>
[0 ... BRW_REGISTER_TYPE_LAST] = { INVALID },<br>
@@ -258,6 +260,7 @@ brw_reg_type_to_a16_hw_3src_type(const struct gen_device_info *devinfo,<br>
enum brw_reg_type type)<br>
{<br>
assert(type < ARRAY_SIZE(gen7_hw_3src_type));<br>
+ assert(devinfo->gen >= 8 || type != BRW_REGISTER_TYPE_HF);<br>
assert(gen7_hw_3src_type[type].reg_type != (enum hw_3src_reg_type)INVALID);<br>
return gen7_hw_3src_type[type].reg_type;<br>
}<br>
@@ -283,6 +286,7 @@ enum brw_reg_type<br>
brw_a16_hw_3src_type_to_reg_type(const struct gen_device_info *devinfo,<br>
unsigned hw_type)<br>
{<br>
+ assert(devinfo->gen >= 8 || hw_type != GEN8_3SRC_TYPE_HF);<br>
for (enum brw_reg_type i = 0; i <= BRW_REGISTER_TYPE_LAST; i++) {<br>
if (gen7_hw_3src_type[i].reg_type == hw_type) {<br>
return i;<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></blockquote></div>