summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-01-20 00:59:49 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:05 -0800
commit793276cd8b358738f6fcb1d8500b1858ca77748b (patch)
tree55e0baf35677b490fc0831b755833c98a1befbd4 /src
parent0252fb36e973715e10cdde0895172655af8a19e2 (diff)
iris: msaa sample count packing problems
0 -> ffffffffffffffffffffffffffff
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 96eea8511d2..348647d9aea 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -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;
}
}