anv, blorp, iris, intel/genxml: Update 3DSTATE_PS_EXTRA for xe2

Update 3DSTATE_PS_EXTRA programming for xe2

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
This commit is contained in:
Jordan Justen
2022-08-04 23:44:14 -07:00
committed by Marge Bot
parent 5548e6a478
commit a659b1f0c0
5 changed files with 55 additions and 0 deletions
+6
View File
@@ -5165,7 +5165,9 @@ iris_store_fs_state(const struct intel_device_info *devinfo,
psx.PixelShaderValid = true;
psx.PixelShaderComputedDepthMode = wm_prog_data->computed_depth_mode;
psx.PixelShaderKillsPixel = wm_prog_data->uses_kill;
#if GFX_VER < 20
psx.AttributeEnable = wm_prog_data->num_varying_inputs != 0;
#endif
psx.PixelShaderUsesSourceDepth = wm_prog_data->uses_src_depth;
psx.PixelShaderUsesSourceW = wm_prog_data->uses_src_w;
psx.PixelShaderIsPerSample =
@@ -5173,7 +5175,11 @@ iris_store_fs_state(const struct intel_device_info *devinfo,
psx.oMaskPresenttoRenderTarget = wm_prog_data->uses_omask;
#if GFX_VER >= 9
#if GFX_VER >= 20
assert(!wm_prog_data->pulls_bary);
#else
psx.PixelShaderPullsBary = wm_prog_data->pulls_bary;
#endif
psx.PixelShaderComputesStencil = wm_prog_data->computed_stencil;
#endif
}
+2
View File
@@ -967,7 +967,9 @@ blorp_emit_ps_config(struct blorp_batch *batch,
blorp_emit(batch, GENX(3DSTATE_PS_EXTRA), psx) {
if (prog_data) {
psx.PixelShaderValid = true;
#if GFX_VER < 20
psx.AttributeEnable = prog_data->num_varying_inputs > 0;
#endif
psx.PixelShaderIsPerSample = prog_data->persample_dispatch;
psx.PixelShaderComputedDepthMode = prog_data->computed_depth_mode;
#if GFX_VER >= 9
+39
View File
@@ -279,6 +279,45 @@
</field>
<field name="Kernel Start Pointer 1" start="262" end="319" type="offset" />
</instruction>
<instruction name="3DSTATE_PS_EXTRA" bias="2" length="2" engine="render">
<field name="DWord Length" start="0" end="7" type="uint" default="0" />
<field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="79" />
<field name="3D Command Opcode" start="24" end="26" type="uint" default="0" />
<field name="Command SubType" start="27" end="28" type="uint" default="3" />
<field name="Command Type" start="29" end="31" type="uint" default="3" />
<field name="Input Coverage Mask State" start="32" end="33" type="uint" prefix="ICMS">
<value name="NONE" value="0" />
<value name="NORMAL" value="1" />
<value name="INNER_CONSERVATIVE" value="2" />
<value name="DEPTH_COVERAGE" value="3" />
</field>
<field name="Pixel Shader Has UAV" start="34" end="34" type="bool" />
<field name="Pixel Shader Is Per Coarse Pixel" start="36" end="36" type="bool" />
<field name="Pixel Shader Computes Stencil" start="37" end="37" type="bool" />
<field name="Pixel Shader Is Per Sample" start="38" end="38" type="bool" />
<field name="Pixel Shader Disables Alpha To Coverage" start="39" end="39" type="bool" />
<field name="Simple PS Hint" start="41" end="41" type="bool" />
<field name="Pixel Shader Requires Centroid Offsets" start="48" end="48" type="bool" />
<field name="Enable PS Dependency On CPsize Change" start="49" end="49" type="bool" />
<field name="Pixel Shader Requires Subpixel Sample Offsets" start="50" end="50" type="bool" />
<field name="Pixel Shader Requires Non-Perspective Bary Plane Coefficients" start="51" end="51" type="bool" />
<field name="Pixel Shader Requires Perspective Bary Plane Coefficients" start="52" end="52" type="bool" />
<field name="Pixel Shader Requires Source Depth and/or W Plane Coefficients" start="53" end="53" type="bool" />
<field name="Pixel Shader Requires Requested Coarse Pixel Shading Size" start="54" end="54" type="bool" />
<field name="Pixel Shader Uses Source W" start="55" end="55" type="bool" />
<field name="Pixel Shader Uses Source Depth" start="56" end="56" type="bool" />
<field name="Force Computed Depth" start="57" end="57" type="bool" />
<field name="Pixel Shader Computed Depth Mode" start="58" end="59" type="uint">
<value name="PSCDEPTH_OFF" value="0" />
<value name="PSCDEPTH_ON" value="1" />
<value name="PSCDEPTH_ON_GE" value="2" />
<value name="PSCDEPTH_ON_LE" value="3" />
</field>
<field name="Pixel Shader Kills Pixel" start="60" end="60" type="bool" />
<field name="oMask Present to Render Target" start="61" end="61" type="bool" />
<field name="Pixel Shader Does not write to RT" start="62" end="62" type="mbz" />
<field name="Pixel Shader Valid" start="63" end="63" type="bool" />
</instruction>
<instruction name="3DSTATE_STENCIL_BUFFER" bias="2" length="8" engine="render">
<field name="DWord Length" start="0" end="7" type="uint" default="6" />
<field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6" />
+6
View File
@@ -1631,7 +1631,9 @@ emit_3dstate_ps_extra(struct anv_graphics_pipeline *pipeline,
anv_pipeline_emit(pipeline, final.ps_extra, GENX(3DSTATE_PS_EXTRA), ps) {
ps.PixelShaderValid = true;
#if GFX_VER < 20
ps.AttributeEnable = wm_prog_data->num_varying_inputs > 0;
#endif
ps.oMaskPresenttoRenderTarget = wm_prog_data->uses_omask;
ps.PixelShaderIsPerSample =
brw_wm_prog_data_is_persample(wm_prog_data, pipeline->fs_msaa_flags);
@@ -1649,7 +1651,11 @@ emit_3dstate_ps_extra(struct anv_graphics_pipeline *pipeline,
wm_prog_data->uses_kill;
ps.PixelShaderComputesStencil = wm_prog_data->computed_stencil;
#if GFX_VER >= 20
assert(!wm_prog_data->pulls_bary);
#else
ps.PixelShaderPullsBary = wm_prog_data->pulls_bary;
#endif
ps.InputCoverageMaskState = ICMS_NONE;
assert(!wm_prog_data->inner_coverage); /* Not available in SPIR-V */
+2
View File
@@ -212,7 +212,9 @@ genX(emit_simpler_shader_init_fragment)(struct anv_simple_shader *state)
anv_batch_emit(batch, GENX(3DSTATE_PS_EXTRA), psx) {
psx.PixelShaderValid = true;
#if GFX_VER < 20
psx.AttributeEnable = prog_data->num_varying_inputs > 0;
#endif
psx.PixelShaderIsPerSample = prog_data->persample_dispatch;
psx.PixelShaderComputedDepthMode = prog_data->computed_depth_mode;
psx.PixelShaderComputesStencil = prog_data->computed_stencil;