mesa,gallium: Revert "Make point coord origin a CAP"

This reverts commit e749f67f89, which added a CAP
to support drivers that can only do upside-down point coordinates. That was
added specifically for Asahi, since Metal's point coordinate convention is
opposite Mesa's. Since then, additional reverse-engineering aided by the PowerVR
headers led me to the bit doing the flip in hardware, so Asahi does not use the
CAP since baadc1ec13 ("asahi: Don't use lower_wpos_pntc"). Garbage collect it.

[If it's needed for future hardware, we can revive it. But the plan is Vulkan
anyway.]

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19078>
This commit is contained in:
Alyssa Rosenzweig
2022-10-14 13:45:48 -04:00
committed by Marge Bot
parent 86c9aa6bfe
commit 4c7a44413a
8 changed files with 1 additions and 18 deletions

View File

@@ -71,8 +71,6 @@ The integer capabilities:
pixel-center fragment convention is supported.
* ``PIPE_CAP_FS_COORD_PIXEL_CENTER_INTEGER``: Whether the integer
pixel-center fragment convention is supported.
* ``PIPE_CAP_POINT_COORD_ORIGIN_UPPER_LEFT``: Whether point coordinates use the
upper-left origin convention. Otherwise the lower-left convention is used.
* ``PIPE_CAP_DEPTH_CLIP_DISABLE``: Whether the driver is capable of disabling
depth clipping (through pipe_rasterizer_state).
* ``PIPE_CAP_DEPTH_CLIP_DISABLE_SEPARATE``: Whether the driver is capable of

View File

@@ -75,11 +75,6 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
case PIPE_CAP_FS_COORD_ORIGIN_LOWER_LEFT:
case PIPE_CAP_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
case PIPE_CAP_FS_COORD_PIXEL_CENTER_INTEGER:
return 0;
case PIPE_CAP_POINT_COORD_ORIGIN_UPPER_LEFT:
return 1;
case PIPE_CAP_DEPTH_CLIP_DISABLE:
case PIPE_CAP_DEPTH_CLIP_DISABLE_SEPARATE:
case PIPE_CAP_DEPTH_CLAMP_ENABLE:

View File

@@ -218,7 +218,6 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_INDEP_BLEND_ENABLE:
case PIPE_CAP_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
case PIPE_CAP_POINT_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_PRIMITIVE_RESTART:
case PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX:
case PIPE_CAP_VS_INSTANCEID:

View File

@@ -243,7 +243,6 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_INDEP_BLEND_FUNC:
case PIPE_CAP_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
case PIPE_CAP_POINT_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_PRIMITIVE_RESTART:
case PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX:
case PIPE_CAP_VS_INSTANCEID:

View File

@@ -755,7 +755,6 @@ enum pipe_cap
PIPE_CAP_FS_COORD_ORIGIN_LOWER_LEFT,
PIPE_CAP_FS_COORD_PIXEL_CENTER_HALF_INTEGER,
PIPE_CAP_FS_COORD_PIXEL_CENTER_INTEGER,
PIPE_CAP_POINT_COORD_ORIGIN_UPPER_LEFT,
PIPE_CAP_DEPTH_CLIP_DISABLE,
PIPE_CAP_DEPTH_CLIP_DISABLE_SEPARATE,
PIPE_CAP_DEPTH_CLAMP_ENABLE,

View File

@@ -993,8 +993,5 @@ struct gl_constants
/** Use hardware accelerated GL_SELECT */
bool HardwareAcceleratedSelect;
/** Origin of point coordinates. True if upper left, false if lower left. */
bool PointCoordOriginUpperLeft;
};
#endif

View File

@@ -743,8 +743,7 @@ fetch_state(struct gl_context *ctx, const gl_state_index16 state[],
case STATE_FB_PNTC_Y_TRANSFORM:
{
bool flip_y = (ctx->Point.SpriteOrigin == GL_UPPER_LEFT) ^
(ctx->Const.PointCoordOriginUpperLeft) ^
bool flip_y = (ctx->Point.SpriteOrigin == GL_LOWER_LEFT) ^
(ctx->DrawBuffer->FlipY);
value[0] = flip_y ? -1.0F : 1.0F;

View File

@@ -700,9 +700,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
ctx->Point.MaxSize = MAX2(ctx->Const.MaxPointSize,
ctx->Const.MaxPointSizeAA);
ctx->Const.PointCoordOriginUpperLeft =
screen->get_param(screen, PIPE_CAP_POINT_COORD_ORIGIN_UPPER_LEFT);
ctx->Const.NoClippingOnCopyTex = screen->get_param(screen,
PIPE_CAP_NO_CLIP_ON_COPY_TEX);