We have some canDoSuchAndSuch() helper functions on GrDrawTarget that consider the capabilities of the the ...
12 years, 8 months ago
(2012-03-29 18:24:48 UTC)
#1
We have some canDoSuchAndSuch() helper functions on GrDrawTarget that consider
the capabilities of the the underlying API and the current state. They
internally call getBlendOpts(). getBlendOpts() wants to know the current vertex
layout because stages are considered disabled unless the vertex layout provides
them with texture coordinates.
However, some of the call sites necessarily occur before the caller has
specified a vertex source (and along with it the vertex layout).
This change makes getBlendOpts assume that all stages that have a non-NULL
texture will appear in the vertex layout when considering what blend
optimizations are allowed.
This is still a bit messy. I'd consider a deeper cleanup but I'm hoping that as
the custom shader work comes online we'll have a path foward towards removing
vertex layouts entirely.
On 2012/03/29 18:24:48, bsalomon wrote: > This change makes getBlendOpts assume that all stages that ...
12 years, 8 months ago
(2012-03-29 18:30:28 UTC)
#2
On 2012/03/29 18:24:48, bsalomon wrote:
> This change makes getBlendOpts assume that all stages that have a non-NULL
> texture will appear in the vertex layout when considering what blend
> optimizations are allowed.
Over-conservative? Is there a perf hit?
On 2012/03/29 18:30:28, TomH wrote: > On 2012/03/29 18:24:48, bsalomon wrote: > > This change ...
12 years, 8 months ago
(2012-03-29 18:41:34 UTC)
#3
On 2012/03/29 18:30:28, TomH wrote:
> On 2012/03/29 18:24:48, bsalomon wrote:
> > This change makes getBlendOpts assume that all stages that have a non-NULL
> > texture will appear in the vertex layout when considering what blend
> > optimizations are allowed.
>
> Over-conservative? Is there a perf hit?
In general we don't set textures on stages unless we intend to use them. I don't
expect a perf hit. I just think its ugly.
LGTM. http://codereview.appspot.com/5959047/diff/4001/src/gpu/GrDrawTarget.h File src/gpu/GrDrawTarget.h (left): http://codereview.appspot.com/5959047/diff/4001/src/gpu/GrDrawTarget.h#oldcode126 src/gpu/GrDrawTarget.h:126: bool drawWillReadDst() const; Doesn't it still make sense ...
12 years, 8 months ago
(2012-03-29 18:43:12 UTC)
#4
Issue 5959047: Don't look at current vertex layout when vertex source hasn't been set
(Closed)
Created 12 years, 8 months ago by bsalomon
Modified 12 years, 8 months ago
Reviewers: TomH
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 8