<div dir="ltr">s/lcd2dms/ld2dms/g in various places in this patch and others.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 18, 2015 at 4:00 AM, Neil Roberts <span dir="ltr"><<a href="mailto:neil@linux.intel.com" target="_blank">neil@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In order to support 16x MSAA, skl+ has a wider version of lcd2dms that<br>
takes two parameters for the MCS data. The MCS data in the response<br>
still fits in a single register so we just need to ensure we copy both<br>
values rather than just the lower one.<br>
---<br>
src/mesa/drivers/dri/i965/brw_vec4.cpp | 1 +<br>
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 5 +++++<br>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 14 ++++++++++++--<br>
3 files changed, 18 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp<br>
index ed49cd3..22c8d01 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp<br>
@@ -327,6 +327,7 @@ vec4_visitor::implied_mrf_writes(vec4_instruction *inst)<br>
case SHADER_OPCODE_TXD:<br>
case SHADER_OPCODE_TXF:<br>
case SHADER_OPCODE_TXF_CMS:<br>
+ case SHADER_OPCODE_TXF_CMS_W:<br>
case SHADER_OPCODE_TXF_MCS:<br>
case SHADER_OPCODE_TXS:<br>
case SHADER_OPCODE_TG4:<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp<br>
index 1950333..c4ddff9 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp<br>
@@ -259,6 +259,10 @@ vec4_generator::generate_tex(vec4_instruction *inst,<br>
case SHADER_OPCODE_TXF:<br>
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LD;<br>
break;<br>
+ case SHADER_OPCODE_TXF_CMS_W:<br>
+ assert(devinfo->gen >= 9);<br>
+ msg_type = GEN9_SAMPLER_MESSAGE_SAMPLE_LD2DMS_W;<br>
+ break;<br>
case SHADER_OPCODE_TXF_CMS:<br>
if (devinfo->gen >= 7)<br>
msg_type = GEN7_SAMPLER_MESSAGE_SAMPLE_LD2DMS;<br>
@@ -1372,6 +1376,7 @@ vec4_generator::generate_code(const cfg_t *cfg)<br>
case SHADER_OPCODE_TXD:<br>
case SHADER_OPCODE_TXF:<br>
case SHADER_OPCODE_TXF_CMS:<br>
+ case SHADER_OPCODE_TXF_CMS_W:<br>
case SHADER_OPCODE_TXF_MCS:<br>
case SHADER_OPCODE_TXL:<br>
case SHADER_OPCODE_TXS:<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp<br>
index 0465770..79f92d8 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp<br>
@@ -2545,7 +2545,8 @@ vec4_visitor::emit_texture(ir_texture_opcode op,<br>
case ir_txl: opcode = SHADER_OPCODE_TXL; break;<br>
case ir_txd: opcode = SHADER_OPCODE_TXD; break;<br>
case ir_txf: opcode = SHADER_OPCODE_TXF; break;<br>
- case ir_txf_ms: opcode = SHADER_OPCODE_TXF_CMS; break;<br>
+ case ir_txf_ms: opcode = (devinfo->gen >= 9 ? SHADER_OPCODE_TXF_CMS_W :<br>
+ SHADER_OPCODE_TXF_CMS); break;<br>
case ir_txs: opcode = SHADER_OPCODE_TXS; break;<br>
case ir_tg4: opcode = offset_value.file != BAD_FILE<br>
? SHADER_OPCODE_TG4_OFFSET : SHADER_OPCODE_TG4; break;<br>
@@ -2637,7 +2638,16 @@ vec4_visitor::emit_texture(ir_texture_opcode op,<br>
} else if (op == ir_txf_ms) {<br>
emit(MOV(dst_reg(MRF, param_base + 1, sample_index.type, WRITEMASK_X),<br>
sample_index));<br>
- if (devinfo->gen >= 7) {<br>
+ if (opcode == SHADER_OPCODE_TXF_CMS_W) {<br>
+ /* MCS data is stored in the first two channels of ‘mcs’, but we<br>
+ * need to get it into the .y and .z channels of the second vec4<br>
+ * of params.<br>
+ */<br>
+ mcs.swizzle = BRW_SWIZZLE4(0, 0, 1, 1);<br>
+ emit(MOV(dst_reg(MRF, param_base + 1,<br>
+ glsl_type::uint_type, WRITEMASK_YZ),<br>
+ mcs));<br>
+ } else if (devinfo->gen >= 7) {<br>
/* MCS data is in the first channel of `mcs`, but we need to get it into<br>
* the .y channel of the second vec4 of params, so replicate .x across<br>
* the whole vec4 and then mask off everything except .y<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>