Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52020 Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- v2: Check for null shader instead of null for each buffer. Supersedes 222083. --- dlls/wined3d/state.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 865c60d18..85d52fc8b 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4579,6 +4579,10 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state else shader_type = WINED3D_SHADER_TYPE_COMPUTE;
+ /* If a shader has not been set, buffer objects are not initialised. */ + if (!state->shader[shader_type]) + return; + wined3d_gl_limits_get_uniform_block_range(&gl_info->limits, shader_type, &base, &count); for (i = 0; i < count; ++i) {
On Wed, 15 Dec 2021 at 06:45, Conor McCarthy cmccarthy@codeweavers.com wrote:
@@ -4579,6 +4579,10 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state else shader_type = WINED3D_SHADER_TYPE_COMPUTE;
- /* If a shader has not been set, buffer objects are not initialised. */
- if (!state->shader[shader_type])
return;
Sure, but then we also need to make sure we don't miss any updates. E.g., suppose an application does something like this:
- [...] - Set geometry shader NULL - Set geometry shader constant buffer CB0 - Draw D0 - Set geometry shader GS0 - [...] - Draw D1
We'd want CB0 to be available to GS0 during D1.