mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
pan/bi: Implement sampler1D
Enough to get shaders/humus-celshading/1.shader_test compiling, no idea if it actually works but it looks reasonable. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7615>
This commit is contained in:
parent
8b23fbb954
commit
eee2a43461
1 changed files with 11 additions and 4 deletions
|
|
@ -1965,15 +1965,22 @@ emit_texc(bi_context *ctx, nir_tex_instr *instr)
|
|||
texc_pack_cube_coord(ctx, index,
|
||||
&tex.src[1], &tex.src[2]);
|
||||
} else {
|
||||
unsigned components = nir_src_num_components(instr->src[i].src);
|
||||
|
||||
tex.src[1] = index;
|
||||
tex.src[2] = index;
|
||||
tex.swizzle[1][0] = 0;
|
||||
tex.swizzle[2][0] = 1;
|
||||
|
||||
unsigned components = nir_src_num_components(instr->src[i].src);
|
||||
assert(components == 2 || components == 3);
|
||||
if (components >= 2) {
|
||||
tex.swizzle[2][0] = 1;
|
||||
} else {
|
||||
/* Dummy for reg alloc to be happy */
|
||||
tex.swizzle[2][0] = 0;
|
||||
}
|
||||
|
||||
if (components == 2) {
|
||||
assert(components >= 1 && components <= 3);
|
||||
|
||||
if (components < 3) {
|
||||
/* nothing to do */
|
||||
} else if (desc.array) {
|
||||
/* 2D array */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue