[Mesa-dev] Gallium API questions

Roland Scheidegger sroland at vmware.com
Thu Jun 24 05:47:50 PDT 2010


On 24.06.2010 01:36, Brian Paul wrote:
> I'll try to answer a few...
> 
> 
> Corbin Simpson wrote:
>> Yep, it's that time again. These are just things marked in the docs as
>> unknown, so I'm not grinding any axes, just cleaning stuff up.
>>
>> ~ "If a surface includes several layers/slices (XXX: not yet...) then
>> all layers will be cleared." From the information on
>> pipe_context::clear(). Is this just wishful thinking, or do drivers
>> need to implement this?
Drivers need to implement this, if they implement array textures (and
geometry shaders too actually), otherwise they should never see more
than one layer in the surface (that is, first_layer and last_layer
should always be the same). For a better understanding you'd probably
need to look in the gallium-array-textures branch it should be more
obvious once that is merged, the explanation in pipe_context might not
make sense without that.
Both d3d and OGL allow this, though in OGL it is limited to either all
or one layer (one of zslice, cube face, array range), whereas d3d10
allows arbitrary range of layers in the render target / depth stencil
views, and those specified in the range need to get cleared.

>>
>> ~ An explanation of dual-source blends and how they work would be nice.
> 
> Marek provided a pointer, but I don't think we've done anything with 
> this in gallium yet.
This should work in gallium.
Once upon a time I implemented this in softpipe but had nothing to test
with at that time (attached, might not cleanly apply).
Though this would be using the simpler option of what
ARB_blend_func_extended provides (that is, use first color output for
first blend color, second for second blend color - impossible with MRT
that way).

> 
>> ~ If logicop_enable and independent_blend_enable are set, are lops
>> performed for all render targets, or only those that have blend_enable
>> set?
> 
> The GL_ARB_drawbuffers2 spec is a bit vague on this but in swrast 
> logicop had precedence over blending and either applies to all color 
> buffers or none.
I think this is indeed the case, logic op has a global enable and
overrides blending (it is OpenGL only hence we need not worry what d3d
would like).

Roland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: softpipe_dualsourceblend.diff
Type: text/x-patch
Size: 7535 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100624/8e997229/attachment.bin>


More information about the mesa-dev mailing list