[Mesa-dev] [PATCH 1/3] st/vdpau: don't return a device if the screen doesn't support NPOT
Ilia Mirkin
imirkin at alum.mit.edu
Sat Jan 18 02:34:49 PST 2014
On Sat, Jan 18, 2014 at 5:27 AM, Christian König
<deathsimple at vodafone.de> wrote:
> Am 18.01.2014 05:58, schrieb Ilia Mirkin:
>
>> NV3x cards don't support NPOT textures. Technically this restriction
>> could be worked around, but since it also doesn't expose any video
>> decoding hw, just turn it off entirely.
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> Cc: 10.0 <mesa-stable at lists.freedesktop.org>
>
>
> Actually we had a similar problem for early r300/r600 cards and because of
> this there is an extra PIPE_VIDEO_CAP_NPOT_TEXTURES.
>
> Wanting to remove that for quite a while, but if you return the correct
> value when this is queried even NPOT cards should work quite fine with the
> presentation part of VDPAU.
There isn't a single reference to NPOT in VDPAU that I could find. Are
you thinking of the XvMC state tracker? That one does appear to have
support for the NPOT stuff. However the e.g. output surfaces being
created aren't video surfaces, they're regular surfaces, so I think
I'm checking the right PIPE_CAP. (I guess I should check both, but
that's really overkill.)
>
> Christian.
>
>
>> ---
>> src/gallium/state_trackers/vdpau/device.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/src/gallium/state_trackers/vdpau/device.c
>> b/src/gallium/state_trackers/vdpau/device.c
>> index fb9c68c..36ac11a 100644
>> --- a/src/gallium/state_trackers/vdpau/device.c
>> +++ b/src/gallium/state_trackers/vdpau/device.c
>> @@ -72,6 +72,11 @@ vdp_imp_device_create_x11(Display *display, int screen,
>> VdpDevice *device,
>> goto no_context;
>> }
>> + if (!pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES)) {
>> + ret = VDP_STATUS_NO_IMPLEMENTATION;
>> + goto no_context;
>> + }
>> +
>> *device = vlAddDataHTAB(dev);
>> if (*device == 0) {
>> ret = VDP_STATUS_ERROR;
>
>
More information about the mesa-dev
mailing list