[Mesa-dev] [PATCH 2/2] st/wgl: Ignore ulVersion in DrvValidateVersion.

Jose Fonseca jfonseca at vmware.com
Thu Jan 8 10:54:56 PST 2015


On 08/01/15 16:57, Brian Paul wrote:
> On 01/08/2015 09:41 AM, Jose Fonseca wrote:
>> From: José Fonseca <jfonseca at vmware.com>
>>
>> We never used ulVersion for proper version checks.
>>
>> Most 3rd party drivers use version 1, but recently NVIDIA OpenGL driver
>> started using a version number 1,
>
> What version did they use before, zero?

Sorry, I meant to say the start using a version number _different_ from 
1.   They now use 4096.  They used to use version 1, as pretty much 
everybody else.

>
>> so the handy trick of renaming Mesa's
>> ICDs as nvoglv32.dll on Windows machines with NVIDIA hardware for quick
>> testing of Mesa software renderers stopped working.
>> ---
>>   src/gallium/state_trackers/wgl/stw_device.c | 11 +++++++++--
>>   1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/gallium/state_trackers/wgl/stw_device.c
>> b/src/gallium/state_trackers/wgl/stw_device.c
>> index 025dbdc..4562355 100644
>> --- a/src/gallium/state_trackers/wgl/stw_device.c
>> +++ b/src/gallium/state_trackers/wgl/stw_device.c
>> @@ -213,6 +213,13 @@ BOOL APIENTRY
>>   DrvValidateVersion(
>>      ULONG ulVersion )
>>   {
>> -   /* TODO: get the expected version from the winsys */
>> -   return ulVersion == 1;
>> +   /* ulVersion is the version reported by the KMD:
>> +    * - via D3DKMTQueryAdapterInfo(KMTQAITYPE_UMOPENGLINFO) on WDDM,
>> +    * - or ExtEscape on XPDM and can be used to ensure the KMD and
>> OpenGL ICD
>> +    *   versions match.
>> +    *
>> +    * We should get the expected version number from the winsys, but
>> for now
>> +    * ignore it. */
>
> Can you put the closing */ on the next line?


Sure.

>
>> +   (void)ulVersion;
>> +   return TRUE;
>>   }
>>
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>

Thanks for the reviews.

Jose



More information about the mesa-dev mailing list