Commit d731ff82 by Frank Henigman Committed by Commit Bot

Vulkan: support depth offset.

Update pipeline description with depth offset state. Enable test. BUG=angleproject:2353 Change-Id: Ib087bbff8e145b0e6e862eb6616a4943a989a7b2 Reviewed-on: https://chromium-review.googlesource.com/1173447 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 43a2762d
......@@ -553,8 +553,10 @@ gl::Error ContextVk::syncState(const gl::Context *context, const gl::State::Dirt
isViewportFlipEnabledForDrawFBO());
break;
case gl::State::DIRTY_BIT_POLYGON_OFFSET_FILL_ENABLED:
mPipelineDesc->updatePolygonOffsetFillEnabled(glState.isPolygonOffsetFillEnabled());
break;
case gl::State::DIRTY_BIT_POLYGON_OFFSET:
mPipelineDesc->updatePolygonOffset(glState.getRasterizerState());
break;
case gl::State::DIRTY_BIT_RASTERIZER_DISCARD_ENABLED:
break;
......
......@@ -828,6 +828,17 @@ void PipelineDesc::updateStencilBackWriteMask(const gl::DepthStencilState &depth
drawFramebuffer->hasStencil() ? depthStencilState.stencilBackWritemask : 0);
}
void PipelineDesc::updatePolygonOffsetFillEnabled(bool enabled)
{
mRasterizationStateInfo.depthBiasEnable = enabled;
}
void PipelineDesc::updatePolygonOffset(const gl::RasterizerState &rasterState)
{
mRasterizationStateInfo.depthBiasSlopeFactor = rasterState.polygonOffsetFactor;
mRasterizationStateInfo.depthBiasConstantFactor = rasterState.polygonOffsetUnits;
}
void PipelineDesc::updateRenderPassDesc(const RenderPassDesc &renderPassDesc)
{
mRenderPassDesc = renderPassDesc;
......
......@@ -408,6 +408,10 @@ class PipelineDesc final
void updateStencilBackWriteMask(const gl::DepthStencilState &depthStencilState,
const gl::Framebuffer *drawFramebuffer);
// Depth offset.
void updatePolygonOffsetFillEnabled(bool enabled);
void updatePolygonOffset(const gl::RasterizerState &rasterState);
private:
// TODO(jmadill): Use gl::ShaderMap when we can pack into fewer bits. http://anglebug.com/2522
ShaderStageInfo mShaderStageInfo;
......
......@@ -233,7 +233,6 @@
2598 VULKAN : dEQP-GLES2.functional.rasterization.primitives.line* = SKIP
2599 VULKAN : dEQP-GLES2.functional.rasterization.limits.points = SKIP
2601 VULKAN : dEQP-GLES2.functional.clipping.* = SKIP
2353 VULKAN : dEQP-GLES2.functional.polygon_offset.* = SKIP
// Vulkan AMD Windows specific failures
2602 VULKAN WIN AMD : dEQP-GLES2.functional.buffer.write.* = SKIP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment