diff options
| author | Roland Scheidegger <sroland@vmware.com> | 2013-02-05 13:37:57 -0800 |
|---|---|---|
| committer | Roland Scheidegger <sroland@vmware.com> | 2013-02-08 18:54:40 -0800 |
| commit | 614982d320985c04e247293b54b66d7df5c19004 (patch) | |
| tree | 53a17cb7593ba82d1140bd218a7f192606cf332a /src/gallium/auxiliary/draw/draw_llvm_sample.c | |
| parent | 0a8043bb766f9c38af559438b646c3659614b103 (diff) | |
| download | external_mesa3d-614982d320985c04e247293b54b66d7df5c19004.tar.gz external_mesa3d-614982d320985c04e247293b54b66d7df5c19004.tar.bz2 external_mesa3d-614982d320985c04e247293b54b66d7df5c19004.zip | |
gallivm: fix up size queries for dx10 sviewinfo opcode
Need to calculate the number of mip levels (if it would be worthwile could
store it in dynamic state).
While here, the query code also used chan 2 for the lod value.
This worked with mesa state tracker but it seems safer to use chan 0.
Still passes piglit textureSize (with some handwaving), though the non-GL
parts are (largely) untested.
v2: clarify and expect the sviewinfo opcode to return ints, not floats,
just like the OpenGL textureSize (dx10 supports dst modifiers with resinfo).
Also simplify some code.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm_sample.c')
| -rw-r--r-- | src/gallium/auxiliary/draw/draw_llvm_sample.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm_sample.c b/src/gallium/auxiliary/draw/draw_llvm_sample.c index 03a25921d6..e51e01101f 100644 --- a/src/gallium/auxiliary/draw/draw_llvm_sample.c +++ b/src/gallium/auxiliary/draw/draw_llvm_sample.c @@ -269,6 +269,7 @@ draw_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base, struct gallivm_state *gallivm, struct lp_type type, unsigned texture_unit, + boolean need_nr_mips, LLVMValueRef explicit_lod, /* optional */ LLVMValueRef *sizes_out) { @@ -281,6 +282,7 @@ draw_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base, &sampler->dynamic_state.base, type, texture_unit, + need_nr_mips, explicit_lod, sizes_out); } |
