mesa: add some new constants
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 22 Jun 2023 00:18:53 +0000 (10:18 +1000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Jul 2023 01:21:06 +0000 (01:21 +0000)
These will be used by the compiler in a following patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22846>

src/mesa/main/consts_exts.h
src/mesa/state_tracker/st_extensions.c

index e7c4264..d1e745d 100644 (file)
@@ -941,6 +941,15 @@ struct gl_constants
    /** Is the drivers uniform storage packed or padded to 16 bytes. */
    bool PackedDriverUniformStorage;
 
+   bool HasFBFetch;
+
+   /** Whether the backend supports reading from outputs */
+   bool SupportsReadingOutputs;
+
+   bool CombinedClipCullDistanceArrays;
+
+   bool PointSizeFixed;
+
    /** Wether or not glBitmap uses red textures rather than alpha */
    bool BitmapUsesRed;
 
index 4f737b0..0921391 100644 (file)
@@ -168,6 +168,14 @@ void st_init_limits(struct pipe_screen *screen,
     */
    c->MaxUniformBlockSize &= ~3;
 
+   c->HasFBFetch = screen->get_param(screen, PIPE_CAP_FBFETCH);
+
+   c->SupportsReadingOutputs = screen->get_param(screen, PIPE_CAP_SHADER_CAN_READ_OUTPUTS);
+
+   c->CombinedClipCullDistanceArrays = !screen->get_param(screen, PIPE_CAP_CULL_DISTANCE_NOCOMBINE);
+
+   c->PointSizeFixed = screen->get_param(screen, PIPE_CAP_POINT_SIZE_FIXED);
+
    for (sh = 0; sh < PIPE_SHADER_TYPES; ++sh) {
       const gl_shader_stage stage = tgsi_processor_to_shader_stage(sh);
       struct gl_shader_compiler_options *options =