From aeb6fc8782a39544d1547e1b0a3f379a8be2b3aa Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 Jul 2018 15:36:34 -0700 Subject: [PATCH] iris: bits of multisample program key --- src/gallium/drivers/iris/iris_screen.c | 2 +- src/gallium/drivers/iris/iris_state.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 0401bd230bf..654956d3c40 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -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: diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index e0d68cab98c..59562a49fed 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -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 -- 2.30.2