[Mesa-dev] [PATCH] radv: Implement buffer stores with less than 4 components.
We started using it in the btoi paths for r32g32b32, and the LLVM IR checker will complain about it because we end up with intrinsics with the wrong type extension in the name. Fixes: 593996bc02 ("radv: implement buffer to image operations for R32G32B32") --- src/amd/common/ac_nir_to_llvm.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 6d97212b805..0fa38b83a57 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2392,24 +2392,33 @@ static void visit_image_store(struct ac_nir_context *ctx, glc = ctx->ac.i1true; if (dim == GLSL_SAMPLER_DIM_BUF) { + char name[48]; + const char *types[] = { "f32", "v2f32", "v4f32" }; LLVMValueRef rsrc = get_image_buffer_descriptor(ctx, instr, true); + LLVMValueRef src = ac_to_float(>ac, get_src(ctx, instr->src[3])); + unsigned src_channels = ac_get_llvm_num_components(src); - params[0] = ac_to_float(>ac, get_src(ctx, instr->src[3])); /* data */ + if (src_channels == 3) + src = ac_build_expand(>ac, src, 3, 4); + + params[0] = src; /* data */ params[1] = rsrc; params[2] = LLVMBuildExtractElement(ctx->ac.builder, get_src(ctx, instr->src[1]), ctx->ac.i32_0, ""); /* vindex */ params[3] = ctx->ac.i32_0; /* voffset */ + snprintf(name, sizeof(name), "%s.%s", +HAVE_LLVM >= 0x800 ? "llvm.amdgcn.struct.buffer.store.format" + : "llvm.amdgcn.buffer.store.format", +types[CLAMP(src_channels, 1, 3) - 1]); + if (HAVE_LLVM >= 0x800) { params[4] = ctx->ac.i32_0; /* soffset */ params[5] = glc ? ctx->ac.i32_1 : ctx->ac.i32_0; - ac_build_intrinsic(>ac, "llvm.amdgcn.struct.buffer.store.format.v4f32", ctx->ac.voidt, - params, 6, 0); } else { params[4] = glc; /* glc */ params[5] = ctx->ac.i1false; /* slc */ - ac_build_intrinsic(>ac, "llvm.amdgcn.buffer.store.format.v4f32", ctx->ac.voidt, - params, 6, 0); } + ac_build_intrinsic(>ac, name, ctx->ac.voidt, params, 6, 0); } else { struct ac_image_args args = {}; args.opcode = ac_image_store; -- 2.19.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 06/18] glx/test: meson: assorted include fixes
On Thu, 2018-12-13 at 16:05 +, Emil Velikov wrote: > From: Emil Velikov > > Swap '..' with the symbolic inc_glx and add glproto as dependency. That > will pull the correct include, effectively fixing the tests on macOS. > > Fixes: a47c525f328 ("meson: build glx") > Signed-off-by: Emil Velikov > --- I've applied this patch in 18.2, but it didn't apply cleanly. I've fixed the conflicts; you can find the fixed patch at : https://gitlab.freedesktop.org/mesa/mesa/commit/22340dd92c2577ab951d46e44501c8e5646480ea > src/glx/tests/meson.build | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/glx/tests/meson.build b/src/glx/tests/meson.build > index 2420c90c437..68e1ca59c22 100644 > --- a/src/glx/tests/meson.build > +++ b/src/glx/tests/meson.build > @@ -46,9 +46,9 @@ if with_shared_glapi >link_with : [libglx, libglapi], >include_directories : [ > inc_src, inc_include, inc_mesa, inc_mapi, inc_gl_internal, > -include_directories('..'), > +inc_glx, >], > - dependencies : [dep_libdrm, dep_thread, idep_gtest] > + dependencies : [dep_libdrm, dep_glproto, dep_thread, idep_gtest] > ), > suite : ['glx'], >) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] MR: anv: fix clear color resolves
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/50 Hi all, We're having issues with clear color resolves when image views & images have different formats (for example image R8G8B8A8_UNORM & view R8G8B8A8_SRGB see https://bugs.freedesktop.org/show_bug.cgi?id=108911). Jason suggested we get rid of clear color at the end of the render passes which is what this series implements. Cheers, - Lionel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [Mesa-stable] [PATCH] intel/compiler: move nir_lower_bool_to_int32 before nir_lower_locals_to_regs
On Fri, 2018-12-21 at 09:38 -0800, Kristian Høgsberg wrote: > This regresses at least > dEQP-GLES3.functional.shaders.functions.control_flow.return_in_loop_vertex > on freedreno: > > Test case > 'dEQP-GLES3.functional.shaders.functions.control_flow.return_in_loop_vertex'.. > deqp-gles3: ../../../mesa/src/compiler/nir/nir_lower_bool_to_int32.c:49: > lower_alu_instr: Assertion `alu->dest.dest.is_ssa' failed. > Just to mention commit d6110d4d547 ("intel/compiler: move nir_lower_bool_to_int32 before nir_lower_locals_to_regs") has not been picked for 18.2 release branch. J.A. > Program received signal SIGABRT, Aborted. > __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47 > 47 ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file > or directory. > (gdb) bt > #0 __libc_do_syscall () at > ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47 > #1 0xf7cee18e in __libc_signal_restore_set (set=0xfffee2dc) at > ../sysdeps/unix/sysv/linux/nptl-signals.h:80 > #2 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48 > #3 0xf7ceef12 in __GI_abort () at abort.c:79 > #4 0xf7ce8e84 in __assert_fail_base (fmt=0xf7da3fdc "%s%s%s:%u: > %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x > , file=0xf7ae6d48 > "../../../mesa/src/compiler/nir/nir_lower_bool_to_int32.c", > file@entry=0xf7c5d010 "", line=49, line@entry=4158390024, > function=function@entry=0xf7b6be60 <__PRETTY_FUNCTION__.24316> > "lower_alu_instr") at assert.c:92 > #5 0xf7ce8f22 in __GI___assert_fail (assertion=0x Cannot access memory at address 0x>, file=0xf7c5d010 "", > line=4158390024, line@entry=49, function=0xf7b6be60 > <__PRETTY_FUNCTION__.24316> "lower_alu_instr") at assert.c:101 > #6 0xf78f08ca in lower_alu_instr (alu=0xf7dbff08 ) at > ../../../mesa/src/compiler/nir/nir_lower_bool_to_int32.c:49 > #7 nir_lower_bool_to_int32_impl (impl=0xf8e378) at > ../../../mesa/src/compiler/nir/nir_lower_bool_to_int32.c:114 > #8 nir_lower_bool_to_int32 (shader=) at > ../../../mesa/src/compiler/nir/nir_lower_bool_to_int32.c:157 > #9 0xf7a97584 in ir3_context_init (compiler=0xbe31c0, > so=so@entry=0xf97378) at > ../../../mesa/src/freedreno/ir3/ir3_context.c:80 > #10 0xf7a95f58 in ir3_compile_shader_nir (compiler=, > so=so@entry=0xf97378) at > ../../../mesa/src/freedreno/ir3/ir3_compiler_nir.c:2994 > #11 0xf7aa1adc in create_variant (shader=shader@entry=0xf9fe60, > key=key@entry=0xfffee764, binning_pass=binning_pass@entry=true) at > ../../../mesa/src/freedreno/ir3/ir3_shader.c:182 > #12 0xf7aa1d9c in ir3_shader_get_variant (shader=0xf9fe60, > key=key@entry=0xfffee764, binning_pass=, > created=0xfffee743, created@entry=0xfffee723) at > ../../../mesa/src/freedreno/ir3/ir3_shader.c:233 > #13 0xf7a88068 in ir3_shader_variant (shader=, key=..., > binning_pass=binning_pass@entry=true, debug=debug@entry=0xc9a794) at > ../../../../../mesa/src/gallium/drivers/freedreno/ir3/ir3_gallium.c:86 > #14 0xf7a87a74 in ir3_cache_lookup (cache=0xc89520, > key=key@entry=0xfffee844, debug=debug@entry=0xc9a794) at > ../../../../../mesa/src/gallium/drivers/freedreno/ir3/ir3_cache.c:96 > #15 0xf7a7ad6e in fd6_emit_get_prog (emit=0xfffee838) at > ../../../../../mesa/src/gallium/drivers/freedreno/a6xx/fd6_emit.h:103 > #16 fd6_draw_vbo (ctx=0xc95ca0, info=0xfffeea70, index_offset=80) at > ../../../../../mesa/src/gallium/drivers/freedreno/a6xx/fd6_draw.c:186 > #17 0xf7a4551a in fd_draw_vbo (pctx=, info=0xfffeea70) > at ../../../../../mesa/src/gallium/drivers/freedreno/freedreno_draw.c:291 > #18 0xf79f8802 in u_vbuf_draw_vbo (mgr=, > info=) at > ../../../../mesa/src/gallium/auxiliary/util/u_vbuf.c:1449 > #19 0xf77d2f42 in st_draw_vbo (ctx=, prims=0xfffeed54, > nr_prims=, ib=0xfffeed44, index_bounds_valid=0 '\000', > min_index=0, max_index=3, tfb_vertcount=0x0, stream=0, indirect=0x0) > at ../../../mesa/src/mesa/state_tracker/st_draw.c:268 > #20 0xf766b338 in _mesa_validated_drawrangeelements (ctx=0xca3e00, > mode=mode@entry=4, index_bounds_valid=, > start=, end=end@entry=4294967295, count=count@entry=6, > type=type@entry=5123, indices=indices@entry=0xac3d60, basevertex=0, > numInstances=numInstances@entry=1, baseInstance=0) at > ../../../mesa/src/mesa/main/draw.c:849 > #21 0xf766c36a in _mesa_validated_drawrangeelements (baseInstance=0, > numInstances=1, basevertex=0, indices=0xac3d60, type=5123, count=6, > end=4294967295, start=0, index_bounds_valid=0 '\000', mode=4, > ctx=) at ../../../mesa/src/mesa/main/draw.c:768 > #22 _mesa_DrawElements (mode=4, count=6, type=5123, indices=0xac3d60) > at ../../../mesa/src/mesa/main/draw.c:1003 > #23 0x008f4e94 in _start () > > Kristian > > On Wed, Dec 19, 2018 at 12:16 AM Iago Toral Quiroga wrote: > > The former expects to see SSA-only things, but the latter injects registers. > > > > The assertions in the lowering where not seeing this because they asserted > > on the bit_size values only, not on the is_ssa field, so add that assertion > >
Re: [Mesa-dev] [PATCH] meson, anv: Add inc_vulkan to include directories
On Sun, 2018-12-23 at 15:35 +, Eric Engestrom wrote: > On Sunday, 2018-12-23 12:31:20 +0100, Jan Vesely wrote: > > From: Jan Vesely > > > > intel_vulkan.h uses '#include "vulkan.h"' so the file needs to be in > > include path. > > Fixes meson build of anv > > Hmm, that doesn't look? > > include/vulkan/vulkan_intel.h has `#include "vulkan.h"`, which lives at > include/vulkan/vulkan.h, ie. in the same directory, so the current code > should work? > > What failure do you see, and in what circumstance? > > Could it be related to left over autotools files in your source dir? > Try again in a fresh clone? hm, I can't reproduce it again after the latest pull and git clean. I guess it was an artifact of switching to meson. sorry for the noise. thanks, Jan > > > > > Signed-off-by: Jan Vesely > > --- > > src/intel/vulkan/meson.build | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build > > index e30e922528..d1c89be0f8 100644 > > --- a/src/intel/vulkan/meson.build > > +++ b/src/intel/vulkan/meson.build > > @@ -181,7 +181,7 @@ libanv_common = static_library( > >[libanv_files, anv_entrypoints, anv_extensions_c, anv_extensions_h, > > sha1_h], > >include_directories : [ > > inc_common, inc_intel, inc_compiler, inc_drm_uapi, inc_vulkan_util, > > -inc_vulkan_wsi, > > +inc_vulkan_wsi, inc_vulkan > >], > >c_args : anv_flags, > >dependencies : anv_deps, > > -- > > 2.19.2 > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev -- Jan Vesely signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] MR: Intel: aub viewer fixes
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/49 A small series of fixes & 2 small improvement for the aub viewer. Cheers, - Lionel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] MR: Intel: comprehensive aub generation from error state
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/48 Hi all, Error states generated by the i915 driver expose a lot of different buffers. This include context image, ring buffer as well as the user submitted buffers. This series updates the error2aub tool to generate a more comprehensive Aub file. Cheers, - Lionel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev