<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 5, 2016 at 4:38 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Aug 5, 2016 at 4:29 PM, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Fri, Aug 5, 2016 at 3:57 PM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:llandwerlin@gmail.com" target="_blank">llandwerlin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Fixes the following failures :<br>
<br>
dEQP-VK.api.copy_and_blit.reso<wbr>lve_image.whole_4_bit<br>
dEQP-VK.api.copy_and_blit.reso<wbr>lve_image.whole_8_bit<br>
dEQP-VK.api.copy_and_blit.reso<wbr>lve_image.partial_4_bit<br>
dEQP-VK.api.copy_and_blit.reso<wbr>lve_image.partial_8_bit<br>
dEQP-VK.api.copy_and_blit.reso<wbr>lve_image.with_regions_4_bit<br>
dEQP-VK.api.copy_and_blit.reso<wbr>lve_image.with_regions_8_bit<br></blockquote><div><br></div></span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline">I couldn't find these test in </div>vulkan-cts-1.0<div style="font-family:verdana,sans-serif;font-size:small;display:inline"> at <a>https://github.com/KhronosGro<wbr>up/Vulkan-CTS.git</a></div></div><div><span style="font-family:verdana,sans-serif"><div style="font-family:verdana,sans-serif;font-size:small;display:inline">I'm using commit </div></span><font face="verdana, sans-serif">f13b15d<div style="font-family:verdana,sans-serif;font-size:small;display:inline">. You should remove them from commit message if they are no longer</div></font></div><div><font face="verdana, sans-serif"><div style="font-family:verdana,sans-serif;font-size:small;display:inline">part of CTS.</div></font></div></div></div></div></blockquote><div><br></div></span><div>You need the vulkan-cts-1.0-dev branch<br></div></div></div></div></blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">That explains. Thanks.</div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline"><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Tested on IVB/HSW<br>
<br>
v2: Check pMultisampleState is not NULL<br>
<br>
Signed-off-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><br>
Cc: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>><br>
---<br>
src/intel/vulkan/gen7_pipelin<wbr>e.c | 24 +++++++++++++++++-------<br>
1 file changed, 17 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/gen7_pipeli<wbr>ne.c b/src/intel/vulkan/gen7_pipeli<wbr>ne.c<br>
index c2a38ac..f4ad1bc 100644<br>
--- a/src/intel/vulkan/gen7_pipeli<wbr>ne.c<br>
+++ b/src/intel/vulkan/gen7_pipeli<wbr>ne.c<br>
@@ -37,8 +37,14 @@<br>
static void<br>
gen7_emit_rs_state(struct anv_pipeline *pipeline,<br>
const VkPipelineRasterizationStateCr<wbr>eateInfo *rs_info,<br>
+ const VkPipelineMultisampleStateCrea<wbr>teInfo *ms_info,<br></blockquote></span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline">We just need samples in this function, so just pass samples as parameter.</div></div><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline">You can drop your first patch in that case.</div></div><span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline"></div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
const struct anv_graphics_pipeline_create_i<wbr>nfo *extra)<br>
{<br>
+ uint32_t samples = 1;<br>
+<br>
+ if (ms_info)<br>
+ samples = ms_info->rasterizationSamples;<br>
+<br>
struct GENX(3DSTATE_SF) sf = {<br>
GENX(3DSTATE_SF_header),<br>
<br>
@@ -56,7 +62,7 @@ gen7_emit_rs_state(struct anv_pipeline *pipeline,<br>
/* uint32_t LineEndCapAntialiasingRegionW<wbr>idth; */<br>
.ScissorRectangleEnable = !(extra && extra->use_rectlist),<br>
<br>
- /* uint32_t MultisampleRasterizationMode; */<br>
+ .MultisampleRasterizationMode = samples > 1 ? MSDISPMODE_PERPIXEL : MSDISPMODE_PERSAMPLE,<br></blockquote></span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline">This should match</div> MultisampleRasterizationMode<div style="font-family:verdana,sans-serif;font-size:small;display:inline"> not MultisampleDispatchMode in WM_STATE.</div></div><span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline"></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
/* bool LastPixelEnable; */<br>
<br>
.TriangleStripListProvokingVe<wbr>rtexSelect = 0,<br>
@@ -108,7 +114,8 @@ genX(graphics_pipeline_create)<wbr>(<br>
emit_vertex_input(pipeline, pCreateInfo->pVertexInputState<wbr>, extra);<br>
<br>
assert(pCreateInfo->pRasteriza<wbr>tionState);<br>
- gen7_emit_rs_state(pipeline, pCreateInfo->pRasterizationSta<wbr>te, extra);<br>
+ gen7_emit_rs_state(pipeline, pCreateInfo->pRasterizationSta<wbr>te,<br>
+ pCreateInfo->pMultisampleState<wbr>, extra);<br>
<br>
emit_ds_state(pipeline, pCreateInfo->pDepthStencilStat<wbr>e, pass, subpass);<br>
<br>
@@ -121,11 +128,8 @@ genX(graphics_pipeline_create)<wbr>(<br>
pCreateInfo->pRasterizationSta<wbr>te, extra);<br>
emit_3dstate_streamout(pipelin<wbr>e, pCreateInfo->pRasterizationSta<wbr>te);<br>
<br>
- if (pCreateInfo->pMultisampleStat<wbr>e &&<br>
- pCreateInfo->pMultisampleStat<wbr>e->rasterizationSamples > 1)<br>
- anv_finishme("VK_STRUCTURE_TYP<wbr>E_PIPELINE_MULTISAMPLE_STATE_C<wbr>REATE_INFO");<br></blockquote></span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline">We should keep this finishme until we fix all the multisample cts tests.</div> </div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
-<br>
- uint32_t samples = 1;<br>
+ uint32_t samples = pCreateInfo->pMultisampleState ?<br>
+ pCreateInfo->pMultisampleState<wbr>->rasterizationSamples : 1;<br>
uint32_t log2_samples = __builtin_ffs(samples) - 1;<br>
<br>
anv_batch_emit(&pipeline->batc<wbr>h, GENX(3DSTATE_MULTISAMPLE), ms) {<br>
@@ -233,6 +237,7 @@ genX(graphics_pipeline_create)<wbr>(<br>
wm.LineAntialiasingRegionWidth<wbr> = 1; /* 1.0 pixels */<br>
wm.EarlyDepthStencilControl = EDSC_NORMAL;<br>
wm.PointRasterizationRule = RASTRULE_UPPER_RIGHT;<br>
+ wm.MultisampleDispatchMode = MSDISPMODE_PERSAMPLE;<br></blockquote></span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline">Dispatch mode doesn't matter when there is no fragment shader. Drop this change.</div> </div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
}<br>
<br>
/* Even if no fragments are ever dispatched, the hardware hangs if we<br>
@@ -312,6 +317,11 @@ genX(graphics_pipeline_create)<wbr>(<br>
}<br>
<br>
wm.BarycentricInterpolationMod<wbr>e = wm_prog_data->barycentric_inte<wbr>rp_modes;<br>
+<br>
+ wm.MultisampleRasterizationMo<wbr>de = samples > 1 ?<br>
+ MSRASTMODE_ON_PATTERN : MSRASTMODE_OFF_PIXEL;<br>
+ wm.MultisampleDispatchMode = wm_prog_data->persample_dispat<wbr>ch ?<br>
+ MSDISPMODE_PERSAMPLE : MSDISPMODE_PERPIXEL;<br>
}<br>
}<br>
<span><font color="#888888"><br>
--<br>
2.8.1<br>
<br>
</font></span></blockquote></span></div><br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div></div>