iris: bits of multisample program key
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 16 Jul 2018 22:36:34 +0000 (15:36 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:07 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_screen.c
src/gallium/drivers/iris/iris_state.c

index 0401bd230bf6f1553e929860d5e5fd0531ec7872..654956d3c40970e29660afc3eaabe5c747f13c58 100644 (file)
@@ -165,6 +165,7 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
    case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
    case PIPE_CAP_GENERATE_MIPMAP:
+   case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
       return false;
 
    case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
@@ -244,7 +245,6 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
    case PIPE_CAP_DEPTH_BOUNDS_TEST:
    case PIPE_CAP_TGSI_TXQS:
-   case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
    case PIPE_CAP_SHAREABLE_SHADERS:
    case PIPE_CAP_CLEAR_TEXTURE:
    case PIPE_CAP_DRAW_PARAMETERS:
index e0d68cab98cde6079e93e6558da633118eaaa8b6..59562a49fedb043a85863e85b5f33792358e0b1f 100644 (file)
@@ -623,6 +623,8 @@ struct iris_rasterizer_state {
    bool half_pixel_center; /* for 3DSTATE_MULTISAMPLE */
    bool line_stipple_enable;
    bool poly_stipple_enable;
+   bool multisample;
+   bool force_persample_interp;
    enum pipe_sprite_coord_mode sprite_coord_mode; /* PIPE_SPRITE_* */
    uint16_t sprite_coord_enable;
 };
@@ -647,6 +649,8 @@ iris_create_rasterizer_state(struct pipe_context *ctx,
    }
    #endif
 
+   cso->multisample = state->multisample;
+   cso->force_persample_interp = state->force_persample_interp;
    cso->clip_halfz = state->clip_halfz;
    cso->depth_clip_near = state->depth_clip_near;
    cso->depth_clip_far = state->depth_clip_far;
@@ -2128,19 +2132,15 @@ iris_populate_fs_key(const struct iris_context *ice,
    /* XXX: only bother if COL0/1 are read */
    key->flat_shade = rast->flatshade;
 
-   // key->force_dual_color_blend for unigine
-#if 0
-   if (cso_rast->multisample) {
-      key->persample_interp =
-         ctx->Multisample.SampleShading &&
-         (ctx->Multisample.MinSampleShadingValue *
-          _mesa_geometric_samples(ctx->DrawBuffer) > 1);
-
-      key->multisample_fbo = fb->samples > 1;
-   }
-#endif
+   key->persample_interp = rast->force_persample_interp;
+   key->multisample_fbo = rast->multisample && fb->samples > 1;
 
    key->coherent_fb_fetch = true;
+
+   // XXX: uint64_t input_slots_valid; - for >16 inputs
+
+   // XXX: key->force_dual_color_blend for unigine
+   // XXX: respect hint for high_quality_derivatives:1;
 }
 
 #if 0