<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 5, 2017 at 7:49 AM, Alex Smith <span dir="ltr"><<a href="mailto:asmith@feralinteractive.com" target="_blank">asmith@feralinteractive.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Based on discussions with Jason, Ivy Bridge and Bay Trail only actually<br>
support 16 samplers, while newer hardware can support more than the<br>
current limit of 64. Therefore set the lower limit where needed, and<br>
bump up to 128 for everything else. There is also a limit on the total<br>
number of other resources of around 250.<br>
<br>
This allows Dawn of War III to render correctly on ANV.<br>
<br>
Signed-off-by: Alex Smith <<a href="mailto:asmith@feralinteractive.com">asmith@feralinteractive.com</a>><br>
---<br>
src/intel/vulkan/anv_device.c | 9 ++++++---<br>
1 file changed, 6 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_device.<wbr>c b/src/intel/vulkan/anv_device.<wbr>c<br>
index ab484ed..aacd07f 100644<br>
--- a/src/intel/vulkan/anv_device.<wbr>c<br>
+++ b/src/intel/vulkan/anv_device.<wbr>c<br>
@@ -765,6 +765,9 @@ void anv_<wbr>GetPhysicalDeviceProperties(<br>
const uint32_t max_raw_buffer_sz = devinfo->gen >= 7 ?<br>
(1ul << 30) : (1ul << 27);<br>
<br>
+ const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ?<br>
+ 128 : 16;<br>
+<br>
VkSampleCountFlags sample_counts =<br>
isl_device_get_sample_counts(&<wbr>pdevice->isl_dev);<br>
<br>
@@ -783,13 +786,13 @@ void anv_<wbr>GetPhysicalDeviceProperties(<br>
.bufferImageGranularity = 64, /* A cache line */<br>
.sparseAddressSpaceSize = 0,<br>
.maxBoundDescriptorSets = MAX_SETS,<br>
- .maxPerStageDescriptorSamplers = 64,<br>
+ .maxPerStageDescriptorSamplers = max_samplers,<br>
.<wbr>maxPerStageDescriptorUniformBu<wbr>ffers = 64,<br>
.<wbr>maxPerStageDescriptorStorageBu<wbr>ffers = 64,<br>
- .<wbr>maxPerStageDescriptorSampledIm<wbr>ages = 64,<br>
+ .<wbr>maxPerStageDescriptorSampledIm<wbr>ages = max_samplers,<br>
.<wbr>maxPerStageDescriptorStorageIm<wbr>ages = 64,<br>
.<wbr>maxPerStageDescriptorInputAtta<wbr>chments = 64,<br>
- .maxPerStageResources = 128,<br>
+ .maxPerStageResources = 250,<br>
.maxDescriptorSetSamplers = 256,<br>
.<wbr>maxDescriptorSetUniformBuffers = 256,<br>
.<wbr>maxDescriptorSetUniformBuffers<wbr>Dynamic = MAX_DYNAMIC_BUFFERS / 2,<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>