anv: Use sampleLocationsEnable for sample locations

The spec says: "sampleLocationsEnable controls whether custom sample
locations are used. If sampleLocationsEnable is VK_FALSE, the default
sample locations are used and the values specified in
sampleLocationsInfo are ignored."

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6675
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17134>
This commit is contained in:
Mykhailo Skorokhodov 2022-06-19 23:56:12 +03:00 committed by Marge Bot
parent 419b8c7f8d
commit 50b21fb6e4

View file

@ -2292,7 +2292,7 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
default: unreachable("invalid sample count");
}
if (sl_info) {
if (sl_info && sl_info->sampleLocationsEnable) {
const VkSampleLocationEXT *positions =
sl_info->sampleLocationsInfo.pSampleLocations;
for (uint32_t i = 0; i < samples; i++) {