diff options
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom.c | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom.h | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_sampler.c | 5 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_texture.c | 18 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_fbo.c | 1 |
5 files changed, 15 insertions, 11 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom.c b/mesalib/src/mesa/state_tracker/st_atom.c index 34dff79e7..95010d1b2 100644 --- a/mesalib/src/mesa/state_tracker/st_atom.c +++ b/mesalib/src/mesa/state_tracker/st_atom.c @@ -56,6 +56,7 @@ static const struct st_tracked_state *atoms[] = &st_update_scissor,
&st_update_blend,
&st_update_sampler,
+ &st_update_vertex_texture,
&st_update_texture,
&st_update_framebuffer,
&st_update_msaa,
diff --git a/mesalib/src/mesa/state_tracker/st_atom.h b/mesalib/src/mesa/state_tracker/st_atom.h index aec5785e6..b5f837f78 100644 --- a/mesalib/src/mesa/state_tracker/st_atom.h +++ b/mesalib/src/mesa/state_tracker/st_atom.h @@ -60,6 +60,7 @@ extern const struct st_tracked_state st_update_blend; extern const struct st_tracked_state st_update_msaa;
extern const struct st_tracked_state st_update_sampler;
extern const struct st_tracked_state st_update_texture;
+extern const struct st_tracked_state st_update_vertex_texture;
extern const struct st_tracked_state st_finalize_textures;
extern const struct st_tracked_state st_update_fs_constants;
extern const struct st_tracked_state st_update_gs_constants;
diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c index e05316067..627a13387 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c +++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c @@ -133,6 +133,8 @@ static void convert_sampler(struct st_context *st, }
msamp = _mesa_get_samplerobj(st->ctx, texUnit);
+
+ memset(sampler, 0, sizeof(*sampler));
sampler->wrap_s = gl_wrap_xlate(msamp->WrapS);
sampler->wrap_t = gl_wrap_xlate(msamp->WrapT);
sampler->wrap_r = gl_wrap_xlate(msamp->WrapR);
@@ -201,8 +203,6 @@ update_vertex_samplers(struct st_context *st) for (su = 0; su < st->ctx->Const.MaxVertexTextureImageUnits; su++) {
struct pipe_sampler_state *sampler = st->state.vertex_samplers + su;
- memset(sampler, 0, sizeof(*sampler));
-
if (vprog->Base.SamplersUsed & (1 << su)) {
GLuint texUnit;
@@ -232,7 +232,6 @@ update_fragment_samplers(struct st_context *st) for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) {
struct pipe_sampler_state *sampler = st->state.samplers + su;
- memset(sampler, 0, sizeof(*sampler));
if (fprog->Base.SamplersUsed & (1 << su)) {
GLuint texUnit;
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c index 418bc85cc..7bb950a76 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_texture.c +++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c @@ -317,20 +317,22 @@ update_fragment_textures(struct st_context *st) st->state.sampler_views);
}
-static void
-update_textures(struct st_context *st)
-{
- update_fragment_textures(st);
- update_vertex_textures(st);
-}
-
const struct st_tracked_state st_update_texture = {
"st_update_texture", /* name */
{ /* dirty */
_NEW_TEXTURE, /* mesa */
ST_NEW_FRAGMENT_PROGRAM, /* st */
},
- update_textures /* update */
+ update_fragment_textures /* update */
+};
+
+const struct st_tracked_state st_update_vertex_texture = {
+ "st_update_vertex_texture", /* name */
+ { /* dirty */
+ _NEW_TEXTURE, /* mesa */
+ ST_NEW_VERTEX_PROGRAM, /* st */
+ },
+ update_vertex_textures /* update */
};
static void
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c index 0fc743a87..2e87d202c 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c +++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c @@ -90,6 +90,7 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, strb->Base.Format = st_pipe_format_to_mesa_format(format);
strb->Base._BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
strb->Base.DataType = st_format_datatype(format);
+ strb->format = format;
strb->defined = GL_FALSE; /* undefined contents now */
|