llvmpipe: fix using non-zero layer in non-array view from array resource
authorRoland Scheidegger <sroland@vmware.com>
Thu, 22 Oct 2015 20:26:52 +0000 (22:26 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Sat, 24 Oct 2015 01:00:33 +0000 (03:00 +0200)
commitfe707c0373cf73f9323014f7bc38f20120d4f096
treed1436bb2fd77109540d5fb2995e0d8f20e2a48b9
parent830e57b82d21fd324059b7a7074b047ad41d0aa4
llvmpipe: fix using non-zero layer in non-array view from array resource

Just need to use resource target not view target when calculating
first-layer based mip offsets. (This is a gl specific problem since
d3d10 does not distinguish between non-array and array resources neither
at the resource nor view level, only at the shader level.)
Fixes new piglit arb_texture_view sampling-2d-array-as-2d-layer test.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_state_sampler.c