aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_clear.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawtex.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_xformfb.c20
-rw-r--r--mesalib/src/mesa/state_tracker/st_format.c4
6 files changed, 19 insertions, 13 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
index 874ff77b5..e3ba5a88f 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
@@ -513,7 +513,7 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
}
cso_set_vertex_elements(cso, 3, st->velems_util_draw);
- cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
+ cso_set_stream_outputs(st->cso_context, 0, NULL, NULL);
/* convert Z from [0,1] to [-1,-1] to match viewport Z scale/bias */
z = z * 2.0f - 1.0f;
diff --git a/mesalib/src/mesa/state_tracker/st_cb_clear.c b/mesalib/src/mesa/state_tracker/st_cb_clear.c
index 97cc5a232..fcd7e1382 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_clear.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_clear.c
@@ -307,7 +307,7 @@ clear_with_quad(struct gl_context *ctx, unsigned clear_buffers)
}
cso_set_vertex_elements(st->cso_context, 2, st->velems_util_draw);
- cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
+ cso_set_stream_outputs(st->cso_context, 0, NULL, NULL);
cso_set_sample_mask(st->cso_context, ~0);
cso_set_rasterizer(st->cso_context, &st->clear.raster);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index 90f34e39e..2b3636151 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -788,7 +788,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
}
cso_set_vertex_elements(cso, 3, st->velems_util_draw);
- cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
+ cso_set_stream_outputs(st->cso_context, 0, NULL, NULL);
/* texture state: */
cso_set_sampler_views(cso, PIPE_SHADER_FRAGMENT, num_sampler_view, sv);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawtex.c b/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
index 047cf47b0..b0a44fd90 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
@@ -244,7 +244,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
velements[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
}
cso_set_vertex_elements(cso, numAttribs, velements);
- cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
+ cso_set_stream_outputs(st->cso_context, 0, NULL, NULL);
/* viewport state: viewport matching window dims */
{
diff --git a/mesalib/src/mesa/state_tracker/st_cb_xformfb.c b/mesalib/src/mesa/state_tracker/st_cb_xformfb.c
index e824fe9b3..8f75eda8a 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_xformfb.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_xformfb.c
@@ -113,6 +113,7 @@ st_begin_transform_feedback(struct gl_context *ctx, GLenum mode,
struct st_transform_feedback_object *sobj =
st_transform_feedback_object(obj);
unsigned i, max_num_targets;
+ unsigned offsets[PIPE_MAX_SO_BUFFERS] = {0};
max_num_targets = MIN2(Elements(sobj->base.Buffers),
Elements(sobj->targets));
@@ -145,8 +146,8 @@ st_begin_transform_feedback(struct gl_context *ctx, GLenum mode,
}
/* Start writing at the beginning of each target. */
- cso_set_stream_outputs(st->cso_context, sobj->num_targets, sobj->targets,
- 0);
+ cso_set_stream_outputs(st->cso_context, sobj->num_targets,
+ sobj->targets, offsets);
}
@@ -155,7 +156,7 @@ st_pause_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
struct st_context *st = st_context(ctx);
- cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
+ cso_set_stream_outputs(st->cso_context, 0, NULL, NULL);
}
@@ -165,10 +166,15 @@ st_resume_transform_feedback(struct gl_context *ctx,
{
struct st_context *st = st_context(ctx);
struct st_transform_feedback_object *sobj =
- st_transform_feedback_object(obj);
+ st_transform_feedback_object(obj);
+ unsigned offsets[PIPE_MAX_SO_BUFFERS];
+ unsigned i;
+
+ for (i = 0; i < PIPE_MAX_SO_BUFFERS; i++)
+ offsets[i] = (unsigned)-1;
- cso_set_stream_outputs(st->cso_context, sobj->num_targets, sobj->targets,
- ~0);
+ cso_set_stream_outputs(st->cso_context, sobj->num_targets,
+ sobj->targets, offsets);
}
@@ -198,7 +204,7 @@ st_end_transform_feedback(struct gl_context *ctx,
struct st_transform_feedback_object *sobj =
st_transform_feedback_object(obj);
- cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
+ cso_set_stream_outputs(st->cso_context, 0, NULL, NULL);
pipe_so_target_reference(&sobj->draw_count,
st_transform_feedback_get_draw_target(obj));
diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c
index a55ee3079..cd6b46681 100644
--- a/mesalib/src/mesa/state_tracker/st_format.c
+++ b/mesalib/src/mesa/state_tracker/st_format.c
@@ -109,7 +109,7 @@ st_mesa_format_to_pipe_format(mesa_format mesaFormat)
return PIPE_FORMAT_S8_UINT_Z24_UNORM;
case MESA_FORMAT_Z24_UNORM_S8_UINT:
return PIPE_FORMAT_Z24_UNORM_S8_UINT;
- case MESA_FORMAT_X8Z24_UNORM:
+ case MESA_FORMAT_X8_UINT_Z24_UNORM:
return PIPE_FORMAT_X8Z24_UNORM;
case MESA_FORMAT_Z24_UNORM_X8_UINT:
return PIPE_FORMAT_Z24X8_UNORM;
@@ -470,7 +470,7 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return MESA_FORMAT_S8_UINT_Z24_UNORM;
case PIPE_FORMAT_X8Z24_UNORM:
- return MESA_FORMAT_X8Z24_UNORM;
+ return MESA_FORMAT_X8_UINT_Z24_UNORM;
case PIPE_FORMAT_Z24X8_UNORM:
return MESA_FORMAT_Z24_UNORM_X8_UINT;
case PIPE_FORMAT_Z24_UNORM_S8_UINT: