gallium: add per-sample interpolation control into rasterizer statOAe
Required by ARB_sample_shading for drivers that don't want a shader variant in st/mesa. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
@@ -268,6 +268,15 @@ The integer capabilities:
|
|||||||
bounds_max states of pipe_depth_stencil_alpha_state behave according
|
bounds_max states of pipe_depth_stencil_alpha_state behave according
|
||||||
to the GL_EXT_depth_bounds_test specification.
|
to the GL_EXT_depth_bounds_test specification.
|
||||||
* ``PIPE_CAP_TGSI_TXQS``: Whether the `TXQS` opcode is supported
|
* ``PIPE_CAP_TGSI_TXQS``: Whether the `TXQS` opcode is supported
|
||||||
|
* ``PIPE_CAP_FORCE_PERSAMPLE_INTERP``: If the driver can force per-sample
|
||||||
|
interpolation for all fragment shader inputs if
|
||||||
|
pipe_rasterizer_state::force_persample_interp is set. This is only used
|
||||||
|
by GL3-level sample shading (ARB_sample_shading). GL4-level sample shading
|
||||||
|
(ARB_gpu_shader5) doesn't use this. While GL3 hardware has a state for it,
|
||||||
|
GL4 hardware will likely need to emulate it with a shader variant, or by
|
||||||
|
selecting the interpolation weights with a conditional assignment
|
||||||
|
in the shader.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. _pipe_capf:
|
.. _pipe_capf:
|
||||||
|
@@ -235,6 +235,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_MAX_VIEWPORTS:
|
case PIPE_CAP_MAX_VIEWPORTS:
|
||||||
|
@@ -248,6 +248,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
|
|||||||
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
|
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
|
||||||
|
@@ -470,6 +470,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_VENDOR_ID:
|
case PIPE_CAP_VENDOR_ID:
|
||||||
|
@@ -297,6 +297,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* should only get here on unhandled cases */
|
/* should only get here on unhandled cases */
|
||||||
|
@@ -170,6 +170,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_TEXTURE_FLOAT_LINEAR:
|
case PIPE_CAP_TEXTURE_FLOAT_LINEAR:
|
||||||
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_VENDOR_ID:
|
case PIPE_CAP_VENDOR_ID:
|
||||||
|
@@ -215,6 +215,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
|
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
|
||||||
case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
|
case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
|
||||||
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_VENDOR_ID:
|
case PIPE_CAP_VENDOR_ID:
|
||||||
|
@@ -201,6 +201,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_VERTEXID_NOBASE:
|
case PIPE_CAP_VERTEXID_NOBASE:
|
||||||
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
|
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
|
||||||
case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
|
case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_VENDOR_ID:
|
case PIPE_CAP_VENDOR_ID:
|
||||||
|
@@ -196,6 +196,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* SWTCL-only features. */
|
/* SWTCL-only features. */
|
||||||
|
@@ -342,6 +342,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_VERTEXID_NOBASE:
|
case PIPE_CAP_VERTEXID_NOBASE:
|
||||||
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Stream output. */
|
/* Stream output. */
|
||||||
|
@@ -336,6 +336,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
|
case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
|
||||||
case PIPE_CAP_SAMPLER_VIEW_TARGET:
|
case PIPE_CAP_SAMPLER_VIEW_TARGET:
|
||||||
case PIPE_CAP_VERTEXID_NOBASE:
|
case PIPE_CAP_VERTEXID_NOBASE:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
||||||
|
@@ -247,6 +247,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* should only get here on unhandled cases */
|
/* should only get here on unhandled cases */
|
||||||
|
@@ -380,6 +380,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -181,6 +181,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
|
||||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||||
case PIPE_CAP_TGSI_TXQS:
|
case PIPE_CAP_TGSI_TXQS:
|
||||||
|
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Stream output. */
|
/* Stream output. */
|
||||||
|
@@ -631,6 +631,7 @@ enum pipe_cap
|
|||||||
PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR,
|
PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR,
|
||||||
PIPE_CAP_DEPTH_BOUNDS_TEST,
|
PIPE_CAP_DEPTH_BOUNDS_TEST,
|
||||||
PIPE_CAP_TGSI_TXQS,
|
PIPE_CAP_TGSI_TXQS,
|
||||||
|
PIPE_CAP_FORCE_PERSAMPLE_INTERP,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
|
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
|
||||||
|
@@ -103,6 +103,7 @@ struct pipe_rasterizer_state
|
|||||||
unsigned point_tri_clip:1; /** large points clipped as tris or points */
|
unsigned point_tri_clip:1; /** large points clipped as tris or points */
|
||||||
unsigned point_size_per_vertex:1; /**< size computed in vertex shader */
|
unsigned point_size_per_vertex:1; /**< size computed in vertex shader */
|
||||||
unsigned multisample:1; /* XXX maybe more ms state in future */
|
unsigned multisample:1; /* XXX maybe more ms state in future */
|
||||||
|
unsigned force_persample_interp:1;
|
||||||
unsigned line_smooth:1;
|
unsigned line_smooth:1;
|
||||||
unsigned line_stipple_enable:1;
|
unsigned line_stipple_enable:1;
|
||||||
unsigned line_last_pixel:1;
|
unsigned line_last_pixel:1;
|
||||||
|
Reference in New Issue
Block a user