Fix perspective fragcoord value in d3d.

The general issue is that d3d returns a fragcoord with the "w" coord
is given as w. But gl, vulkan, and others get a 1/w. So skia assumes
a 1/w value here. Thus we must flip for d3d.

Change-Id: I4ff9fb363310c1ca52e631246413ab76322def54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297182
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/d3d/GrD3DPipelineStateBuilder.cpp b/src/gpu/d3d/GrD3DPipelineStateBuilder.cpp
index 1fec8db..5c2b91f 100644
--- a/src/gpu/d3d/GrD3DPipelineStateBuilder.cpp
+++ b/src/gpu/d3d/GrD3DPipelineStateBuilder.cpp
@@ -552,6 +552,7 @@
     SkSL::Program::Settings settings;
     settings.fCaps = this->caps()->shaderCaps();
     settings.fFlipY = this->origin() != kTopLeft_GrSurfaceOrigin;
+    settings.fInverseW = true;
     settings.fSharpenTextures =
         this->gpu()->getContext()->priv().options().fSharpenMipmappedTextures;
     settings.fRTHeightOffset = fUniformHandler.getRTHeightOffset();