[Mesa-dev] When is a sampler object not a sampler object?

Matt Turner mattst88 at gmail.com
Wed Dec 19 20:40:53 PST 2012

The ES 3.0 and GL 3.3+ specs say:

A new sampler object is created by binding an unused name to a
texture unit.


The names are marked as used, for the purposes of GenSamplers only,
but they acquire state only when they are first used as a parameter
to BindSampler, SamplerParameter*, GetSamplerParameter*, or IsSampler.
When a sampler object is first used in one of these functions, the
resulting sampler object is initialized with a new state vector,
comprising all the state and with the same initial values listed in
table 6.10.

We're not handling the requirement to initialize the object specified
in the 2nd paragraph, but my real question is --

Can IsSampler ever return false if given a name returned by
GenSamplers? Does 'acquire state' mean becomes a sampler object? These
paragraphs seem contradictory.

More information about the mesa-dev mailing list