[Mesa-dev] [PATCH 24/25] gallium/softpipe/llvmpipe: handle query_renderer caps

Emil Velikov emil.l.velikov at gmail.com
Sat Feb 22 07:52:29 PST 2014


On 22/02/14 15:33, Emil Velikov wrote:
> On 22/02/14 13:52, Brian Paul wrote:
>> On Fri, Feb 21, 2014 at 8:04 PM, Emil Velikov <emil.l.velikov at gmail.com>wrote:
[snip]
>>> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
>>> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
>>> @@ -245,6 +245,31 @@ llvmpipe_get_param(struct pipe_screen *screen, enum
>>> pipe_cap param)
>>>        return 11;
>>>     case PIPE_CAP_MAX_GL_ES2_VERSION:
>>>        return 20;
>>> +
>>> +   case PIPE_CAP_VENDOR_ID:
>>> +      return 0xFFFFFFFF;
>>> +   case PIPE_CAP_DEVICE_ID:
>>> +      return 0xFFFFFFFF;
>>>
>>
>> Maybe just return zero since that's probably the default value returned by
>> a driver when it doesn't support a particular cap.
>>
> As device id of 0 is a valid value, the spec says that one should return
> 0xffffffff if the renderer does not have(cannot retrieve) the pci device
> id. I've chose the same value for the vendor for consistency.
> Will need to duplicated return statement but other than that I would
> prefer to keep it as is. Otherwise we'll need to do something messy
> within the dri state-tracker like the following
> 
s/to duplicated/to drop the duplicated/

-Emil



More information about the mesa-dev mailing list