[Mesa-dev] [PATCH 08/24] mesa: add gl_constants::SpirVCapabilities

2017-11-15 Thread Eduardo Lima Mitev
From: Nicolai Hähnle 

For drivers to declare which SPIR-V features they support.
---
 src/mesa/main/mtypes.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index f19477eb027..bf7c4ddc051 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4010,6 +4010,9 @@ struct gl_constants
 
/** When drivers are OK with mapped buffers during draw and other calls. */
bool AllowMappedBuffersDuringExecution;
+
+   /** GL_ARB_gl_spirv */
+   struct nir_spirv_supported_capabilities *SpirVCapabilities;
 };
 
 
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 08/24] mesa: add gl_constants::SpirVCapabilities

2017-11-27 Thread Ian Romanick
On 11/15/2017 05:22 AM, Eduardo Lima Mitev wrote:
> From: Nicolai Hähnle 
> 
> For drivers to declare which SPIR-V features they support.
> ---
>  src/mesa/main/mtypes.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index f19477eb027..bf7c4ddc051 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -4010,6 +4010,9 @@ struct gl_constants
>  
> /** When drivers are OK with mapped buffers during draw and other calls. 
> */
> bool AllowMappedBuffersDuringExecution;
> +
> +   /** GL_ARB_gl_spirv */
> +   struct nir_spirv_supported_capabilities *SpirVCapabilities;

Is there an advantage to the extra indirection?  I know most drivers
won't use this yet, but I expect that many will eventually.  Also,
nir_spirv_supported_capabilities is pretty small.

>  };
>  
>  
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 08/24] mesa: add gl_constants::SpirVCapabilities

2017-11-28 Thread Alejandro Piñeiro
On 27/11/17 23:36, Ian Romanick wrote:
> On 11/15/2017 05:22 AM, Eduardo Lima Mitev wrote:
>> From: Nicolai Hähnle 
>>
>> For drivers to declare which SPIR-V features they support.
>> ---
>>  src/mesa/main/mtypes.h | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>> index f19477eb027..bf7c4ddc051 100644
>> --- a/src/mesa/main/mtypes.h
>> +++ b/src/mesa/main/mtypes.h
>> @@ -4010,6 +4010,9 @@ struct gl_constants
>>  
>> /** When drivers are OK with mapped buffers during draw and other calls. 
>> */
>> bool AllowMappedBuffersDuringExecution;
>> +
>> +   /** GL_ARB_gl_spirv */
>> +   struct nir_spirv_supported_capabilities *SpirVCapabilities;
> Is there an advantage to the extra indirection?  I know most drivers
> won't use this yet, but I expect that many will eventually.  Also,
> nir_spirv_supported_capabilities is pretty small.

Not really any advantage. We even debated internally to avoid the
indirection, but we keep the original version for simplicity sake. If
you prefer avoid the pointer we could try to do that.

BR

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev