Add test that solid/lit rendering works on points and lines

This commit is contained in:
baldurk
2022-06-17 14:44:53 +01:00
parent 71d7f000c4
commit 4a0bc691a7
5 changed files with 43 additions and 0 deletions
+6
View File
@@ -178,6 +178,12 @@ float4 main(v2f IN) : SV_Target0
ctx->Draw(4, 6);
setMarker("Lines");
ctx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
ctx->Draw(4, 6);
setMarker("Stride 0");
IASetVertexBuffer(vb, 0, 0);
+6
View File
@@ -191,6 +191,12 @@ float4 main(v2f IN) : SV_Target0
cmd->DrawInstanced(4, 1, 6, 0);
setMarker(cmd, "Lines");
cmd->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_LINELIST);
cmd->DrawInstanced(4, 1, 6, 0);
setMarker(cmd, "Stride 0");
IASetVertexBuffer(cmd, vb, 0, 0);
+4
View File
@@ -291,6 +291,10 @@ void main()
glDrawArrays(GL_POINTS, 6, 4);
setMarker("Lines");
glDrawArrays(GL_LINES, 6, 4);
setMarker("Stride 0");
glBindVertexArray(stride0vao);
+10
View File
@@ -215,6 +215,10 @@ void main()
VkPipeline pointspipe = createGraphicsPipeline(pipeCreateInfo);
pipeCreateInfo.inputAssemblyState.topology = VK_PRIMITIVE_TOPOLOGY_LINE_LIST;
VkPipeline linespipe = createGraphicsPipeline(pipeCreateInfo);
pipeCreateInfo.vertexInputState.vertexBindingDescriptions = {{0, 0, VK_VERTEX_INPUT_RATE_VERTEX}};
pipeCreateInfo.layout = layout2;
@@ -294,6 +298,12 @@ void main()
vkCmdDraw(cmd, 4, 1, 6, 0);
setMarker(cmd, "Lines");
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, linespipe);
vkCmdDraw(cmd, 4, 1, 6, 0);
setMarker(cmd, "Stride 0");
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, stride0pipe);
+17
View File
@@ -369,6 +369,23 @@ class Mesh_Zoo():
rdtest.log.success("Point picking is as expected")
self.cfg.highlightVert = rd.MeshDisplay.NoHighlight
self.cfg.solidShadeMode = rd.SolidShade.Solid
self.cache_output()
self.cfg.solidShadeMode = rd.SolidShade.Lit
self.cache_output()
rdtest.log.success("Point solid and lit rendering works as expected")
self.controller.SetFrameEvent(self.find_action("Lines").next.eventId, False)
self.cache_output()
self.cfg.solidShadeMode = rd.SolidShade.Lit
self.cache_output()
rdtest.log.success("Lines solid and lit rendering works as expected")
self.controller.SetFrameEvent(self.find_action("Stride 0").next.eventId, False)
self.cfg.position = self.controller.GetPostVSData(0, 0, self.cfg.type)