DRW: Fix crash drawing gpencil
This commit is contained in:
parent
90ee622830
commit
d412a5e6fa
|
@ -774,7 +774,7 @@ static void draw_call_resource_bind(DRWCommandsState *state, const DRWResourceHa
|
|||
int chunk = DRW_handle_chunk_get(handle);
|
||||
if (state->resource_chunk != chunk) {
|
||||
if (state->chunkid_loc != -1) {
|
||||
GPU_shader_uniform_int(NULL, state->chunkid_loc, chunk);
|
||||
GPU_shader_uniform_int(DST.shader, state->chunkid_loc, chunk);
|
||||
}
|
||||
if (state->obmats_loc != -1) {
|
||||
GPU_uniformbuffer_unbind(DST.vmempool->matrices_ubo[state->resource_chunk]);
|
||||
|
@ -790,7 +790,7 @@ static void draw_call_resource_bind(DRWCommandsState *state, const DRWResourceHa
|
|||
if (state->resourceid_loc != -1) {
|
||||
int id = DRW_handle_id_get(handle);
|
||||
if (state->resource_id != id) {
|
||||
GPU_shader_uniform_int(NULL, state->resourceid_loc, id);
|
||||
GPU_shader_uniform_int(DST.shader, state->resourceid_loc, id);
|
||||
state->resource_id = id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue