[Mesa-dev] [PATCH] i965: Actually emit PIPELINE_SELECT and 3DSTATE_VF_STATISTICS.

Kenneth Graunke kenneth at whitecape.org
Tue Apr 29 20:32:42 PDT 2014


On 04/29/2014 05:42 PM, Ben Widawsky wrote:
> On Tue, Apr 29, 2014 at 02:39:30PM -0700, Kenneth Graunke wrote:
>> For platforms using hardware contexts (currently Gen6+), we failed to
>> emit PIPELINE_SELECT and 3DSTATE_VF_STATISTICS, instead emitting MI_NOOP
>> for both.
>>
>> During one of the context initialization reordering patches, we
>> accidentally moved brw_init_state before we set brw->CMD_PIPELINE_SELECT
>> and brw->CMD_VF_STATISTICS.  So, when brw_init_state uploaded initial
>> GPU state (brw_init_state -> brw_upload_initial_gpu_state ->
>> brw_upload_invariant_state), these would be 0 (MI_NOOP).
>>
>> Storing the commands in the context is not worthwhile.  We have many
>> generation checks in our state upload code, and for platforms with
>> hardware contexts, this only gets called once per GL context anyway.
>> The cost is negligable, and it's easy to botch context creation
>> ordering.
>>
>> This may fix hangs on Gen6+ when using the media pipeline.
>>
>> Cc: "10.0 10.1" <mesa-stable at lists.freedesktop.org>
>> Cc: Ben Widawsky <ben at bwidawsk.net>
>> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> 
> Doesn't this potentially fix issues going back further than gen6?
> Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
> 
> [snip]

No, it shouldn't.  brw_upload_initial_gpu_state() is a noop without
hardware contexts.  Instead, the brw_invariant_state state atom handles
it, by which point things would've been set up correctly.

--Ken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140429/53857394/attachment.sig>


More information about the mesa-dev mailing list