intel/genxml: set a default value for "Pixel Position Offset Enable" in genxml

Set the default value for "Pixel Position Offset Enable" when emitting
3DSTATE_MULTISAMPLE in the genxml so that we can drop it from blorp
and genX_state.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23936>
This commit is contained in:
Rohan Garg 2023-06-29 19:10:10 +02:00 committed by Marge Bot
parent e6f0819806
commit 614efeeafe
7 changed files with 9 additions and 25 deletions

View File

@ -1276,16 +1276,8 @@ blorp_emit_3dstate_multisample(struct blorp_batch *batch,
{
blorp_emit(batch, GENX(3DSTATE_MULTISAMPLE), ms) {
ms.NumberofMultisamples = __builtin_ffs(params->num_samples) - 1;
#if GFX_VER >= 8
/* The PRM says that this bit is valid only for DX9:
*
* SW can choose to set this bit only for DX9 API. DX10/OGL API's
* should not have any effect by setting or not setting this bit.
*/
ms.PixelPositionOffsetEnable = false;
#elif GFX_VER >= 7
ms.PixelLocation = CENTER;
#if GFX_VER >= 7 && GFX_VER < 8
switch (params->num_samples) {
case 1:
INTEL_SAMPLE_POS_1X(ms.Sample);
@ -1302,10 +1294,9 @@ blorp_emit_3dstate_multisample(struct blorp_batch *batch,
default:
break;
}
#else
#elif GFX_VER < 7
INTEL_SAMPLE_POS_4X(ms.Sample);
#endif
ms.PixelLocation = CENTER;
}
}

View File

@ -1930,7 +1930,7 @@
<value name="CENTER" value="0" />
<value name="UL_CORNER" value="1" />
</field>
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" />
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" default="0" />
</instruction>
<instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2" engine="render">
<field name="DWord Length" start="0" end="7" type="uint" default="0" />

View File

@ -1988,7 +1988,7 @@
<value name="CENTER" value="0" />
<value name="UL_CORNER" value="1" />
</field>
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" />
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" default="0" />
</instruction>
<instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2" engine="render">
<field name="DWord Length" start="0" end="7" type="uint" default="0" />

View File

@ -2222,7 +2222,7 @@
<value name="CENTER" value="0" />
<value name="UL_CORNER" value="1" />
</field>
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" />
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" default="0" />
</instruction>
<instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2" engine="render">
<field name="DWord Length" start="0" end="7" type="uint" default="0" />

View File

@ -1395,7 +1395,7 @@
<value name="CENTER" value="0" />
<value name="UL_CORNER" value="1" />
</field>
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" />
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" default="0" />
</instruction>
<instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2" engine="render">
<field name="DWord Length" start="0" end="7" type="uint" default="0" />

View File

@ -1745,7 +1745,7 @@
<value name="CENTER" value="0" />
<value name="UL_CORNER" value="1" />
</field>
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" />
<field name="Pixel Position Offset Enable" start="37" end="37" type="bool" default="0" />
</instruction>
<instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2" engine="render">
<field name="DWord Length" start="0" end="7" type="uint" default="0" />

View File

@ -250,14 +250,7 @@ genX(emit_multisample)(struct anv_batch *batch, uint32_t samples,
ms.NumberofMultisamples = __builtin_ffs(samples) - 1;
ms.PixelLocation = CENTER;
#if GFX_VER >= 8
/* The PRM says that this bit is valid only for DX9:
*
* SW can choose to set this bit only for DX9 API. DX10/OGL API's
* should not have any effect by setting or not setting this bit.
*/
ms.PixelPositionOffsetEnable = false;
#else
#if GFX_VER < 8
switch (samples) {
case 1:
INTEL_SAMPLE_POS_1X_ARRAY(ms.Sample, sl->locations);