llvmpipe: do some null pointer checking
This commit is contained in:
@@ -644,6 +644,7 @@ lp_setup_update_state( struct lp_setup_context *setup )
|
||||
|
||||
stored = lp_scene_alloc_aligned(scene, 4 * 16, 16);
|
||||
|
||||
if (stored) {
|
||||
/* smear each blend color component across 16 ubyte elements */
|
||||
for (i = 0; i < 4; ++i) {
|
||||
uint8_t c = float_to_ubyte(setup->blend_color.current.color[i]);
|
||||
@@ -654,6 +655,8 @@ lp_setup_update_state( struct lp_setup_context *setup )
|
||||
setup->blend_color.stored = stored;
|
||||
|
||||
setup->fs.current.jit_context.blend_color = setup->blend_color.stored;
|
||||
}
|
||||
|
||||
setup->dirty |= LP_SETUP_NEW_FS;
|
||||
}
|
||||
|
||||
@@ -662,6 +665,7 @@ lp_setup_update_state( struct lp_setup_context *setup )
|
||||
|
||||
stored = lp_scene_alloc_aligned(scene, 4 * sizeof(int32_t), 16);
|
||||
|
||||
if (stored) {
|
||||
stored[0] = (float) setup->scissor.current.minx;
|
||||
stored[1] = (float) setup->scissor.current.miny;
|
||||
stored[2] = (float) setup->scissor.current.maxx;
|
||||
@@ -673,6 +677,7 @@ lp_setup_update_state( struct lp_setup_context *setup )
|
||||
setup->fs.current.jit_context.scissor_ymin = stored[1];
|
||||
setup->fs.current.jit_context.scissor_xmax = stored[2];
|
||||
setup->fs.current.jit_context.scissor_ymax = stored[3];
|
||||
}
|
||||
|
||||
setup->dirty |= LP_SETUP_NEW_FS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user