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

2017-01-25 Thread Jason Ekstrand
On Wed, Jan 25, 2017 at 1:25 PM, Lionel Landwerlin <
lionel.g.landwer...@intel.com> wrote:

> Yes, we have VkPhysicalDeviceFeatures.multiDrawIndirect disabled for now.
> I was going to look at that in another series, given that this one didn't
> break anything in the CI.
>

Right.  That means that we can always set gl_DrawId to zero.  However, I'm
not convinced that we actually have code to do so.  I think the back-end is
pulling it out of an input that we don't provide so it's possible that
we're getting an undefined value that happens to be zero in your tests.  I
just wanted you to double check that it really is being defined as zero.

--jason


> -
> Lionel
>
>
> On 25/01/17 19:21, Jason Ekstrand wrote:
>
> Is there something we need to do here to plumb gl_DrawId through
> correctly?  I'm pretty sure we have exactly zero code for that.
>
> On Wed, Jan 25, 2017 at 10:55 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 b24949c5f4..115f011705 100644
>> --- a/src/intel/vulkan/anv_device.c
>> +++ b/src/intel/vulkan/anv_device.c
>> @@ -268,6 +268,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 2/2] anv: enable VK_KHR_shader_draw_parameters

2017-01-25 Thread Lionel Landwerlin

Yes, we have VkPhysicalDeviceFeatures.multiDrawIndirect disabled for now.
I was going to look at that in another series, given that this one 
didn't break anything in the CI.


-
Lionel

On 25/01/17 19:21, Jason Ekstrand wrote:
Is there something we need to do here to plumb gl_DrawId through 
correctly?  I'm pretty sure we have exactly zero code for that.


On Wed, Jan 25, 2017 at 10:55 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 b24949c5f4..115f011705 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -268,6 +268,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 2/2] anv: enable VK_KHR_shader_draw_parameters

2017-01-25 Thread Jason Ekstrand
Is there something we need to do here to plumb gl_DrawId through
correctly?  I'm pretty sure we have exactly zero code for that.

On Wed, Jan 25, 2017 at 10:55 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 b24949c5f4..115f011705 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -268,6 +268,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


[Mesa-dev] [PATCH 2/2] anv: enable VK_KHR_shader_draw_parameters

2017-01-25 Thread Lionel Landwerlin
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 b24949c5f4..115f011705 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -268,6 +268,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