[Mesa-dev] Gallium API questions

Brian Paul brianp at vmware.com
Wed Jun 23 16:36:40 PDT 2010


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?
> 
> ~ 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.

> ~ 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.


> ~ PIPE_CAP_TEXTURE_SHADOW_MAP and PIPE_CAP_MAX_PREDICATE_REGISTERS
> aren't explained.

I'm updating these now.


> ~ PIPE_CAP_GUARD_BAND_* obviously refers to the guard bands, but what
> exactly do they mean as capabilities? Maximum guard band settings?
> Minimum?

They're probably the guard band width in pixels.


> ~ Could somebody explain exactly what's up with the RCC opcode? Its
> definition is kind of ridiculous: dst = (1 / src.x) > 0 ? clamp(1 /
> src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019,
> -5.42101e-020)

Looks like a clamped reciprocol to avoid +/-inf that can come from RCP.


> ~ Are we going to introduce new cap bits for parts of the TGSI ISA?
> (I'll understand if this is off the table for now.)
> 
> ~ TGSI_SEMANTIC_POSITION is (x, y, z, w) where x, y, and z are
> position, and w is the homogeneous coordinate. Is w also for
> perspective divide? Is the perspective divide configurable, or is it
> always done in shaders?
> 
> ~ "Position, if not specified, usually defaults to (0, 0, 0, 1), and
> can be partially specified as (x,  y, 0, 1) or (x, y, z,  1)."
> "Usually" is probably Corbin-speak for "I'm just guessing here." Is
> that actually how it goes, or is position mandatory?

See the newly updated docs.


> ~ Can somebody explain the format of TGSI_SEMANTIC_EDGEFLAG?

I've updated the docs for this.


> ~ What are the components of textures in the UV or Z format when
> sampled? For UV, current candidates are (0, 0, 0, 1) and (u, v, 1, 1).
> The latter seems more reasonable given that Gallium is shaderful. For
> Z, it could be (z, z, z, 1), (0, z, 0, 1), (0, 0, 0, z), or (z, z, z,
> z) and is configurable in GL. Maybe we want to have this be
> configurable?
> 
> Thanks!
> 
> ~ C.
> 

-Brian


More information about the mesa-dev mailing list