From 6b92a06ea32492d2ff968038672d104b711b66f0 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 4 Jul 2014 23:01:39 -0400 Subject: mesa/st: add per sample shading state to fp key and set interpolation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This enables a gallium driver not to care about the semantics of ARB_sample_shading vs ARB_gpu_shader5 sample attributes. When ARB_sample_shading-style sample shading is enabled, all of the fp inputs are marked for interpolation at the sample location. Signed-off-by: Ilia Mirkin Reviewed-by: Roland Scheidegger Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_program.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/state_tracker/st_program.c') diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index b603759f8f8..9d7b7c475a6 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -548,6 +548,9 @@ st_translate_fragment_program(struct st_context *st, else interpLocation[slot] = TGSI_INTERPOLATE_LOC_CENTER; + if (key->persample_shading) + interpLocation[slot] = TGSI_INTERPOLATE_LOC_SAMPLE; + switch (attr) { case VARYING_SLOT_POS: input_semantic_name[slot] = TGSI_SEMANTIC_POSITION; -- cgit v1.2.3