Re: [Mesa-dev] [PATCH 7/7] anv: enable VK_KHR_shader_draw_parameters

2017-02-01 Thread Lionel Landwerlin

On 01/02/17 05:36, Jason Ekstrand wrote:
On Tue, Jan 31, 2017 at 7:11 PM, Jason Ekstrand > wrote:


Looks really good!  I made a comment earlier about how it would be
good to add a couple more #defines for these magic vertex buffer
handles.  Also, now that things are working, I'd like to
re-confirm whether or not vertex buffer 33 works.  If it does, we
should use it.  If it doesn't, then I'm fine with dropping the limit.


I had another thought on the buffer 33... Doing a little digging 
through the docs, it appears that the hardware only started supporting 
34 vertex buffers on Sky Lake but it has supported 34 vertex elements 
since Ivy Bridge or even earlier.  If we were somehow able to use the 
same buffer for DrawID as we did for BaseVertex and BaseInstance, we 
could keep the limit at 32.  I'm not seeing any real good way to do 
that in the indirect draw case so let's go ahead and drop the limit to 
31 for now and figure out how to be more clever later.


Just gave a try to buffer 33 on Kabylake, that didn't work :(
So I think we're stuck with 31 for now.


On Tue, Jan 31, 2017 at 7:00 AM, Lionel Landwerlin
> wrote:

Enables 10 tests from:

   dEQP-VK.draw.shader_draw_parameters.*

Signed-off-by: Lionel Landwerlin
>
---
 src/intel/vulkan/anv_device.c   | 4 
 src/intel/vulkan/anv_pipeline.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/intel/vulkan/anv_device.c
b/src/intel/vulkan/anv_device.c
index 3403dc126a..91ee67f053 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -272,6 +272,10 @@ static const VkExtensionProperties
device_extensions[] = {
   .extensionName = VK_KHR_MAINTENANCE1_EXTENSION_NAME,
   .specVersion = 1,
},
+   {
+  .extensionName =
VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
+  .specVersion = 1,
+   }
 };

 static void *
diff --git a/src/intel/vulkan/anv_pipeline.c
b/src/intel/vulkan/anv_pipeline.c
index 2060c6d2f6..ca3823c2b6 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -127,6 +127,7 @@ anv_shader_compile_to_nir(struct
anv_device *device,
const struct nir_spirv_supported_extensions supported_ext = {
   .float64 = device->instance->physicalDevice.info.gen >= 8,
   .tessellation = true,
+  .draw_parameters = true,
};

nir_function *entry_point =
--
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org

https://lists.freedesktop.org/mailman/listinfo/mesa-dev






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


Re: [Mesa-dev] [PATCH 7/7] anv: enable VK_KHR_shader_draw_parameters

2017-02-01 Thread Lionel Landwerlin

On 01/02/17 02:35, Anuj Phogat wrote:

On Tue, Jan 31, 2017 at 7:00 AM, Lionel Landwerlin
 wrote:

Enables 10 tests from:

dEQP-VK.draw.shader_draw_parameters.*

and I assume they all pass with this series.


Yes :)


Signed-off-by: Lionel Landwerlin 
---
  src/intel/vulkan/anv_device.c   | 4 
  src/intel/vulkan/anv_pipeline.c | 1 +
  2 files changed, 5 insertions(+)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 3403dc126a..91ee67f053 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -272,6 +272,10 @@ static const VkExtensionProperties device_extensions[] = {
.extensionName = VK_KHR_MAINTENANCE1_EXTENSION_NAME,
.specVersion = 1,
 },
+   {
+  .extensionName = VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
+  .specVersion = 1,
+   }
  };

  static void *
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 2060c6d2f6..ca3823c2b6 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -127,6 +127,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
 const struct nir_spirv_supported_extensions supported_ext = {
.float64 = device->instance->physicalDevice.info.gen >= 8,
.tessellation = true,
+  .draw_parameters = true,
 };

 nir_function *entry_point =
--
2.11.0

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

  Series is doing what it says and changes look fine to me.

Series is:
Reviewed-by: Anuj Phogat 



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


Re: [Mesa-dev] [PATCH 7/7] anv: enable VK_KHR_shader_draw_parameters

2017-01-31 Thread Jason Ekstrand
On Tue, Jan 31, 2017 at 7:11 PM, Jason Ekstrand 
wrote:

> Looks really good!  I made a comment earlier about how it would be good to
> add a couple more #defines for these magic vertex buffer handles.  Also,
> now that things are working, I'd like to re-confirm whether or not vertex
> buffer 33 works.  If it does, we should use it.  If it doesn't, then I'm
> fine with dropping the limit.
>

I had another thought on the buffer 33... Doing a little digging through
the docs, it appears that the hardware only started supporting 34 vertex
buffers on Sky Lake but it has supported 34 vertex elements since Ivy
Bridge or even earlier.  If we were somehow able to use the same buffer for
DrawID as we did for BaseVertex and BaseInstance, we could keep the limit
at 32.  I'm not seeing any real good way to do that in the indirect draw
case so let's go ahead and drop the limit to 31 for now and figure out how
to be more clever later.


> On Tue, Jan 31, 2017 at 7:00 AM, Lionel Landwerlin <
> lionel.g.landwer...@intel.com> wrote:
>
>> Enables 10 tests from:
>>
>>dEQP-VK.draw.shader_draw_parameters.*
>>
>> Signed-off-by: Lionel Landwerlin 
>> ---
>>  src/intel/vulkan/anv_device.c   | 4 
>>  src/intel/vulkan/anv_pipeline.c | 1 +
>>  2 files changed, 5 insertions(+)
>>
>> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.
>> c
>> index 3403dc126a..91ee67f053 100644
>> --- a/src/intel/vulkan/anv_device.c
>> +++ b/src/intel/vulkan/anv_device.c
>> @@ -272,6 +272,10 @@ static const VkExtensionProperties
>> device_extensions[] = {
>>.extensionName = VK_KHR_MAINTENANCE1_EXTENSION_NAME,
>>.specVersion = 1,
>> },
>> +   {
>> +  .extensionName = VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
>> +  .specVersion = 1,
>> +   }
>>  };
>>
>>  static void *
>> diff --git a/src/intel/vulkan/anv_pipeline.c
>> b/src/intel/vulkan/anv_pipeline.c
>> index 2060c6d2f6..ca3823c2b6 100644
>> --- a/src/intel/vulkan/anv_pipeline.c
>> +++ b/src/intel/vulkan/anv_pipeline.c
>> @@ -127,6 +127,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
>> const struct nir_spirv_supported_extensions supported_ext = {
>>.float64 = device->instance->physicalDevice.info.gen >= 8,
>>.tessellation = true,
>> +  .draw_parameters = true,
>> };
>>
>> nir_function *entry_point =
>> --
>> 2.11.0
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 7/7] anv: enable VK_KHR_shader_draw_parameters

2017-01-31 Thread Jason Ekstrand
Looks really good!  I made a comment earlier about how it would be good to
add a couple more #defines for these magic vertex buffer handles.  Also,
now that things are working, I'd like to re-confirm whether or not vertex
buffer 33 works.  If it does, we should use it.  If it doesn't, then I'm
fine with dropping the limit.

On Tue, Jan 31, 2017 at 7:00 AM, Lionel Landwerlin <
lionel.g.landwer...@intel.com> wrote:

> Enables 10 tests from:
>
>dEQP-VK.draw.shader_draw_parameters.*
>
> Signed-off-by: Lionel Landwerlin 
> ---
>  src/intel/vulkan/anv_device.c   | 4 
>  src/intel/vulkan/anv_pipeline.c | 1 +
>  2 files changed, 5 insertions(+)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 3403dc126a..91ee67f053 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -272,6 +272,10 @@ static const VkExtensionProperties
> device_extensions[] = {
>.extensionName = VK_KHR_MAINTENANCE1_EXTENSION_NAME,
>.specVersion = 1,
> },
> +   {
> +  .extensionName = VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
> +  .specVersion = 1,
> +   }
>  };
>
>  static void *
> diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_
> pipeline.c
> index 2060c6d2f6..ca3823c2b6 100644
> --- a/src/intel/vulkan/anv_pipeline.c
> +++ b/src/intel/vulkan/anv_pipeline.c
> @@ -127,6 +127,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
> const struct nir_spirv_supported_extensions supported_ext = {
>.float64 = device->instance->physicalDevice.info.gen >= 8,
>.tessellation = true,
> +  .draw_parameters = true,
> };
>
> nir_function *entry_point =
> --
> 2.11.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 7/7] anv: enable VK_KHR_shader_draw_parameters

2017-01-31 Thread Anuj Phogat
On Tue, Jan 31, 2017 at 7:00 AM, Lionel Landwerlin
 wrote:
> Enables 10 tests from:
>
>dEQP-VK.draw.shader_draw_parameters.*
and I assume they all pass with this series.
>
> Signed-off-by: Lionel Landwerlin 
> ---
>  src/intel/vulkan/anv_device.c   | 4 
>  src/intel/vulkan/anv_pipeline.c | 1 +
>  2 files changed, 5 insertions(+)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 3403dc126a..91ee67f053 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -272,6 +272,10 @@ static const VkExtensionProperties device_extensions[] = 
> {
>.extensionName = VK_KHR_MAINTENANCE1_EXTENSION_NAME,
>.specVersion = 1,
> },
> +   {
> +  .extensionName = VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
> +  .specVersion = 1,
> +   }
>  };
>
>  static void *
> diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
> index 2060c6d2f6..ca3823c2b6 100644
> --- a/src/intel/vulkan/anv_pipeline.c
> +++ b/src/intel/vulkan/anv_pipeline.c
> @@ -127,6 +127,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
> const struct nir_spirv_supported_extensions supported_ext = {
>.float64 = device->instance->physicalDevice.info.gen >= 8,
>.tessellation = true,
> +  .draw_parameters = true,
> };
>
> nir_function *entry_point =
> --
> 2.11.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

 Series is doing what it says and changes look fine to me.

Series is:
Reviewed-by: Anuj Phogat 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev