mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-26 13:30:39 +01:00
st/mesa: don't use cso_context to restore VBs, etc. for PBO glTexSubImage
These cso_context capabilities will be removed. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
This commit is contained in:
parent
7c7a6e05f4
commit
d107eef04f
2 changed files with 8 additions and 7 deletions
|
|
@ -1275,9 +1275,7 @@ try_pbo_upload_common(struct gl_context *ctx,
|
|||
if (!fs)
|
||||
return false;
|
||||
|
||||
cso_save_state(cso, (CSO_BIT_FRAGMENT_SAMPLER_VIEWS |
|
||||
CSO_BIT_VERTEX_ELEMENTS |
|
||||
CSO_BIT_AUX_VERTEX_BUFFER_SLOT |
|
||||
cso_save_state(cso, (CSO_BIT_VERTEX_ELEMENTS |
|
||||
CSO_BIT_FRAMEBUFFER |
|
||||
CSO_BIT_VIEWPORT |
|
||||
CSO_BIT_BLEND |
|
||||
|
|
@ -1289,7 +1287,6 @@ try_pbo_upload_common(struct gl_context *ctx,
|
|||
CSO_BIT_MIN_SAMPLES |
|
||||
CSO_BIT_RENDER_CONDITION |
|
||||
CSO_BITS_ALL_SHADERS));
|
||||
cso_save_constant_buffer_slot0(cso, PIPE_SHADER_FRAGMENT);
|
||||
|
||||
cso_set_sample_mask(cso, ~0);
|
||||
cso_set_min_samples(cso, 1);
|
||||
|
|
@ -1315,7 +1312,7 @@ try_pbo_upload_common(struct gl_context *ctx,
|
|||
if (sampler_view == NULL)
|
||||
goto fail;
|
||||
|
||||
cso_set_sampler_views(cso, PIPE_SHADER_FRAGMENT, 1, &sampler_view);
|
||||
pipe->set_sampler_views(pipe, PIPE_SHADER_FRAGMENT, 0, 1, &sampler_view);
|
||||
|
||||
pipe_sampler_view_reference(&sampler_view, NULL);
|
||||
}
|
||||
|
|
@ -1351,7 +1348,10 @@ try_pbo_upload_common(struct gl_context *ctx,
|
|||
|
||||
fail:
|
||||
cso_restore_state(cso);
|
||||
cso_restore_constant_buffer_slot0(cso, PIPE_SHADER_FRAGMENT);
|
||||
|
||||
st->dirty |= ST_NEW_VERTEX_ARRAYS |
|
||||
ST_NEW_FS_CONSTANTS |
|
||||
ST_NEW_FS_SAMPLER_VIEWS;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ st_pbo_draw(struct st_context *st, const struct st_pbo_addresses *addr,
|
|||
unsigned surface_width, unsigned surface_height)
|
||||
{
|
||||
struct cso_context *cso = st->cso_context;
|
||||
struct pipe_context *pipe = st->pipe;
|
||||
|
||||
/* Setup vertex and geometry shaders */
|
||||
if (!st->pbo.vs) {
|
||||
|
|
@ -268,7 +269,7 @@ st_pbo_draw(struct st_context *st, const struct st_pbo_addresses *addr,
|
|||
cb.buffer_offset = 0;
|
||||
cb.buffer_size = sizeof(addr->constants);
|
||||
|
||||
cso_set_constant_buffer(cso, PIPE_SHADER_FRAGMENT, 0, &cb);
|
||||
pipe->set_constant_buffer(pipe, PIPE_SHADER_FRAGMENT, 0, &cb);
|
||||
|
||||
pipe_resource_reference(&cb.buffer, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue