On Mon, 2019-03-11 at 17:04 +0200, Eleni Maria Stea wrote: > The VkPhysicalDeviceSampleLocationPropertiesEXT struct is filled with > implementation dependent values and according to the table from the > Vulkan Specification section [36.1. Limit Requirements]: > > pname | max | min > pname:sampleLocationSampleCounts |- |ename:VK_SAMPLE_COU > NT_4_BIT > pname:maxSampleLocationGridSize |- |(1, 1) > pname:sampleLocationCoordinateRange|(0.0, 0.9375)|(0.0, 0.9375) > pname:sampleLocationSubPixelBits |- |4 > pname:variableSampleLocations | false |implementation > dependent > > The hardware only supports setting the same sample location for all > the > pixels, so we only support 1x1 grids. > > Also, variableSampleLocations is set to false because we don't > support the > feature. > --- > src/intel/vulkan/anv_device.c | 21 +++++++++++++++++++++ > src/intel/vulkan/anv_private.h | 3 +++ > 2 files changed, 24 insertions(+) > > diff --git a/src/intel/vulkan/anv_device.c > b/src/intel/vulkan/anv_device.c > index 729cceb3e32..1e183b7f4ad 100644 > --- a/src/intel/vulkan/anv_device.c > +++ b/src/intel/vulkan/anv_device.c > @@ -1401,6 +1401,27 @@ void anv_GetPhysicalDeviceProperties2( > break; > } > > + case > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: { > + VkPhysicalDeviceSampleLocationsPropertiesEXT *props = > + (VkPhysicalDeviceSampleLocationsPropertiesEXT *)ext; > + props->sampleLocationSampleCounts = ISL_SAMPLE_COUNT_2_BIT > | > + ISL_SAMPLE_COUNT_4_BIT > | > + ISL_SAMPLE_COUNT_8_BIT; > + if (pdevice->info.gen >= 9) > + props->sampleLocationSampleCounts |= > ISL_SAMPLE_COUNT_16_BIT;
Hi Eleni, Thanks for the series. "isl_device_get_sample_counts" method figure out values according to platform so maybe we can make use of it and ignore ISL_SAMPLE_COUNT_1_BIT. So that we don't have to take care of values according to platform here. I am not sure about this, so it might be a good idea to consult with Jason/Lionel once. :) > + > + props->maxSampleLocationGridSize.width = SAMPLE_LOC_GRID_W; > + props->maxSampleLocationGridSize.height = > SAMPLE_LOC_GRID_H; > + > + props->sampleLocationCoordinateRange[0] = 0; > + props->sampleLocationCoordinateRange[1] = 0.9375; > + props->sampleLocationSubPixelBits = 4; > + > + props->variableSampleLocations = false; Just for consistency, doesn't make any difference but can we use VK_FALSE instead of false. with or without the fix, this patch is: Reviewed-by: Sagar Ghuge <sagar.gh...@intel.com> > + > + break; > + } > + > default: > anv_debug_ignored_stype(ext->sType); > break; > diff --git a/src/intel/vulkan/anv_private.h > b/src/intel/vulkan/anv_private.h > index eed282ff985..5905299e59d 100644 > --- a/src/intel/vulkan/anv_private.h > +++ b/src/intel/vulkan/anv_private.h > @@ -195,6 +195,9 @@ struct gen_l3_config; > > #define anv_printflike(a, b) __attribute__((__format__(__printf__, > a, b))) > > +#define SAMPLE_LOC_GRID_W 1 > +#define SAMPLE_LOC_GRID_H 1 > + > static inline uint32_t > align_down_npot_u32(uint32_t v, uint32_t a) > { _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev