[Mesa-dev] [PATCH] i965: Use the predicate enable bit for conditional rendering without stalling

Robert Bragg robert at sixbynine.org
Mon Nov 10 07:23:16 PST 2014

On Mon, Nov 10, 2014 at 2:57 PM, Neil Roberts <neil at linux.intel.com> wrote:
> The bit I mentioned about OACONTROL was just saying that the method of
> detecting whether we can write to OACONTROL specifically doesn't work.
> This is because writing to a register that is not in the whitelist
> returns EINVAL and Mesa calls exit(1) when drm_intel_gem_bo_context_exec
> fails. I used a different method to detect whether we can write to
> MI_PREDICATE_SRC0 by manually calling drm_intel_gem_bo_context_exec to
> avoid the call to exit(1). I think the code to check whether OACONTROL
> is accessible is wrong because the process will have already exited
> before it gets a chance to check whether the load worked. In v2 of the
> patch I made it check the cmd parser version as you suggested. We should
> probably do something similar for OACONTROL, but that is a separate
> issue.

Hmm, that's awkward. I had been thinking we should aim remove the
OACONTROL tricks from the cmd parser, considering that it's not
currently possible to program the OA to get useful data this way, but
it sounds like we'd actually start making Mesa apps exit(1) if we were
to do that :-/

If we add more complete support for the OA via perf then it would be
nice if we just had one place responsible for programming OACONTROL so
I'd been thinking we could just drop it from the cmd parser white list
- assuming older versions of Mesa would handle that gracefully.

'Guess it won't be quite so simple :-)

- Robert

More information about the mesa-dev mailing list