vc4: Add support for 16-bit signed/unsigned norm/scaled vertex attrs.
[mesa.git] / src / gallium / drivers / r600 / r600_state.c
index 8dc25da8089e3be5b02653e9ca7de4b640a073e7..9a4b9725ab8646364b842453a7353f269d7baf43 100644 (file)
@@ -536,9 +536,9 @@ static void *r600_create_rs_state(struct pipe_context *ctx,
                                 S_028814_CULL_FRONT(state->cull_face & PIPE_FACE_FRONT ? 1 : 0) |
                                 S_028814_CULL_BACK(state->cull_face & PIPE_FACE_BACK ? 1 : 0) |
                                 S_028814_FACE(!state->front_ccw) |
-                                S_028814_POLY_OFFSET_FRONT_ENABLE(state->offset_tri) |
-                                S_028814_POLY_OFFSET_BACK_ENABLE(state->offset_tri) |
-                                S_028814_POLY_OFFSET_PARA_ENABLE(state->offset_tri) |
+                                S_028814_POLY_OFFSET_FRONT_ENABLE(util_get_offset(state, state->fill_front)) |
+                                S_028814_POLY_OFFSET_BACK_ENABLE(util_get_offset(state, state->fill_back)) |
+                                S_028814_POLY_OFFSET_PARA_ENABLE(state->offset_point || state->offset_line) |
                                 S_028814_POLY_MODE(state->fill_front != PIPE_POLYGON_MODE_FILL ||
                                                                         state->fill_back != PIPE_POLYGON_MODE_FILL) |
                                 S_028814_POLYMODE_FRONT_PTYPE(r600_translate_fill(state->fill_front)) |
@@ -2659,11 +2659,8 @@ void r600_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
        r600_store_context_reg(cb, R_028A6C_VGT_GS_OUT_PRIM_TYPE,
                               r600_conv_prim_to_gs_out(rshader->gs_output_prim));
 
-       r600_store_context_reg_seq(cb, R_0288C8_SQ_GS_VERT_ITEMSIZE, 4);
-       r600_store_value(cb, cp_shader->ring_item_size >> 2);
-       r600_store_value(cb, 0);
-       r600_store_value(cb, 0);
-       r600_store_value(cb, 0);
+       r600_store_context_reg(cb, R_0288C8_SQ_GS_VERT_ITEMSIZE,
+                              cp_shader->ring_item_size >> 2);
 
        r600_store_context_reg(cb, R_0288A8_SQ_ESGS_RING_ITEMSIZE,
                               (rshader->ring_item_size) >> 2);