<div dir="ltr">Patches 1 and 2 are:<div><br></div><div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Reviewed-by: Gurchetan Singh <<a href="mailto:gurchetansingh@chromium.org" target="_blank" style="color:rgb(17,85,204)">gurchetansingh@chromium.org</a>></div><br class="gmail-Apple-interchange-newline"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 14, 2018 at 6:52 PM Dave Airlie <<a href="mailto:airlied@gmail.com" target="_blank">airlied@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank">airlied@redhat.com</a>><br>
<br>
---<br>
src/vrend_shader.c | 40 ++++++++++++++++++++++++++++++++++++++++<br>
1 file changed, 40 insertions(+)<br>
<br>
diff --git a/src/vrend_shader.c b/src/vrend_shader.c<br>
index 2987d07..c269d0e 100644<br>
--- a/src/vrend_shader.c<br>
+++ b/src/vrend_shader.c<br>
@@ -1873,6 +1873,46 @@ static bool fill_offset_buffer(struct dump_ctx *ctx,<br>
return false;<br>
break;<br>
}<br>
+ } else if (inst->TexOffsets[0].File == TGSI_FILE_INPUT) {<br>
+ for (uint32_t j = 0; j < ctx->num_inputs; j++) {<br>
+ if (ctx->inputs[j].first != inst->TexOffsets[0].Index)<br>
+ continue;<br>
+ switch (inst->Texture.Texture) {<br>
+ case TGSI_TEXTURE_1D:<br>
+ case TGSI_TEXTURE_1D_ARRAY:<br>
+ case TGSI_TEXTURE_SHADOW1D:<br>
+ case TGSI_TEXTURE_SHADOW1D_ARRAY:<br>
+ snprintf(offbuf, 120, ", int(floatBitsToInt(%s.%c))",<br>
+ ctx->inputs[j].glsl_name,<br>
+ get_swiz_char(inst->TexOffsets[0].SwizzleX));<br>
+ break;<br>
+ case TGSI_TEXTURE_RECT:<br>
+ case TGSI_TEXTURE_SHADOWRECT:<br>
+ case TGSI_TEXTURE_2D:<br>
+ case TGSI_TEXTURE_2D_ARRAY:<br>
+ case TGSI_TEXTURE_SHADOW2D:<br>
+ case TGSI_TEXTURE_SHADOW2D_ARRAY:<br>
+ snprintf(offbuf, 120, ", ivec2(floatBitsToInt(%s.%c), floatBitsToInt(%s.%c))",<br>
+ ctx->inputs[j].glsl_name,<br>
+ get_swiz_char(inst->TexOffsets[0].SwizzleX),<br>
+ ctx->inputs[j].glsl_name,<br>
+ get_swiz_char(inst->TexOffsets[0].SwizzleY));<br>
+ break;<br>
+ case TGSI_TEXTURE_3D:<br>
+ snprintf(offbuf, 120, ", ivec3(floatBitsToInt(%s.%c), floatBitsToInt(%s.%c), floatBitsToInt(%s.%c)",<br>
+ ctx->inputs[j].glsl_name,<br>
+ get_swiz_char(inst->TexOffsets[0].SwizzleX),<br>
+ ctx->inputs[j].glsl_name,<br>
+ get_swiz_char(inst->TexOffsets[0].SwizzleY),<br>
+ ctx->inputs[j].glsl_name,<br>
+ get_swiz_char(inst->TexOffsets[0].SwizzleZ));<br>
+ break;<br>
+ default:<br>
+ fprintf(stderr, "unhandled texture: %x\n", inst->Texture.Texture);<br>
+ return false;<br>
+ break;<br>
+ }<br>
+ }<br>
}<br>
return true;<br>
}<br>
-- <br>
2.14.3<br>
<br>
_______________________________________________<br>
virglrenderer-devel mailing list<br>
<a href="mailto:virglrenderer-devel@lists.freedesktop.org" target="_blank">virglrenderer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel</a><br>
</blockquote></div></div></div>