mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 16:00:09 +01:00
ac/cull: don't read Position.Z if it's not needed for culling
It could be NULL. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
parent
8070402a30
commit
eeb4a11c11
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ static LLVMValueRef cull_bbox(struct ac_llvm_context *ctx,
|
|||
LLVMValueRef accepted = initially_accepted;
|
||||
|
||||
/* Compute the primitive bounding box for easy culling. */
|
||||
for (unsigned chan = 0; chan < 3; chan++) {
|
||||
for (unsigned chan = 0; chan < (cull_view_near_z || cull_view_far_z ? 3 : 2); chan++) {
|
||||
bbox_min[chan] = ac_build_fmin(ctx, pos[0][chan], pos[1][chan]);
|
||||
bbox_min[chan] = ac_build_fmin(ctx, bbox_min[chan], pos[2][chan]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue