iris: msaa sample count packing problems
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 20 Jan 2018 08:59:49 +0000 (00:59 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
0 -> ffffffffffffffffffffffffffff

src/gallium/drivers/iris/iris_state.c

index 96eea8511d252fd29fe07908e63a98ce1e959f41..348647d9aeaa9ecefe253217f7c2d6637922ae94 100644 (file)
@@ -483,7 +483,6 @@ iris_create_rasterizer_state(struct pipe_context *ctx,
    cso->flatshade = state->flatshade;
    cso->light_twoside = state->light_twoside;
    cso->rasterizer_discard = state->rasterizer_discard;
-   // for 3DSTATE_MULTISAMPLE, if we want it.
    cso->half_pixel_center = state->half_pixel_center;
 
    iris_pack_command(GENX(3DSTATE_SF), cso->sf, sf) {
@@ -1398,7 +1397,8 @@ iris_upload_render_state(struct iris_context *ice,
       iris_emit_cmd(batch, GENX(3DSTATE_MULTISAMPLE), ms) {
          ms.PixelLocation =
             ice->state.cso_rast->half_pixel_center ? CENTER : UL_CORNER;
-         ms.NumberofMultisamples = ffs(ice->state.framebuffer.samples) - 1;
+         if (ice->state.framebuffer.samples > 0)
+            ms.NumberofMultisamples = ffs(ice->state.framebuffer.samples) - 1;
       }
    }