On 16 December 2011 19:50, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 12/13/2011 03:35 PM, Paul Berry wrote:<br>
</div>[snip]<br>
<div><div class="h5">> +static void<br>
> +brw_update_sol_surface(struct brw_context *brw, drm_intel_bo *bo,<br>
> + uint32_t *out_offset, unsigned num_vector_components,<br>
> + unsigned stride_dwords, unsigned offset_dwords,<br>
> + uint32_t buffer_size_minus_1)<br>
> +{<br>
> + uint32_t *surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE, 6 * 4, 32,<br>
> + out_offset);<br>
> + uint32_t width = buffer_size_minus_1 & 0x7f;<br>
> + uint32_t height = (buffer_size_minus_1 & 0xfff80) >> 7;<br>
> + uint32_t depth = (buffer_size_minus_1 & 0x7f00000) >> 20;<br>
> + uint32_t pitch_minus_1 = 4*stride_dwords - 1;<br>
> + uint32_t surface_format;<br>
> + uint32_t offset_bytes = 4 * offset_dwords;<br>
> + switch (num_vector_components) {<br>
> + case 1:<br>
> + surface_format = BRW_SURFACEFORMAT_R32_FLOAT;<br>
> + break;<br>
> + case 2:<br>
> + surface_format = BRW_SURFACEFORMAT_R32G32_FLOAT;<br>
> + break;<br>
> + case 3:<br>
> + surface_format = BRW_SURFACEFORMAT_R32G32B32_FLOAT;<br>
> + break;<br>
> + case 4:<br>
> + surface_format = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT;<br>
> + break;<br>
> + default:<br>
> + assert (!"Invalid vector size for transform feedback output");<br>
> + surface_format = BRW_SURFACEFORMAT_R32_FLOAT;<br>
> + break;<br>
> + }<br>
<br>
</div></div>Is it possible to have integer transform feedback outputs? If so, we'd<br>
need to adjust this. But we can do that later (if at all).<br></blockquote><div><br>Yes, integer transform feedback outputs are possible, but I believe that it won't be necessary to adjust this because the data port doesn't do any format conversions on "streamed vertex buffer write" messages. But I'll make sure we have the necessary piglit tests to verify this, and if I'm wrong I'll do a follow-up patch.<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Looks good, Paul.<br>
<br>
Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
</blockquote></div><br>