Re: [Mesa-dev] [PATCH] st/dri: fix dri2_format_table for argb1555 and rgb565
Reviewed-by: Kristian H. Kristensen On Fri, Jan 11, 2019 at 3:19 PM Marek Olšák wrote: > > From: Marek Olšák > > The bug caused that rgb565 framebuffers used argb1555. > > Fixes: 433ca3127a3b94bfe9a513e7c7ce594e09e1359f > --- > src/gallium/state_trackers/dri/dri2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/dri/dri2.c > b/src/gallium/state_trackers/dri/dri2.c > index 6fc07e42f74..ebbbabb6492 100644 > --- a/src/gallium/state_trackers/dri/dri2.c > +++ b/src/gallium/state_trackers/dri/dri2.c > @@ -85,21 +85,21 @@ static const struct dri2_format_mapping > dri2_format_table[] = { >{ __DRI_IMAGE_FOURCC_ARGB, __DRI_IMAGE_FORMAT_ARGB, > __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_BGRA_UNORM }, >{ __DRI_IMAGE_FOURCC_ABGR, __DRI_IMAGE_FORMAT_ABGR, > __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_RGBA_UNORM }, >{ __DRI_IMAGE_FOURCC_SARGB, __DRI_IMAGE_FORMAT_SARGB8, > __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_BGRA_SRGB }, >{ __DRI_IMAGE_FOURCC_XRGB, __DRI_IMAGE_FORMAT_XRGB, > __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_BGRX_UNORM }, >{ __DRI_IMAGE_FOURCC_XBGR, __DRI_IMAGE_FORMAT_XBGR, > __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_RGBX_UNORM }, > - { __DRI_IMAGE_FOURCC_ARGB1555, __DRI_IMAGE_FORMAT_RGB565, > + { __DRI_IMAGE_FOURCC_ARGB1555, __DRI_IMAGE_FORMAT_ARGB1555, > __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_B5G5R5A1_UNORM }, >{ __DRI_IMAGE_FOURCC_RGB565,__DRI_IMAGE_FORMAT_RGB565, > __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_B5G6R5_UNORM }, >{ __DRI_IMAGE_FOURCC_R8,__DRI_IMAGE_FORMAT_R8, > __DRI_IMAGE_COMPONENTS_R, PIPE_FORMAT_R8_UNORM }, >{ __DRI_IMAGE_FOURCC_R16, __DRI_IMAGE_FORMAT_R16, > __DRI_IMAGE_COMPONENTS_R, PIPE_FORMAT_R16_UNORM }, >{ __DRI_IMAGE_FOURCC_GR88, __DRI_IMAGE_FORMAT_GR88, > __DRI_IMAGE_COMPONENTS_RG,PIPE_FORMAT_RG88_UNORM }, >{ __DRI_IMAGE_FOURCC_GR1616,__DRI_IMAGE_FORMAT_GR88, > -- > 2.17.1 > > ___ > 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
Re: [Mesa-dev] [PATCH] st/dri: fix dri2_format_table for argb1555 and rgb565
On Fri, Jan 11, 2019 at 6:19 PM Marek Olšák wrote: > > From: Marek Olšák > > The bug caused that rgb565 framebuffers used argb1555. > > Fixes: 433ca3127a3b94bfe9a513e7c7ce594e09e1359f > --- > src/gallium/state_trackers/dri/dri2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/dri/dri2.c > b/src/gallium/state_trackers/dri/dri2.c > index 6fc07e42f74..ebbbabb6492 100644 > --- a/src/gallium/state_trackers/dri/dri2.c > +++ b/src/gallium/state_trackers/dri/dri2.c > @@ -85,21 +85,21 @@ static const struct dri2_format_mapping > dri2_format_table[] = { >{ __DRI_IMAGE_FOURCC_ARGB, __DRI_IMAGE_FORMAT_ARGB, > __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_BGRA_UNORM }, >{ __DRI_IMAGE_FOURCC_ABGR, __DRI_IMAGE_FORMAT_ABGR, > __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_RGBA_UNORM }, >{ __DRI_IMAGE_FOURCC_SARGB, __DRI_IMAGE_FORMAT_SARGB8, > __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_BGRA_SRGB }, >{ __DRI_IMAGE_FOURCC_XRGB, __DRI_IMAGE_FORMAT_XRGB, > __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_BGRX_UNORM }, >{ __DRI_IMAGE_FOURCC_XBGR, __DRI_IMAGE_FORMAT_XBGR, > __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_RGBX_UNORM }, > - { __DRI_IMAGE_FOURCC_ARGB1555, __DRI_IMAGE_FORMAT_RGB565, > + { __DRI_IMAGE_FOURCC_ARGB1555, __DRI_IMAGE_FORMAT_ARGB1555, Hey, I had only just made the exact same change locally, debugging deqp w/ a 565 visual (I'm still getting lots of fails, although the small # I've looked at so far look like precision issues, so not sure if deqp actually even works properly at less than 8b/component..) anyways, Reviewed-by: Rob Clark > __DRI_IMAGE_COMPONENTS_RGBA, PIPE_FORMAT_B5G5R5A1_UNORM }, >{ __DRI_IMAGE_FOURCC_RGB565,__DRI_IMAGE_FORMAT_RGB565, > __DRI_IMAGE_COMPONENTS_RGB, PIPE_FORMAT_B5G6R5_UNORM }, >{ __DRI_IMAGE_FOURCC_R8,__DRI_IMAGE_FORMAT_R8, > __DRI_IMAGE_COMPONENTS_R, PIPE_FORMAT_R8_UNORM }, >{ __DRI_IMAGE_FOURCC_R16, __DRI_IMAGE_FORMAT_R16, > __DRI_IMAGE_COMPONENTS_R, PIPE_FORMAT_R16_UNORM }, >{ __DRI_IMAGE_FOURCC_GR88, __DRI_IMAGE_FORMAT_GR88, > __DRI_IMAGE_COMPONENTS_RG,PIPE_FORMAT_RG88_UNORM }, >{ __DRI_IMAGE_FOURCC_GR1616,__DRI_IMAGE_FORMAT_GR88, > -- > 2.17.1 > > ___ > 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
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Fri, Jan 11, 2019 at 8:50 PM Kenneth Graunke wrote: > > On Friday, January 11, 2019 9:32:20 AM PST Eric Anholt wrote: > > Jason Ekstrand writes: > > > > > On Fri, Jan 11, 2019 at 11:11 AM Kenneth Graunke > > > wrote: > > > > > >> On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: > > >> > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote: > > >> > > Those names (nir_var_func_local, nir_var_thread_local, and > > >> > > nir_var_thread_global) make more sense to me than private/function. > > >> > > > > >> > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, > > >> > > indicating that they're just temporary variables, and not anything > > >> > > with special semantics like memory. shader_temp would pair well with > > >> > > the existing shader_in/shader_out, since they have the same scope. > > >> > > > > >> > > I might also consider adding 'mem' to variables representing memory. > > >> > > > > >> > > So that would look like... > > >> > > > > >> > >nir_var_shader_in > > >> > >nir_var_shader_out > > >> > >nir_var_shader_temp (formerly local/function) > > >> > >nir_var_local_temp (formerly global/private) > > >> > > > > >> > > > >> > Are those flipped? > > >> > > >> Gah! Sorry. Yes. > > >> > > >>nir_var_shader_in > > >>nir_var_shader_out > > >>nir_var_shader_temp (formerly global/private) > > >>nir_var_local_temp (formerly local/function) > > >>nir_var_uniform > > >>nir_var_system_value > > >>nir_var_mem_ubo (added mem) > > >>nir_var_mem_ssbo (added mem) > > >>nir_var_mem_shared (added mem) > > >>nir_var_mem_global (the new global memory type being introduced) > > >> > > > > > > I can work with that. I do think I'd mildly prefer function_temp over > > > local_temp but I think the adding of _temp is an improvement. > > > > I like the _temp suggestion a lot! And I think I'm also mildly in favor > > of function_temp. > > > > (Also, thanks to taking naming seriously, to everyone involved here. > > It's hard.) > > Yep, it's not easy. Karol, sorry for being grumpy the other day, it > wasn't a very constructive email on my part. I agree that the names > should change, for all the reasons you suggested. > no worries. I should have probably pinged a few more people, especially with a patch like that. > > --Ken ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/7] mesa: implement ARB/KHR_parallel_shader_compile
On Thu, Jan 3, 2019 at 2:40 PM Ian Romanick wrote: > On 11/28/18 6:59 PM, Marek Olšák wrote: > > From: Marek Olšák > > > > Tested by piglit. > > It doesn't look like there are any piglit test > > > --- > > docs/features.txt | 2 +- > > docs/relnotes/19.0.0.html | 2 ++ > > src/mapi/glapi/gen/gl_API.xml | 15 ++- > > src/mesa/main/dd.h | 7 +++ > > src/mesa/main/extensions_table.h| 2 ++ > > src/mesa/main/get_hash_params.py| 3 +++ > > src/mesa/main/hint.c| 12 > > src/mesa/main/hint.h| 4 > > src/mesa/main/mtypes.h | 1 + > > src/mesa/main/shaderapi.c | 10 ++ > > src/mesa/main/tests/dispatch_sanity.cpp | 4 > > 11 files changed, 60 insertions(+), 2 deletions(-) > > > > diff --git a/docs/features.txt b/docs/features.txt > > index 8999e42519c..7b827de6a92 100644 > > --- a/docs/features.txt > > +++ b/docs/features.txt > > @@ -295,21 +295,21 @@ GLES3.2, GLSL ES 3.2 -- all DONE: i965/gen9+, > radeonsi, virgl > >GL_OES_texture_storage_multisample_2d_array DONE (all > drivers that support GL_ARB_texture_multisample) > > > > Khronos, ARB, and OES extensions that are not part of any OpenGL or > OpenGL ES version: > > > >GL_ARB_bindless_texture DONE (nvc0, > radeonsi) > >GL_ARB_cl_event not started > >GL_ARB_compute_variable_group_sizeDONE (nvc0, > radeonsi) > >GL_ARB_ES3_2_compatibilityDONE > (i965/gen8+, radeonsi, virgl) > >GL_ARB_fragment_shader_interlock DONE (i965) > >GL_ARB_gpu_shader_int64 DONE > (i965/gen8+, nvc0, radeonsi, softpipe, llvmpipe) > > - GL_ARB_parallel_shader_compilenot started, > but Chia-I Wu did some related work in 2014 > > + GL_ARB_parallel_shader_compileDONE (all > drivers) > >GL_ARB_post_depth_coverageDONE (i965, > nvc0) > >GL_ARB_robustness_isolation not started > >GL_ARB_sample_locations DONE (nvc0) > >GL_ARB_seamless_cubemap_per_texture DONE > (freedreno, i965, nvc0, radeonsi, r600, softpipe, swr, virgl) > >GL_ARB_shader_ballot DONE > (i965/gen8+, nvc0, radeonsi) > >GL_ARB_shader_clock DONE > (i965/gen7+, nv50, nvc0, r600, radeonsi, virgl) > >GL_ARB_shader_stencil_export DONE > (i965/gen9+, r600, radeonsi, softpipe, llvmpipe, swr, virgl) > >GL_ARB_shader_viewport_layer_arrayDONE > (i965/gen6+, nvc0, radeonsi) > >GL_ARB_sparse_buffer DONE > (radeonsi/CIK+) > >GL_ARB_sparse_texture not started > > diff --git a/docs/relnotes/19.0.0.html b/docs/relnotes/19.0.0.html > > index bc1776e8f4e..540482bca5f 100644 > > --- a/docs/relnotes/19.0.0.html > > +++ b/docs/relnotes/19.0.0.html > > @@ -33,24 +33,26 @@ Compatibility contexts may report a lower version > depending on each driver. > > SHA256 checksums > > > > TBD. > > > > > > > > New features > > > > > > GL_AMD_texture_texture4 on all GL 4.0 drivers. > > +GL_ARB_parallel_shader_compile on all drivers. > > GL_EXT_shader_implicit_conversions on all drivers (ES > extension). > > GL_EXT_texture_compression_bptc on all GL 4.0 drivers (ES > extension). > > GL_EXT_texture_compression_rgtc on all GL 3.0 drivers (ES > extension). > > GL_EXT_texture_view on drivers supporting texture views (ES > extension). > > +GL_KHR_parallel_shader_compile on all drivers. > > GL_OES_texture_view on drivers supporting texture views (ES > extension). > > > > > > Bug fixes > > > > > > TBD > > > > > > Changes > > diff --git a/src/mapi/glapi/gen/gl_API.xml > b/src/mapi/glapi/gen/gl_API.xml > > index f4d0808f13b..4ce691b361b 100644 > > --- a/src/mapi/glapi/gen/gl_API.xml > > +++ b/src/mapi/glapi/gen/gl_API.xml > > @@ -8402,21 +8402,34 @@ > > > > > > > > > > > > > > > > > > http://www.w3.org/2001/XInclude"/> > > > > - > > + > > + > > + > > + > > + > > + > > + > > + > > + alias="MaxShaderCompilerThreadsKHR"> > > + > > + > > + > > + > > + > > > > http://www.w3.org/2001/XInclude"/> > > > > > > > > > >value="0x8001"/> > >value="0x8002"/> > >value="0x8003"/> > >value="0x8004"/> > > diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h > > index f14c3e04e91..92b6ecac33c 100644 > > --- a/src/mesa/main/dd.h > > +++ b/src/mesa/main/dd.h > > @@ -1292,20 +1292,27 @@ struct dd_function_table { > > /** > > * Called to initialize gl_program::driver_cache_blob
[Mesa-dev] [PATCH] spirv: Emit switch conditions on-the-fly
Instead of emitting all of the conditions for the cases of a switch statement up-front, emit them on-the-fly as we emit the code for each case. The original justification for this was that we were going to have to build a default case anyway which would need them all. However, we can just trust CSE to clean up the mess in that case. Emitting each condition right before the if statement that uses it reduces register pressure and, in one customer benchmark, gets rid of spilling and improves performance by about 2x. --- src/compiler/spirv/vtn_cfg.c | 62 +++- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c index aef1b7e18fb..34a910accc6 100644 --- a/src/compiler/spirv/vtn_cfg.c +++ b/src/compiler/spirv/vtn_cfg.c @@ -852,6 +852,30 @@ vtn_emit_branch(struct vtn_builder *b, enum vtn_branch_type branch_type, } } +static nir_ssa_def * +vtn_switch_case_condition(struct vtn_builder *b, struct vtn_switch *swtch, + nir_ssa_def *sel, struct vtn_case *cse) +{ + if (cse->is_default) { + nir_ssa_def *any = nir_imm_false(&b->nb); + list_for_each_entry(struct vtn_case, other, &swtch->cases, link) { + if (cse->is_default) +continue; + + any = nir_ior(&b->nb, any, + vtn_switch_case_condition(b, swtch, sel, other)); + } + return any; + } else { + nir_ssa_def *cond = nir_imm_false(&b->nb); + util_dynarray_foreach(&cse->values, uint64_t, val) { + nir_ssa_def *imm = nir_imm_intN_t(&b->nb, *val, sel->bit_size); + cond = nir_ior(&b->nb, cond, nir_ieq(&b->nb, sel, imm)); + } + return cond; + } +} + static void vtn_emit_cf_list(struct vtn_builder *b, struct list_head *cf_list, nir_variable *switch_fall_var, bool *has_switch_break, @@ -978,46 +1002,13 @@ vtn_emit_cf_list(struct vtn_builder *b, struct list_head *cf_list, nir_local_variable_create(b->nb.impl, glsl_bool_type(), "fall"); nir_store_var(&b->nb, fall_var, nir_imm_false(&b->nb), 1); - /* Next, we gather up all of the conditions. We have to do this - * up-front because we also need to build an "any" condition so - * that we can use !any for default. - */ - const int num_cases = list_length(&vtn_switch->cases); - NIR_VLA(nir_ssa_def *, conditions, num_cases); - nir_ssa_def *sel = vtn_ssa_value(b, vtn_switch->selector)->def; - /* An accumulation of all conditions. Used for the default */ - nir_ssa_def *any = NULL; - - int i = 0; - list_for_each_entry(struct vtn_case, cse, &vtn_switch->cases, link) { -if (cse->is_default) { - conditions[i++] = NULL; - continue; -} - -nir_ssa_def *cond = NULL; -util_dynarray_foreach(&cse->values, uint64_t, val) { - nir_ssa_def *imm = nir_imm_intN_t(&b->nb, *val, sel->bit_size); - nir_ssa_def *is_val = nir_ieq(&b->nb, sel, imm); - - cond = cond ? nir_ior(&b->nb, cond, is_val) : is_val; -} - -any = any ? nir_ior(&b->nb, any, cond) : cond; -conditions[i++] = cond; - } - vtn_assert(i == num_cases); /* Now we can walk the list of cases and actually emit code */ - i = 0; list_for_each_entry(struct vtn_case, cse, &vtn_switch->cases, link) { /* Figure out the condition */ -nir_ssa_def *cond = conditions[i++]; -if (cse->is_default) { - vtn_assert(cond == NULL); - cond = nir_inot(&b->nb, any); -} +nir_ssa_def *cond = + vtn_switch_case_condition(b, vtn_switch, sel, cse); /* Take fallthrough into account */ cond = nir_ior(&b->nb, cond, nir_load_var(&b->nb, fall_var)); @@ -1030,7 +1021,6 @@ vtn_emit_cf_list(struct vtn_builder *b, struct list_head *cf_list, nir_pop_if(&b->nb, case_if); } - vtn_assert(i == num_cases); break; } -- 2.20.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/6] anv/blorp: Refactor MSAA resolves into an exportable helper function
On Mon, 2019-01-07 at 09:39 -0600, Jason Ekstrand wrote: > This function is modeled after the aux_op functions except that it > has a > lot more parameters because it deals with two images as well as > source > and destination regions. > --- > src/intel/vulkan/anv_blorp.c | 225 ++- > -- > src/intel/vulkan/anv_private.h | 14 ++ > 2 files changed, 107 insertions(+), 132 deletions(-) > > diff --git a/src/intel/vulkan/anv_blorp.c > b/src/intel/vulkan/anv_blorp.c > index eee7a8c3b3c..2f8d502e289 100644 > --- a/src/intel/vulkan/anv_blorp.c > +++ b/src/intel/vulkan/anv_blorp.c > @@ -1169,63 +1169,52 @@ enum subpass_stage { > SUBPASS_STAGE_RESOLVE, > }; > > -static void > -resolve_surface(struct blorp_batch *batch, > -struct blorp_surf *src_surf, > -uint32_t src_level, uint32_t src_layer, > -struct blorp_surf *dst_surf, > -uint32_t dst_level, uint32_t dst_layer, > -uint32_t src_x, uint32_t src_y, uint32_t dst_x, > uint32_t dst_y, > -uint32_t width, uint32_t height, > -enum blorp_filter filter) > -{ > - blorp_blit(batch, > - src_surf, src_level, src_layer, > - ISL_FORMAT_UNSUPPORTED, ISL_SWIZZLE_IDENTITY, > - dst_surf, dst_level, dst_layer, > - ISL_FORMAT_UNSUPPORTED, ISL_SWIZZLE_IDENTITY, > - src_x, src_y, src_x + width, src_y + height, > - dst_x, dst_y, dst_x + width, dst_y + height, > - filter, false, false); > -} > - > -static void > -resolve_image(struct anv_device *device, > - struct blorp_batch *batch, > - const struct anv_image *src_image, > - VkImageLayout src_image_layout, > - uint32_t src_level, uint32_t src_layer, > - const struct anv_image *dst_image, > - VkImageLayout dst_image_layout, > - uint32_t dst_level, uint32_t dst_layer, > - VkImageAspectFlags aspect_mask, > - uint32_t src_x, uint32_t src_y, uint32_t dst_x, > uint32_t dst_y, > - uint32_t width, uint32_t height) > +void > +anv_image_msaa_resolve(struct anv_cmd_buffer *cmd_buffer, > + const struct anv_image *src_image, > + enum isl_aux_usage src_aux_usage, > + uint32_t src_level, uint32_t src_base_layer, > + const struct anv_image *dst_image, > + enum isl_aux_usage dst_aux_usage, > + uint32_t dst_level, uint32_t dst_base_layer, > + VkImageAspectFlagBits aspect, > + uint32_t src_x, uint32_t src_y, > + uint32_t dst_x, uint32_t dst_y, > + uint32_t width, uint32_t height, > + uint32_t layer_count, > + enum blorp_filter filter) > { > - struct anv_cmd_buffer *cmd_buffer = batch->driver_batch; > + struct blorp_batch batch; > + blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer, > 0); > > assert(src_image->type == VK_IMAGE_TYPE_2D); > assert(src_image->samples > 1); > assert(dst_image->type == VK_IMAGE_TYPE_2D); > assert(dst_image->samples == 1); > assert(src_image->n_planes == dst_image->n_planes); > + assert(!src_image->format->can_ycbcr); > + assert(!dst_image->format->can_ycbcr); > > - uint32_t aspect_bit; > - > - anv_foreach_image_aspect_bit(aspect_bit, src_image, aspect_mask) > { > - struct blorp_surf src_surf, dst_surf; > - get_blorp_surf_for_anv_image(device, src_image, 1UL << > aspect_bit, > - src_image_layout, > ISL_AUX_USAGE_NONE, > - &src_surf); > - get_blorp_surf_for_anv_image(device, dst_image, 1UL << > aspect_bit, > - dst_image_layout, > ISL_AUX_USAGE_NONE, > - &dst_surf); > - anv_cmd_buffer_mark_image_written(cmd_buffer, dst_image, > -1UL << aspect_bit, > -dst_surf.aux_usage, > -dst_level, dst_layer, 1); > - > - enum blorp_filter filter; > + struct blorp_surf src_surf, dst_surf; > + get_blorp_surf_for_anv_image(cmd_buffer->device, src_image, > aspect, > +ANV_IMAGE_LAYOUT_EXPLICIT_AUX, > +src_aux_usage, &src_surf); > + if (src_aux_usage == ISL_AUX_USAGE_MCS) { > + src_surf.clear_color_addr = anv_to_blorp_address( > + anv_image_get_clear_color_addr(cmd_buffer->device, > src_image, > +VK_IMAGE_ASPECT_COLOR_BIT)); > + } > + get_blorp_surf_for_anv_image(cmd_buffer->device, dst_image, > aspect, > +ANV_IMAGE_LAYOUT_EXPLICIT_AUX, > +
Re: [Mesa-dev] [PATCH 6/6] anv: Implement VK_KHR_depth_stencil_resolve
On Mon, 2019-01-07 at 09:39 -0600, Jason Ekstrand wrote: > --- > src/intel/vulkan/anv_device.c | 28 ++ > src/intel/vulkan/anv_extensions.py | 1 + > src/intel/vulkan/anv_pass.c| 37 +++- > src/intel/vulkan/anv_private.h | 3 + > src/intel/vulkan/genX_cmd_buffer.c | 136 > + > 5 files changed, 204 insertions(+), 1 deletion(-) > > diff --git a/src/intel/vulkan/anv_device.c > b/src/intel/vulkan/anv_device.c > index 2a3919d2949..3761846bb7f 100644 > --- a/src/intel/vulkan/anv_device.c > +++ b/src/intel/vulkan/anv_device.c > @@ -1138,6 +1138,34 @@ void anv_GetPhysicalDeviceProperties2( > break; >} > > + case > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KH > R: { > + VkPhysicalDeviceDepthStencilResolvePropertiesKHR *props = > +(VkPhysicalDeviceDepthStencilResolvePropertiesKHR *)ext; > + > + /* We support all of the depth resolve modes */ > + props->supportedDepthResolveModes = > +VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR | > +VK_RESOLVE_MODE_AVERAGE_BIT_KHR | > +VK_RESOLVE_MODE_MIN_BIT_KHR | > +VK_RESOLVE_MODE_MAX_BIT_KHR; > + > + /* Average doesn't make sense for stencil so we don't > support that */ > + props->supportedStencilResolveModes = > +VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR; > + if (pdevice->info.gen >= 8) { > +/* The advanced stencil resolve modes currently require > stencil > + * sampling be supported by the hardware. > + */ > +props->supportedStencilResolveModes |= > + VK_RESOLVE_MODE_MIN_BIT_KHR | > + VK_RESOLVE_MODE_MAX_BIT_KHR; > + } > + > + props->independentResolveNone = VK_TRUE; > + props->independentResolve = VK_TRUE; > + break; > + } > + >case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR: > { > VkPhysicalDeviceDriverPropertiesKHR *driver_props = > (VkPhysicalDeviceDriverPropertiesKHR *) ext; > diff --git a/src/intel/vulkan/anv_extensions.py > b/src/intel/vulkan/anv_extensions.py > index 388845003aa..2ea4cab0e97 100644 > --- a/src/intel/vulkan/anv_extensions.py > +++ b/src/intel/vulkan/anv_extensions.py > @@ -76,6 +76,7 @@ EXTENSIONS = [ > Extension('VK_KHR_bind_memory2', 1, True), > Extension('VK_KHR_create_renderpass2',1, True), > Extension('VK_KHR_dedicated_allocation', 1, True), > +Extension('VK_KHR_depth_stencil_resolve', 1, True), > Extension('VK_KHR_descriptor_update_template',1, True), > Extension('VK_KHR_device_group', 1, True), > Extension('VK_KHR_device_group_creation', 1, True), > diff --git a/src/intel/vulkan/anv_pass.c > b/src/intel/vulkan/anv_pass.c > index 7b17cc06935..196cf3ff8fd 100644 > --- a/src/intel/vulkan/anv_pass.c > +++ b/src/intel/vulkan/anv_pass.c > @@ -74,6 +74,10 @@ anv_render_pass_compile(struct anv_render_pass > *pass) >subpass->depth_stencil_attachment->attachment == > VK_ATTACHMENT_UNUSED) > subpass->depth_stencil_attachment = NULL; > > + if (subpass->ds_resolve_attachment && > + subpass->ds_resolve_attachment->attachment == > VK_ATTACHMENT_UNUSED) > + subpass->ds_resolve_attachment = NULL; > + This is a nitpick, but since we setup subpass->ds_resolve_attachment in anv_CreateRenderPass2KHR(), should't we just do this sanitation there? >for (uint32_t j = 0; j < subpass->attachment_count; j++) { > struct anv_subpass_attachment *subpass_att = &subpass- > >attachments[j]; > if (subpass_att->attachment == VK_ATTACHMENT_UNUSED) > @@ -116,6 +120,16 @@ anv_render_pass_compile(struct anv_render_pass > *pass) > color_att->usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; > } >} > + > + if (subpass->ds_resolve_attachment) { > + struct anv_subpass_attachment *ds_att = > +subpass->depth_stencil_attachment; > + UNUSED struct anv_subpass_attachment *resolve_att = > +subpass->ds_resolve_attachment; > + > + assert(resolve_att->usage == > VK_IMAGE_USAGE_TRANSFER_DST_BIT); > + ds_att->usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; > + } > } > > /* From the Vulkan 1.0.39 spec: > @@ -342,10 +356,15 @@ VkResult anv_CreateRenderPass( > static unsigned > num_subpass_attachments2(const VkSubpassDescription2KHR *desc) > { > + const VkSubpassDescriptionDepthStencilResolveKHR *ds_resolve = > + vk_find_struct_const(desc->pNext, > + SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE > _KHR); > + > return desc->inputAttachmentCount + >desc->colorAttachmentCount + >(desc->pResolveAttachments ? desc->colorAttachmentCount : > 0) + > - (desc->pDepthStencilAttac
Re: [Mesa-dev] [PATCH 1/6] vulkan: Update the XML and headers to 1.1.97
I dropped a comment in patch 4 which may or may not be relevant and then a couple nitpicks in patch 6 that you can take or ignore. Either way, the series is: Reviewed-by: Iago Toral Quiroga On Mon, 2019-01-07 at 09:39 -0600, Jason Ekstrand wrote: > --- > include/vulkan/vulkan.h | 2 +- > include/vulkan/vulkan_android.h | 2 +- > include/vulkan/vulkan_core.h| 155 +++- > include/vulkan/vulkan_fuchsia.h | 2 +- > include/vulkan/vulkan_ios.h | 2 +- > include/vulkan/vulkan_macos.h | 2 +- > include/vulkan/vulkan_vi.h | 2 +- > include/vulkan/vulkan_wayland.h | 2 +- > include/vulkan/vulkan_win32.h | 2 +- > include/vulkan/vulkan_xcb.h | 2 +- > include/vulkan/vulkan_xlib.h| 2 +- > include/vulkan/vulkan_xlib_xrandr.h | 2 +- > src/vulkan/registry/vk.xml | 175 +++--- > -- > 13 files changed, 311 insertions(+), 41 deletions(-) > > diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h > index 77da63783e6..a3be4af6c46 100644 > --- a/include/vulkan/vulkan.h > +++ b/include/vulkan/vulkan.h > @@ -2,7 +2,7 @@ > #define VULKAN_H_ 1 > > /* > -** Copyright (c) 2015-2018 The Khronos Group Inc. > +** Copyright (c) 2015-2019 The Khronos Group Inc. > ** > ** Licensed under the Apache License, Version 2.0 (the "License"); > ** you may not use this file except in compliance with the License. > diff --git a/include/vulkan/vulkan_android.h > b/include/vulkan/vulkan_android.h > index 07aaeda28e3..e70376c8867 100644 > --- a/include/vulkan/vulkan_android.h > +++ b/include/vulkan/vulkan_android.h > @@ -6,7 +6,7 @@ extern "C" { > #endif > > /* > -** Copyright (c) 2015-2018 The Khronos Group Inc. > +** Copyright (c) 2015-2019 The Khronos Group Inc. > ** > ** Licensed under the Apache License, Version 2.0 (the "License"); > ** you may not use this file except in compliance with the License. > diff --git a/include/vulkan/vulkan_core.h > b/include/vulkan/vulkan_core.h > index 72542c72ec8..caeecd9bed1 100644 > --- a/include/vulkan/vulkan_core.h > +++ b/include/vulkan/vulkan_core.h > @@ -6,7 +6,7 @@ extern "C" { > #endif > > /* > -** Copyright (c) 2015-2018 The Khronos Group Inc. > +** Copyright (c) 2015-2019 The Khronos Group Inc. > ** > ** Licensed under the Apache License, Version 2.0 (the "License"); > ** you may not use this file except in compliance with the License. > @@ -43,7 +43,7 @@ extern "C" { > #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & > 0x3ff) > #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) > // Version of this file > -#define VK_HEADER_VERSION 96 > +#define VK_HEADER_VERSION 97 > > > #define VK_NULL_HANDLE 0 > @@ -148,6 +148,7 @@ typedef enum VkResult { > VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = > -1000158000, > VK_ERROR_FRAGMENTATION_EXT = -1000161000, > VK_ERROR_NOT_PERMITTED_EXT = -1000174001, > +VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = -1000244000, > VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY, > VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = > VK_ERROR_INVALID_EXTERNAL_HANDLE, > VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL, > @@ -444,6 +445,8 @@ typedef enum VkStructureType { > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATU > RES_EXT = 1000190002, > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = > 1000196000, > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR > = 1000197000, > +VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTI > ES_KHR = 1000199000, > +VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR > = 1000199001, > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEA > TURES_NV = 1000201000, > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = > 1000202000, > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = > 1000202001, > @@ -460,7 +463,14 @@ typedef enum VkStructureType { > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIE > S_EXT = 1000218001, > VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_E > XT = 1000218002, > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_E > XT = 1000221000, > +VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = > 1000237000, > +VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = > 1000238000, > +VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = > 1000238001, > +VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = > 1000244000, > +VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = 1000244001, > +VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = > 1000244002, > VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = > 1000246000, > +VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000, > VK_STRUCTURE_TYPE_DEBUG_R
Re: [Mesa-dev] Please bring back __GL_FSAA_MODE
Thanks Marek, what would need to happen to get this enabled again? Will simply reverting the commit that took it out work? If so is there any chance of getting this put back officially or would I have to manually compile the driver each release? In particular I'm looking to get FSAA working in older games via wine, mostly they don't support antialiasing which is a shame because there's plenty of GPU power going to waste which could be fixing the jaggles. On nvidia __GL_FSAA_MODE works as intended provided you set wine's OffScreenRenderingMode to "backbuffer" which slightly impacts performance but doesn't matter for older games. I'd love to see the functionality return for AMD GPUs. Kind Regards, Tom On 27/11/2018 22:30, Marek Olšák wrote: Yes, it could be added back. Marek On Tue, Nov 27, 2018 at 3:15 AM Tom Butlerwrote: Hello, I realise this was removed for a reason ( https://lists.freedesktop.org/archives/mesa-dev/2014-September/067864.html ) but there are cases where it is useful. In older games that do not support native FSAA being able to force it in the driver is the only way to enable it. A quick google search for AMD linux force msaa shows that I'm not the only one who would like to see this feature return: https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/open-source-amd-linux/1024166-radeon-eqaa-anti-aliasing-support-merged-to-mesa-18-2?p=1024185#post1024185 https://bbs.archlinux.org/viewtopic.php?id=225425 https://www.reddit.com/r/linux_gaming/comments/671yzm/forcing_antialiasing_with_mesa_radeon_driver/ https://github.com/dscharrer/void/blob/master/hacks/forcemsaa.c I understand it does cause issues in some cases but there are times when it is useful. Could it be reintroduced with a more relevant name that implies it shouldn't be used? E.g. GALLIUM_LEGACY_MSAA or GALLIUM_FORCE_MSAA_EXPERIMENTAL. That way it would lower users expectations while still making the option available to try. Kind Regards, Tom Butler ___ 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
[Mesa-dev] mesa git break nvidia opencl
Hello Everyone, at this moment I develop on freedesktop opencl. Current the mesa opencl break clinfo to read the information from nvidia when mesa opencl is available. There is no other graphic card plugged in. The stable 18.3.1 it works. Don't know how to analise this kind of problem. Sincerely AndyBe ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] intel: 8 and 16-bit booleans
On Fri, 2019-01-11 at 08:05 +0100, Iago Toral wrote: > On Thu, 2019-01-10 at 13:18 -0600, Jason Ekstrand wrote: > > Topi just asked me on IRC what I thought about handling 16-bit > > booleans on Intel hardware in the light of the 1-bit boolean > > stuff. The current state of the driver is that we use > > nir_lower_bool_to_int32 pass to produce NIR that looks basically > > identical to the NIR we were getting in the back-end before. This > > lets us kick the can down the road a bit but I alluded in the 1-bit > > boolean series to ideas of doing something more intel-specific. > > Instead of answering on IRC, I thought I'd send a mesa-dev mail so > > that we can have a more universal discussion. > > > > ## The problem: > > > > On Intel hardware, comparison operations generate two results: a > > flag result which goes straight into the flag register and a > > destination result which goes into the GRF pointed to by the CMP > > instruction's destination. The flag result can be thought of as > > either a 32-bit bitfield scalar (in the sense of one for all > > threads) or as a per-thread 1-bit value. The GRF value is a per- > > thread value whose size matches that of the execution size of the > > instruction. If you're comparing two 64-bit integers or floats, it > > produces a 64-bit value (though I believe the top 32 bits are > > garbage). On a 32, 16, or 8-bit comparison, it produces a 32, 16, > > or 8-bit boolean respectively. The only reason why D3D booleans > > have historically been a good match for our hardware is because > > we've historically only really cared about 32-bit values. With 64- > > bit types, we could just do a conversion and write it off as "64- > > bit is expensive." In the new world if 8 and 16-bit types, > > however, that doesn't make nearly as much sense. > > > > ## Solutions: > > > > The real question is what size we should make booleans in the back- > > end. There are many different possible answers to this question > > but whatever happens, it should probably happen in NIR so that we > > can make choices while we're still in SSA. I've considered a few > > different ideas on what we could do: > > > > 1. Make everything 16-bit. 8-bit is clumsy because of the weird > > stride requirements but 32 and 64-bit can trivially be converted to > > 16-bit with a strided integer MOV. For the few places where we > > need an actual 32-bit bool (b2f), a signed integer up-cast will do > > the trick. For that matter, just using a mixed-size AND with W > > type for the bool and D type for the 0x3f80c might do the trick > > and keep it one instruction. > > > > 2. Use the "native" boolean size for all comparison operations and > > then, whenever we need to combine booleans via iand, bcsel, or a > > phi, you make the result the smallest of the sources and insert > > extract_u16 or extract_u32 to do a down-cast for the larger > > sources. (We want the extract opcodes so we get a strided MOV which > > the back-end can more easily eliminate.) > > > > 3. Don't use comparison destinations at all and treat the flag as > > a 32 or 16-bit value (depending on dispatch width). You can do a > > boolean AND by just ANDing flag results and you have to write into > > the flag at the end in order to use it. This idea is a bit on the > > crazy side but it's interesting to think about. > > > > If idea 1 actually works, it would reduce register pressure a > > decent bit which would be a very good thing. However, I'm not sure > > how well we'll actually be able to optimize with it. > > I have 1) implemented (I was planning to send a series for review > that after we land the 8-bit and 16-bit series). I think it is > working quite well for me, but of course I only have the CTS tests to > play with. Here are some numbers: > > VK_KHR_shader_float16_int8 branch: > > |SIMD8|SIMD16 > | > --- > -- > spirv_assembly.type.scalar.i8.* | 19,725 |2,044 > | > spirv_assembly.type.scalar.i16.*| 35,504 |3,650 > | > instruction.graphics.float16.* | 305,129 | 29,760 > | > builtin.precision*.comparison.* | |2,284 > | > > VK_KHR_shader_float16_int8 + 8-bit/16-bit booleans: > > |SIMD8|SIMD16 > | > --- > -- > spirv_assembly.type.scalar.i8.* | 19,718 |2,043 > | > spirv_assembly.type.scalar.i16.*| 35,369 |3,645 > | > instruction.graphics.float16.* | 302,764 | 29,627 > | > builtin.precision*.comparison.* |-|2,144 > | > > I see benefits across the board. It is not a huge improvement, but > there is some. Getting 8-bit booleans to
[Mesa-dev] [PATCH] anv/device: fix maximum number of images supported
We had defined MAX_IMAGES as 8, which we used to size the array for image push constant data. The comment there stated that this was for gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes that array, asserting that we don't exceed that number of images, which imposes a limit of MAX_IMAGES on all gens. Furthermore, despite this, we are exposing up to 64 images per shader stage on all gens, gen8 included. This patch lowers the number of images we expose in gen8 to 8 and keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can actually use up to 64 images in shaders, and then adds an assert specific to gen8 to check that we never exceed 8. --- src/intel/vulkan/anv_device.c| 7 +-- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 +++- src/intel/vulkan/anv_private.h | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index cd179e6801..122a58cfd6 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ? 128 : 16; + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : MAX_IMAGES; + VkSampleCountFlags sample_counts = isl_device_get_sample_counts(&pdevice->isl_dev); + VkPhysicalDeviceLimits limits = { .maxImageDimension1D = (1 << 14), .maxImageDimension2D = (1 << 14), @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( .maxPerStageDescriptorUniformBuffers = 64, .maxPerStageDescriptorStorageBuffers = 64, .maxPerStageDescriptorSampledImages = max_samplers, - .maxPerStageDescriptorStorageImages = 64, + .maxPerStageDescriptorStorageImages = max_images, .maxPerStageDescriptorInputAttachments= 64, .maxPerStageResources = 250, .maxDescriptorSetSamplers = 6 * max_samplers, /* number of stages * maxPerStageDescriptorSamplers */ @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( .maxDescriptorSetStorageBuffers = 6 * 64, /* number of stages * maxPerStageDescriptorStorageBuffers */ .maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, .maxDescriptorSetSampledImages= 6 * max_samplers, /* number of stages * maxPerStageDescriptorSampledImages */ - .maxDescriptorSetStorageImages= 6 * 64, /* number of stages * maxPerStageDescriptorStorageImages */ + .maxDescriptorSetStorageImages= 6 * max_images, /* number of stages * maxPerStageDescriptorStorageImages */ .maxDescriptorSetInputAttachments = 256, .maxVertexInputAttributes = MAX_VBS, .maxVertexInputBindings = MAX_VBS, diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index a0fd226b0a..e16ad4f032 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -537,7 +537,9 @@ anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice, } if (map->image_count > 0) { - assert(map->image_count <= MAX_IMAGES); + assert(map->image_count <= MAX_IMAGES && + (pdevice->compiler->devinfo->gen > 8 || + map->image_count < MAX_GEN8_IMAGES)); assert(shader->num_uniforms == prog_data->nr_params * 4); state.first_image_uniform = shader->num_uniforms; uint32_t *param = brw_stage_prog_data_add_params(prog_data, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 903931472d..3af7982bae 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -157,7 +157,8 @@ struct gen_l3_config; #define MAX_SCISSORS16 #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_DYNAMIC_BUFFERS 16 -#define MAX_IMAGES 8 +#define MAX_IMAGES 64 +#define MAX_GEN8_IMAGES 8 #define MAX_PUSH_DESCRIPTORS 32 /* Minimum requirement */ /* The kernel relocation API has a limitation of a 32-bit delta value @@ -1864,7 +1865,6 @@ struct anv_push_constants { /* Used for vkCmdDispatchBase */ uint32_t base_work_group_id[3]; - /* Image data for image_load_store on pre-SKL */ struct brw_image_param images[MAX_IMAGES]; }; -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] anv/pipeline_cache: fix incorrect guards for NIR cache
Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching NIR' --- src/intel/vulkan/anv_pipeline_cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Or maybe just check cache->cache instead, which I guess was the original intention, but I kind of prefer having all fields initialized. diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index 18f310b06e..f9733c5309 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -239,6 +239,7 @@ anv_pipeline_cache_init(struct anv_pipeline_cache *cache, sha1_compare_func); } else { cache->cache = NULL; + cache->nir_cache = NULL; } } @@ -670,7 +671,7 @@ anv_device_search_for_nir(struct anv_device *device, unsigned char sha1_key[20], void *mem_ctx) { - if (cache) { + if (cache && cache->nir_cache) { const struct serialized_nir *snir = NULL; pthread_mutex_lock(&cache->mutex); @@ -702,7 +703,7 @@ anv_device_upload_nir(struct anv_device *device, const struct nir_shader *nir, unsigned char sha1_key[20]) { - if (cache) { + if (cache && cache->nir_cache) { pthread_mutex_lock(&cache->mutex); struct hash_entry *entry = _mesa_hash_table_search(cache->nir_cache, sha1_key); -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv/pipeline_cache: fix incorrect guards for NIR cache
On 11/01/2019 10:50, Iago Toral Quiroga wrote: Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching NIR' --- src/intel/vulkan/anv_pipeline_cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Or maybe just check cache->cache instead, which I guess was the original intention, but I kind of prefer having all fields initialized. While looking at this patch, I noticed that we're not freeing nir_cache in anv_pipeline_cache_finish. This looks good : Reviewed-by: Lionel Landwerlin diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index 18f310b06e..f9733c5309 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -239,6 +239,7 @@ anv_pipeline_cache_init(struct anv_pipeline_cache *cache, sha1_compare_func); } else { cache->cache = NULL; + cache->nir_cache = NULL; } } @@ -670,7 +671,7 @@ anv_device_search_for_nir(struct anv_device *device, unsigned char sha1_key[20], void *mem_ctx) { - if (cache) { + if (cache && cache->nir_cache) { const struct serialized_nir *snir = NULL; pthread_mutex_lock(&cache->mutex); @@ -702,7 +703,7 @@ anv_device_upload_nir(struct anv_device *device, const struct nir_shader *nir, unsigned char sha1_key[20]) { - if (cache) { + if (cache && cache->nir_cache) { pthread_mutex_lock(&cache->mutex); struct hash_entry *entry = _mesa_hash_table_search(cache->nir_cache, sha1_key); ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv/device: fix maximum number of images supported
On Friday, 2019-01-11 10:58:38 +0100, Iago Toral Quiroga wrote: > We had defined MAX_IMAGES as 8, which we used to size the array for > image push constant data. The comment there stated that this was for > gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes > that array, asserting that we don't exceed that number of images, > which imposes a limit of MAX_IMAGES on all gens. > > Furthermore, despite this, we are exposing up to 64 images per shader > stage on all gens, gen8 included. > > This patch lowers the number of images we expose in gen8 to 8 and > keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can > actually use up to 64 images in shaders, and then adds an assert > specific to gen8 to check that we never exceed 8. > --- > src/intel/vulkan/anv_device.c| 7 +-- > src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 +++- > src/intel/vulkan/anv_private.h | 4 ++-- > 3 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c > index cd179e6801..122a58cfd6 100644 > --- a/src/intel/vulkan/anv_device.c > +++ b/src/intel/vulkan/anv_device.c > @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( > const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ? > 128 : 16; > > + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : > MAX_IMAGES; > + > VkSampleCountFlags sample_counts = >isl_device_get_sample_counts(&pdevice->isl_dev); > > + > VkPhysicalDeviceLimits limits = { >.maxImageDimension1D = (1 << 14), >.maxImageDimension2D = (1 << 14), > @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( >.maxPerStageDescriptorUniformBuffers = 64, >.maxPerStageDescriptorStorageBuffers = 64, >.maxPerStageDescriptorSampledImages = max_samplers, > - .maxPerStageDescriptorStorageImages = 64, > + .maxPerStageDescriptorStorageImages = max_images, >.maxPerStageDescriptorInputAttachments= 64, >.maxPerStageResources = 250, >.maxDescriptorSetSamplers = 6 * max_samplers, /* > number of stages * maxPerStageDescriptorSamplers */ > @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( >.maxDescriptorSetStorageBuffers = 6 * 64, /* > number of stages * maxPerStageDescriptorStorageBuffers */ >.maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, >.maxDescriptorSetSampledImages= 6 * max_samplers, /* > number of stages * maxPerStageDescriptorSampledImages */ > - .maxDescriptorSetStorageImages= 6 * 64, /* > number of stages * maxPerStageDescriptorStorageImages */ > + .maxDescriptorSetStorageImages= 6 * max_images, /* > number of stages * maxPerStageDescriptorStorageImages */ >.maxDescriptorSetInputAttachments = 256, >.maxVertexInputAttributes = MAX_VBS, >.maxVertexInputBindings = MAX_VBS, > diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > index a0fd226b0a..e16ad4f032 100644 > --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > @@ -537,7 +537,9 @@ anv_nir_apply_pipeline_layout(const struct > anv_physical_device *pdevice, > } > > if (map->image_count > 0) { > - assert(map->image_count <= MAX_IMAGES); > + assert(map->image_count <= MAX_IMAGES && > + (pdevice->compiler->devinfo->gen > 8 || > + map->image_count < MAX_GEN8_IMAGES)); s/ < / <= /, but I would also write it differently: assert((pdevice->compiler->devinfo->gen <= 8 && map->image_count <= MAX_GEN8_IMAGES) || map->image_count <= MAX_IMAGES); I don't know about the numbers, but code-wise it looks all reasonable. >assert(shader->num_uniforms == prog_data->nr_params * 4); >state.first_image_uniform = shader->num_uniforms; >uint32_t *param = brw_stage_prog_data_add_params(prog_data, > diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h > index 903931472d..3af7982bae 100644 > --- a/src/intel/vulkan/anv_private.h > +++ b/src/intel/vulkan/anv_private.h > @@ -157,7 +157,8 @@ struct gen_l3_config; > #define MAX_SCISSORS16 > #define MAX_PUSH_CONSTANTS_SIZE 128 > #define MAX_DYNAMIC_BUFFERS 16 > -#define MAX_IMAGES 8 > +#define MAX_IMAGES 64 > +#define MAX_GEN8_IMAGES 8 > #define MAX_PUSH_DESCRIPTORS 32 /* Minimum requirement */ > > /* The kernel relocation API has a limitation of a 32-bit delta value > @@ -1864,7 +1865,6 @@ struct anv_push_constants { > /* Used for vkCmdDispatchBase */ > uint32_t base_work_group_id[3]; >
Re: [Mesa-dev] [PATCH] anv/pipeline_cache: fix incorrect guards for NIR cache
On Fri, 2019-01-11 at 11:13 +, Lionel Landwerlin wrote: > On 11/01/2019 10:50, Iago Toral Quiroga wrote: > > Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching > > NIR' > > --- > > src/intel/vulkan/anv_pipeline_cache.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > Or maybe just check cache->cache instead, which I guess was the > > original > > intention, but I kind of prefer having all fields initialized. > > > While looking at this patch, I noticed that we're not freeing > nir_cache > in anv_pipeline_cache_finish. Right, I'll send a separate patch for that. Iago > > This looks good : > > > Reviewed-by: Lionel Landwerlin > > > > > > diff --git a/src/intel/vulkan/anv_pipeline_cache.c > > b/src/intel/vulkan/anv_pipeline_cache.c > > index 18f310b06e..f9733c5309 100644 > > --- a/src/intel/vulkan/anv_pipeline_cache.c > > +++ b/src/intel/vulkan/anv_pipeline_cache.c > > @@ -239,6 +239,7 @@ anv_pipeline_cache_init(struct > > anv_pipeline_cache *cache, > >sha1_compare_fun > > c); > > } else { > > cache->cache = NULL; > > + cache->nir_cache = NULL; > > } > > } > > > > @@ -670,7 +671,7 @@ anv_device_search_for_nir(struct anv_device > > *device, > > unsigned char sha1_key[20], > > void *mem_ctx) > > { > > - if (cache) { > > + if (cache && cache->nir_cache) { > > const struct serialized_nir *snir = NULL; > > > > pthread_mutex_lock(&cache->mutex); > > @@ -702,7 +703,7 @@ anv_device_upload_nir(struct anv_device > > *device, > > const struct nir_shader *nir, > > unsigned char sha1_key[20]) > > { > > - if (cache) { > > + if (cache && cache->nir_cache) { > > pthread_mutex_lock(&cache->mutex); > > struct hash_entry *entry = > >_mesa_hash_table_search(cache->nir_cache, sha1_key); > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv/device: fix maximum number of images supported
On 11/01/2019 11:37, Eric Engestrom wrote: On Friday, 2019-01-11 10:58:38 +0100, Iago Toral Quiroga wrote: We had defined MAX_IMAGES as 8, which we used to size the array for image push constant data. The comment there stated that this was for gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes that array, asserting that we don't exceed that number of images, which imposes a limit of MAX_IMAGES on all gens. Furthermore, despite this, we are exposing up to 64 images per shader stage on all gens, gen8 included. This patch lowers the number of images we expose in gen8 to 8 and keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can actually use up to 64 images in shaders, and then adds an assert specific to gen8 to check that we never exceed 8. --- src/intel/vulkan/anv_device.c| 7 +-- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 +++- src/intel/vulkan/anv_private.h | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index cd179e6801..122a58cfd6 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ? 128 : 16; + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : MAX_IMAGES; + VkSampleCountFlags sample_counts = isl_device_get_sample_counts(&pdevice->isl_dev); + VkPhysicalDeviceLimits limits = { .maxImageDimension1D = (1 << 14), .maxImageDimension2D = (1 << 14), @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( .maxPerStageDescriptorUniformBuffers = 64, .maxPerStageDescriptorStorageBuffers = 64, .maxPerStageDescriptorSampledImages = max_samplers, - .maxPerStageDescriptorStorageImages = 64, + .maxPerStageDescriptorStorageImages = max_images, .maxPerStageDescriptorInputAttachments= 64, .maxPerStageResources = 250, .maxDescriptorSetSamplers = 6 * max_samplers, /* number of stages * maxPerStageDescriptorSamplers */ @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( .maxDescriptorSetStorageBuffers = 6 * 64, /* number of stages * maxPerStageDescriptorStorageBuffers */ .maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, .maxDescriptorSetSampledImages= 6 * max_samplers, /* number of stages * maxPerStageDescriptorSampledImages */ - .maxDescriptorSetStorageImages= 6 * 64, /* number of stages * maxPerStageDescriptorStorageImages */ + .maxDescriptorSetStorageImages= 6 * max_images, /* number of stages * maxPerStageDescriptorStorageImages */ .maxDescriptorSetInputAttachments = 256, .maxVertexInputAttributes = MAX_VBS, .maxVertexInputBindings = MAX_VBS, diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index a0fd226b0a..e16ad4f032 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -537,7 +537,9 @@ anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice, } if (map->image_count > 0) { - assert(map->image_count <= MAX_IMAGES); + assert(map->image_count <= MAX_IMAGES && + (pdevice->compiler->devinfo->gen > 8 || + map->image_count < MAX_GEN8_IMAGES)); s/ < / <= /, but I would also write it differently: assert((pdevice->compiler->devinfo->gen <= 8 && map->image_count <= MAX_GEN8_IMAGES) || map->image_count <= MAX_IMAGES); I don't know about the numbers, but code-wise it looks all reasonable. Isn't there a consistency issue here? image_count <= MAX_IMAGES on gen9+ image_count < MAX_GEN8_IMAGES gen8 and below Surely we want the same comparison operator regardless of the gen? - Lionel assert(shader->num_uniforms == prog_data->nr_params * 4); state.first_image_uniform = shader->num_uniforms; uint32_t *param = brw_stage_prog_data_add_params(prog_data, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 903931472d..3af7982bae 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -157,7 +157,8 @@ struct gen_l3_config; #define MAX_SCISSORS16 #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_DYNAMIC_BUFFERS 16 -#define MAX_IMAGES 8 +#define MAX_IMAGES 64 +#define MAX_GEN8_IMAGES 8 #define MAX_PUSH_DESCRIPTORS 32 /* Minimum requirement */ /* The kernel relocation API has a limitation of a 32-bit delta value @@ -1864,7 +1865,6
Re: [Mesa-dev] [PATCH] anv/pipeline_cache: fix incorrect guards for NIR cache
On 11/01/2019 11:41, Iago Toral wrote: On Fri, 2019-01-11 at 11:13 +, Lionel Landwerlin wrote: On 11/01/2019 10:50, Iago Toral Quiroga wrote: Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching NIR' --- src/intel/vulkan/anv_pipeline_cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Or maybe just check cache->cache instead, which I guess was the original intention, but I kind of prefer having all fields initialized. While looking at this patch, I noticed that we're not freeing nir_cache in anv_pipeline_cache_finish. Right, I'll send a separate patch for that. Iago Thanks a lot :) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv/device: fix maximum number of images supported
On Fri, 2019-01-11 at 11:43 +, Lionel Landwerlin wrote: > On 11/01/2019 11:37, Eric Engestrom wrote: > > On Friday, 2019-01-11 10:58:38 +0100, Iago Toral Quiroga wrote: > > > We had defined MAX_IMAGES as 8, which we used to size the array > > > for > > > image push constant data. The comment there stated that this was > > > for > > > gen8, but anv_nir_apply_pipeline_layout runs for all gens and > > > writes > > > that array, asserting that we don't exceed that number of images, > > > which imposes a limit of MAX_IMAGES on all gens. > > > > > > Furthermore, despite this, we are exposing up to 64 images per > > > shader > > > stage on all gens, gen8 included. > > > > > > This patch lowers the number of images we expose in gen8 to 8 and > > > keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we > > > can > > > actually use up to 64 images in shaders, and then adds an assert > > > specific to gen8 to check that we never exceed 8. > > > --- > > > src/intel/vulkan/anv_device.c| 7 +-- > > > src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 +++- > > > src/intel/vulkan/anv_private.h | 4 ++-- > > > 3 files changed, 10 insertions(+), 5 deletions(-) > > > > > > diff --git a/src/intel/vulkan/anv_device.c > > > b/src/intel/vulkan/anv_device.c > > > index cd179e6801..122a58cfd6 100644 > > > --- a/src/intel/vulkan/anv_device.c > > > +++ b/src/intel/vulkan/anv_device.c > > > @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( > > > const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo- > > > >is_haswell) ? > > >128 : 16; > > > > > > + const uint32_t max_images = devinfo->gen < 9 ? > > > MAX_GEN8_IMAGES : MAX_IMAGES; > > > + > > > VkSampleCountFlags sample_counts = > > > isl_device_get_sample_counts(&pdevice->isl_dev); > > > > > > + > > > VkPhysicalDeviceLimits limits = { > > > .maxImageDimension1D = (1 << 14), > > > .maxImageDimension2D = (1 << 14), > > > @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( > > > .maxPerStageDescriptorUniformBuffers = 64, > > > .maxPerStageDescriptorStorageBuffers = 64, > > > .maxPerStageDescriptorSampledImages = max_samplers, > > > - .maxPerStageDescriptorStorageImages = 64, > > > + .maxPerStageDescriptorStorageImages = max_images, > > > .maxPerStageDescriptorInputAttachments= 64, > > > .maxPerStageResources = 250, > > > .maxDescriptorSetSamplers = 6 * > > > max_samplers, /* number of stages * maxPerStageDescriptorSamplers > > > */ > > > @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( > > > .maxDescriptorSetStorageBuffers = 6 * > > > 64, /* number of stages * > > > maxPerStageDescriptorStorageBuffers */ > > > .maxDescriptorSetStorageBuffersDynamic= > > > MAX_DYNAMIC_BUFFERS / 2, > > > .maxDescriptorSetSampledImages= 6 * > > > max_samplers, /* number of stages * > > > maxPerStageDescriptorSampledImages */ > > > - .maxDescriptorSetStorageImages= 6 * > > > 64, /* number of stages * > > > maxPerStageDescriptorStorageImages */ > > > + .maxDescriptorSetStorageImages= 6 * > > > max_images, /* number of stages * > > > maxPerStageDescriptorStorageImages */ > > > .maxDescriptorSetInputAttachments = 256, > > > .maxVertexInputAttributes = MAX_VBS, > > > .maxVertexInputBindings = MAX_VBS, > > > diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > > b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > > index a0fd226b0a..e16ad4f032 100644 > > > --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > > +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > > @@ -537,7 +537,9 @@ anv_nir_apply_pipeline_layout(const struct > > > anv_physical_device *pdevice, > > > } > > > > > > if (map->image_count > 0) { > > > - assert(map->image_count <= MAX_IMAGES); > > > + assert(map->image_count <= MAX_IMAGES && > > > + (pdevice->compiler->devinfo->gen > 8 || > > > + map->image_count < MAX_GEN8_IMAGES)); > > > > s/ < / <= /, but I would also write it differently: > > > >assert((pdevice->compiler->devinfo->gen <= 8 && map->image_count > > <= MAX_GEN8_IMAGES) || > > map->image_count <= MAX_IMAGES); > > > > I don't know about the numbers, but code-wise it looks all > > reasonable. > > > Isn't there a consistency issue here? > > > image_count <= MAX_IMAGES on gen9+ > > image_count < MAX_GEN8_IMAGES gen8 and below > > > Surely we want the same comparison operator regardless of the gen? Yes, Eric also noticed that. I'll fix that and I'll change the assert to look like Eric suggested as well. Thanks! > > - > > L
[Mesa-dev] [PATCH] anv/pipeline_cache: free NIR shader cache
Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching NIR' --- src/intel/vulkan/anv_pipeline_cache.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index f9733c5309..d96102c287 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -258,6 +258,13 @@ anv_pipeline_cache_finish(struct anv_pipeline_cache *cache) _mesa_hash_table_destroy(cache->cache, NULL); } + + if (cache->nir_cache) { + hash_table_foreach(cache->nir_cache, entry) + ralloc_free(entry->data); + + _mesa_hash_table_destroy(cache->nir_cache, NULL); + } } static struct anv_shader_bin * -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 109131] cc1plus: error: unrecognized command line option "-std=c++11"
https://bugs.freedesktop.org/show_bug.cgi?id=109131 --- Comment #4 from Emil Velikov --- AFAICT we probe if the compiler supports -std... before using it. If somehow that's not the case we ought to fix that, or fallback to one that owrks. Patches welcome :-) -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v2] anv/device: fix maximum number of images supported
We had defined MAX_IMAGES as 8, which we used to size the array for image push constant data. The comment there stated that this was for gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes that array, asserting that we don't exceed that number of images, which imposes a limit of MAX_IMAGES on all gens. Furthermore, despite this, we are exposing up to 64 images per shader stage on all gens, gen8 included. This patch lowers the number of images we expose in gen8 to 8 and keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can actually use up to 64 images in shaders, and then adds an assert specific to gen8 to check that we never exceed 8. v2: - <= instead of < in the assert (Eric, Lionel) - Change the way the assertion is written (Eric) --- src/intel/vulkan/anv_device.c| 7 +-- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 3 ++- src/intel/vulkan/anv_private.h | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 523f1483e2..f85458b672 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ? 128 : 16; + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : MAX_IMAGES; + VkSampleCountFlags sample_counts = isl_device_get_sample_counts(&pdevice->isl_dev); + VkPhysicalDeviceLimits limits = { .maxImageDimension1D = (1 << 14), .maxImageDimension2D = (1 << 14), @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( .maxPerStageDescriptorUniformBuffers = 64, .maxPerStageDescriptorStorageBuffers = 64, .maxPerStageDescriptorSampledImages = max_samplers, - .maxPerStageDescriptorStorageImages = 64, + .maxPerStageDescriptorStorageImages = max_images, .maxPerStageDescriptorInputAttachments= 64, .maxPerStageResources = 250, .maxDescriptorSetSamplers = 6 * max_samplers, /* number of stages * maxPerStageDescriptorSamplers */ @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( .maxDescriptorSetStorageBuffers = 6 * 64, /* number of stages * maxPerStageDescriptorStorageBuffers */ .maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, .maxDescriptorSetSampledImages= 6 * max_samplers, /* number of stages * maxPerStageDescriptorSampledImages */ - .maxDescriptorSetStorageImages= 6 * 64, /* number of stages * maxPerStageDescriptorStorageImages */ + .maxDescriptorSetStorageImages= 6 * max_images, /* number of stages * maxPerStageDescriptorStorageImages */ .maxDescriptorSetInputAttachments = 256, .maxVertexInputAttributes = MAX_VBS, .maxVertexInputBindings = MAX_VBS, diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index b3daf702bc..53de347b3c 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -529,7 +529,8 @@ anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice, } if (map->image_count > 0) { - assert(map->image_count <= MAX_IMAGES); + assert((pdevice->compiler->devinfo->gen <= 8 && map->image_count <= MAX_GEN8_IMAGES) || + map->image_count <= MAX_IMAGES); assert(shader->num_uniforms == prog_data->nr_params * 4); state.first_image_uniform = shader->num_uniforms; uint32_t *param = brw_stage_prog_data_add_params(prog_data, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 770254e93e..9ddd41b1fa 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -157,7 +157,8 @@ struct gen_l3_config; #define MAX_SCISSORS16 #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_DYNAMIC_BUFFERS 16 -#define MAX_IMAGES 8 +#define MAX_IMAGES 64 +#define MAX_GEN8_IMAGES 8 #define MAX_PUSH_DESCRIPTORS 32 /* Minimum requirement */ /* The kernel relocation API has a limitation of a 32-bit delta value @@ -1882,7 +1883,6 @@ struct anv_push_constants { /* Used for vkCmdDispatchBase */ uint32_t base_work_group_id[3]; - /* Image data for image_load_store on pre-SKL */ struct brw_image_param images[MAX_IMAGES]; }; -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv/pipeline_cache: free NIR shader cache
On 11/01/2019 12:05, Iago Toral Quiroga wrote: Fixes: f6aa9f718516 'anv/pipeline_cache: Add support for caching NIR' Thanks a bunch : Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/anv_pipeline_cache.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index f9733c5309..d96102c287 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -258,6 +258,13 @@ anv_pipeline_cache_finish(struct anv_pipeline_cache *cache) _mesa_hash_table_destroy(cache->cache, NULL); } + + if (cache->nir_cache) { + hash_table_foreach(cache->nir_cache, entry) + ralloc_free(entry->data); + + _mesa_hash_table_destroy(cache->nir_cache, NULL); + } } static struct anv_shader_bin * ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2] anv/device: fix maximum number of images supported
On 11/01/2019 12:12, Iago Toral Quiroga wrote: We had defined MAX_IMAGES as 8, which we used to size the array for image push constant data. The comment there stated that this was for gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes that array, asserting that we don't exceed that number of images, which imposes a limit of MAX_IMAGES on all gens. Furthermore, despite this, we are exposing up to 64 images per shader stage on all gens, gen8 included. This patch lowers the number of images we expose in gen8 to 8 and keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can actually use up to 64 images in shaders, and then adds an assert specific to gen8 to check that we never exceed 8. v2: - <= instead of < in the assert (Eric, Lionel) - Change the way the assertion is written (Eric) --- src/intel/vulkan/anv_device.c| 7 +-- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 3 ++- src/intel/vulkan/anv_private.h | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 523f1483e2..f85458b672 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ? 128 : 16; + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : MAX_IMAGES; + VkSampleCountFlags sample_counts = isl_device_get_sample_counts(&pdevice->isl_dev); + VkPhysicalDeviceLimits limits = { .maxImageDimension1D = (1 << 14), .maxImageDimension2D = (1 << 14), @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( .maxPerStageDescriptorUniformBuffers = 64, .maxPerStageDescriptorStorageBuffers = 64, .maxPerStageDescriptorSampledImages = max_samplers, - .maxPerStageDescriptorStorageImages = 64, + .maxPerStageDescriptorStorageImages = max_images, .maxPerStageDescriptorInputAttachments= 64, .maxPerStageResources = 250, .maxDescriptorSetSamplers = 6 * max_samplers, /* number of stages * maxPerStageDescriptorSamplers */ @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( .maxDescriptorSetStorageBuffers = 6 * 64, /* number of stages * maxPerStageDescriptorStorageBuffers */ .maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, .maxDescriptorSetSampledImages= 6 * max_samplers, /* number of stages * maxPerStageDescriptorSampledImages */ - .maxDescriptorSetStorageImages= 6 * 64, /* number of stages * maxPerStageDescriptorStorageImages */ + .maxDescriptorSetStorageImages= 6 * max_images, /* number of stages * maxPerStageDescriptorStorageImages */ .maxDescriptorSetInputAttachments = 256, .maxVertexInputAttributes = MAX_VBS, .maxVertexInputBindings = MAX_VBS, diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index b3daf702bc..53de347b3c 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -529,7 +529,8 @@ anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice, } if (map->image_count > 0) { - assert(map->image_count <= MAX_IMAGES); + assert((pdevice->compiler->devinfo->gen <= 8 && map->image_count <= MAX_GEN8_IMAGES) || + map->image_count <= MAX_IMAGES); I'm not sure why it wasn't < instead of <= previously, sounds like it should be <. Also I don't think this version works, your previous version was okay : image_count < MAX_GEN8_IMAGE || (gen > 8 && image_count < MAX_IMAGES) assert(shader->num_uniforms == prog_data->nr_params * 4); state.first_image_uniform = shader->num_uniforms; uint32_t *param = brw_stage_prog_data_add_params(prog_data, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 770254e93e..9ddd41b1fa 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -157,7 +157,8 @@ struct gen_l3_config; #define MAX_SCISSORS16 #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_DYNAMIC_BUFFERS 16 -#define MAX_IMAGES 8 +#define MAX_IMAGES 64 +#define MAX_GEN8_IMAGES 8 #define MAX_PUSH_DESCRIPTORS 32 /* Minimum requirement */ /* The kernel relocation API has a limitation of a 32-bit delta value @@ -1882,7 +1883,6 @@ struct anv_push_constants { /* Used for vkCmdDispatchBase */ uint32_t base_work_group_id[3]; - /* Image data for image_load_store on pre-SKL */ struct brw_image_param images[MAX_
Re: [Mesa-dev] [PATCH v2] anv/device: fix maximum number of images supported
On Fri, 2019-01-11 at 12:31 +, Lionel Landwerlin wrote: > On 11/01/2019 12:12, Iago Toral Quiroga wrote: > > We had defined MAX_IMAGES as 8, which we used to size the array for > > image push constant data. The comment there stated that this was > > for > > gen8, but anv_nir_apply_pipeline_layout runs for all gens and > > writes > > that array, asserting that we don't exceed that number of images, > > which imposes a limit of MAX_IMAGES on all gens. > > > > Furthermore, despite this, we are exposing up to 64 images per > > shader > > stage on all gens, gen8 included. > > > > This patch lowers the number of images we expose in gen8 to 8 and > > keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can > > actually use up to 64 images in shaders, and then adds an assert > > specific to gen8 to check that we never exceed 8. > > > > v2: > > - <= instead of < in the assert (Eric, Lionel) > > - Change the way the assertion is written (Eric) > > --- > > src/intel/vulkan/anv_device.c| 7 +-- > > src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 3 ++- > > src/intel/vulkan/anv_private.h | 4 ++-- > > 3 files changed, 9 insertions(+), 5 deletions(-) > > > > diff --git a/src/intel/vulkan/anv_device.c > > b/src/intel/vulkan/anv_device.c > > index 523f1483e2..f85458b672 100644 > > --- a/src/intel/vulkan/anv_device.c > > +++ b/src/intel/vulkan/anv_device.c > > @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( > > const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo- > > >is_haswell) ? > >128 : 16; > > > > + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES > > : MAX_IMAGES; > > + > > VkSampleCountFlags sample_counts = > > isl_device_get_sample_counts(&pdevice->isl_dev); > > > > + > > VkPhysicalDeviceLimits limits = { > > .maxImageDimension1D = (1 << 14), > > .maxImageDimension2D = (1 << 14), > > @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( > > .maxPerStageDescriptorUniformBuffers = 64, > > .maxPerStageDescriptorStorageBuffers = 64, > > .maxPerStageDescriptorSampledImages = max_samplers, > > - .maxPerStageDescriptorStorageImages = 64, > > + .maxPerStageDescriptorStorageImages = max_images, > > .maxPerStageDescriptorInputAttachments= 64, > > .maxPerStageResources = 250, > > .maxDescriptorSetSamplers = 6 * > > max_samplers, /* number of stages * maxPerStageDescriptorSamplers > > */ > > @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( > > .maxDescriptorSetStorageBuffers = 6 * > > 64, /* number of stages * > > maxPerStageDescriptorStorageBuffers */ > > .maxDescriptorSetStorageBuffersDynamic= > > MAX_DYNAMIC_BUFFERS / 2, > > .maxDescriptorSetSampledImages= 6 * > > max_samplers, /* number of stages * > > maxPerStageDescriptorSampledImages */ > > - .maxDescriptorSetStorageImages= 6 * > > 64, /* number of stages * > > maxPerStageDescriptorStorageImages */ > > + .maxDescriptorSetStorageImages= 6 * > > max_images, /* number of stages * > > maxPerStageDescriptorStorageImages */ > > .maxDescriptorSetInputAttachments = 256, > > .maxVertexInputAttributes = MAX_VBS, > > .maxVertexInputBindings = MAX_VBS, > > diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > index b3daf702bc..53de347b3c 100644 > > --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > @@ -529,7 +529,8 @@ anv_nir_apply_pipeline_layout(const struct > > anv_physical_device *pdevice, > > } > > > > if (map->image_count > 0) { > > - assert(map->image_count <= MAX_IMAGES); > > + assert((pdevice->compiler->devinfo->gen <= 8 && map- > > >image_count <= MAX_GEN8_IMAGES) || > > + map->image_count <= MAX_IMAGES); > > > I'm not sure why it wasn't < instead of <= previously, sounds like > it > should be <. I think <= is fine, map->image_count is not an index but the total count so its value should be fine up to the maximum allowed, right? > > Also I don't think this version works, your previous version was okay > : > > > image_count < MAX_GEN8_IMAGE || (gen > 8 && image_count < MAX_IMAGES) Right, I didn't read Eric's proposal properly, and it would not work for gen8. I'll revert the form of the assertion to the previous version. > > > assert(shader->num_uniforms == prog_data->nr_params * 4); > > state.first_image_uniform = shader->num_uniforms; > > uint32_t *param = brw_stage_prog_data_add_params(prog_data, > > diff --git a/src/intel/vulkan/anv_p
Re: [Mesa-dev] [PATCH v2] anv/device: fix maximum number of images supported
On 11/01/2019 12:40, Iago Toral wrote: On Fri, 2019-01-11 at 12:31 +, Lionel Landwerlin wrote: On 11/01/2019 12:12, Iago Toral Quiroga wrote: We had defined MAX_IMAGES as 8, which we used to size the array for image push constant data. The comment there stated that this was for gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes that array, asserting that we don't exceed that number of images, which imposes a limit of MAX_IMAGES on all gens. Furthermore, despite this, we are exposing up to 64 images per shader stage on all gens, gen8 included. This patch lowers the number of images we expose in gen8 to 8 and keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can actually use up to 64 images in shaders, and then adds an assert specific to gen8 to check that we never exceed 8. v2: - <= instead of < in the assert (Eric, Lionel) - Change the way the assertion is written (Eric) --- src/intel/vulkan/anv_device.c| 7 +-- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 3 ++- src/intel/vulkan/anv_private.h | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 523f1483e2..f85458b672 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo- is_haswell) ? 128 : 16; + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : MAX_IMAGES; + VkSampleCountFlags sample_counts = isl_device_get_sample_counts(&pdevice->isl_dev); + VkPhysicalDeviceLimits limits = { .maxImageDimension1D = (1 << 14), .maxImageDimension2D = (1 << 14), @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( .maxPerStageDescriptorUniformBuffers = 64, .maxPerStageDescriptorStorageBuffers = 64, .maxPerStageDescriptorSampledImages = max_samplers, - .maxPerStageDescriptorStorageImages = 64, + .maxPerStageDescriptorStorageImages = max_images, .maxPerStageDescriptorInputAttachments= 64, .maxPerStageResources = 250, .maxDescriptorSetSamplers = 6 * max_samplers, /* number of stages * maxPerStageDescriptorSamplers */ @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( .maxDescriptorSetStorageBuffers = 6 * 64, /* number of stages * maxPerStageDescriptorStorageBuffers */ .maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, .maxDescriptorSetSampledImages= 6 * max_samplers, /* number of stages * maxPerStageDescriptorSampledImages */ - .maxDescriptorSetStorageImages= 6 * 64, /* number of stages * maxPerStageDescriptorStorageImages */ + .maxDescriptorSetStorageImages= 6 * max_images, /* number of stages * maxPerStageDescriptorStorageImages */ .maxDescriptorSetInputAttachments = 256, .maxVertexInputAttributes = MAX_VBS, .maxVertexInputBindings = MAX_VBS, diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index b3daf702bc..53de347b3c 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -529,7 +529,8 @@ anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice, } if (map->image_count > 0) { - assert(map->image_count <= MAX_IMAGES); + assert((pdevice->compiler->devinfo->gen <= 8 && map- image_count <= MAX_GEN8_IMAGES) || + map->image_count <= MAX_IMAGES); I'm not sure why it wasn't < instead of <= previously, sounds like it should be <. I think <= is fine, map->image_count is not an index but the total count so its value should be fine up to the maximum allowed, right? Oh dear, sorry, you're right. Also I don't think this version works, your previous version was okay : image_count < MAX_GEN8_IMAGE || (gen > 8 && image_count < MAX_IMAGES) Right, I didn't read Eric's proposal properly, and it would not work for gen8. I'll revert the form of the assertion to the previous version. assert(shader->num_uniforms == prog_data->nr_params * 4); state.first_image_uniform = shader->num_uniforms; uint32_t *param = brw_stage_prog_data_add_params(prog_data, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 770254e93e..9ddd41b1fa 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -157,7 +157,8 @@ struct gen_l3_config; #define MAX_SCISSORS16 #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_DYNA
Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
Acked-by: Marek Olšák Marek On Sun, Dec 16, 2018 at 6:24 AM Gert Wollny wrote: > Since Meson will eventually be the only build system deprecate autotools > now. It can still be used by invoking configure with the flag > --enable-autotools > > Signed-off-by: Gert Wollny > --- > IMO autotools should be properly deprecated prior it its removal, so here > is a patch to do just that. I think autotools should be marked as > deprecated > for the 19.0 release and, depending on feedback, it could be removed with > 19.1. > Anyway, in the end it's up to the release team how to handle this. > > Best, > Gert > > configure.ac | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/configure.ac b/configure.ac > index 9b437a252c..73f5978bb7 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -52,6 +52,19 @@ mingw*) > ;; > esac > > +AC_ARG_ENABLE(autotools, > + [AS_HELP_STRING([--enable-autotools], > + [Enable the use of this autotools based build > configuration])], > + [enable_autotools=$enableval], [enable_autotools=no]) > + > +if test "x$enable_autotools" != "xyes" ; then > +AC_MSG_ERROR([the autotools build system has been deprecated in > favour of > +meson and will be removed eventually. For instructions on how to use > meson > +see https://www.mesa3d.org/meson.html. > +If you still want to use the autotools build, then add > --enable-autotools > +to the configure command line.]) > +fi > + > # Support silent build rules, requires at least automake-1.11. Disable > # by either passing --disable-silent-rules to configure or passing V=1 > # to make > -- > 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
Re: [Mesa-dev] [PATCH] EGL/mesa: Initial write up fot MESA_query_driver
Hi Veluri, On 2018/12/23, Veluri Mithun wrote: > - Try to retrieve driver name from dri2_egl_display > I would add a note that GLVND based Mesa and GLVND itself aren't updated. Might be a good idea to add an inline comment or two. > Signed-off-by: Veluri Mithun > --- > docs/specs/EGL_MESA_query_driver.txt | 54 > src/egl/main/eglapi.c| 13 +++ > src/egl/main/egldriver.c | 8 + > src/egl/main/egldriver.h | 3 ++ > src/egl/main/eglentrypoint.h | 1 + > 5 files changed, 79 insertions(+) > create mode 100644 docs/specs/EGL_MESA_query_driver.txt > > diff --git a/docs/specs/EGL_MESA_query_driver.txt > b/docs/specs/EGL_MESA_query_driver.txt > new file mode 100644 > index 00..bec7d4a15d > --- /dev/null > +++ b/docs/specs/EGL_MESA_query_driver.txt > @@ -0,0 +1,54 @@ > +Name > + > +MESA_query_driver > + > +Name Strings > + > +EGL_MESA_query_driver > + > +Contact > + > +Rob Clark > +Nicolai Hähnle > + Either my client seems to have gone crazy here or Nicolai's name is off? > +Contibutors > + > +Veluri Mithun > + > +Status > + > +XXX - Not complete yet!!! (draft) > + > +Version > + > +Version 1, 2018-11-05 > + > +Number > + > +EGL Extension ### > + > +Dependencies > + > +EGL 1.4 is required. > + > +Overview > + > +When an application has to query the name of a DRI driver and for > +obtaining driver's option list (UTF-8 encoded XML) of a DRI > +driver the below functions are useful. > + > +New Procedures and Functions > + > +const char* eglGetDriverConfig(EGLDisplay *disp, EGLDeviceEXT device, > + const char *driverName); We don't need the device here. What would happen if we give an invalid combination of display/drivername? > +const char* eglGetDisplayDriverName(EGLDisplay *disp); > + Analogous to the above, we want some clarification what would happen when the functions fail. Do we expect some error code to be set? Without such information applications don't known what to do as a follow-up. [snip] > +#include "egl_dri2.h" > > static mtx_t _eglModuleMutex = _MTX_INITIALIZER_NP; > static _EGLDriver *_eglDriver; > @@ -125,3 +126,10 @@ _eglUnloadDrivers(void) > free(_eglDriver); > _eglDriver = NULL; > } > + > +const char * > +_eglGetDriverName(_EGLDisplay *disp) > +{ > +struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); > +return dri2_dpy->driver_name; > +} One cannot use backend specific functions (dri2,haiku) here. I'd would suggest adding new internal API to the struct _egl_api and use them. WRT the Config API - it should will be almost identical to the GLX one in src/glx/dri_glx.c. The major differences will be: - basic check that the display + driver name combo is valid - the display/driver is already known and opened, so we can drop the driver_config_cache, driOpenDriver() and dlsym("__driConfigOptions") fallback. HTH Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] egl/egldevice: Fix broken reference to dev->device without LIBDRM
On Sat, 29 Dec 2018 at 16:05, Ilia Mirkin wrote: > > On Sat, Dec 29, 2018 at 6:17 AM Mathias Fröhlich > wrote: > > In Emils patches building on top, _eglGetDRMDeviceRenderNode is only called > > from > > code paths guarded with HAVE_LIBDRM. > > OK, so we could also guard the function's existence on HAVE_LIBDRM as > well. I think that's the most logical way forward, rather than having > a function which unexpectedly returns NULL. This sound better IMHO. Thanks Ilia! -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] egl/drivers/haiku: Fix reference to disp vs dpy
On Wed, 2 Jan 2019 at 13:48, Eric Engestrom wrote: > > On Thursday, 2018-12-27 20:41:47 +, Alexander von Gluck IV wrote: > > --- > > src/egl/drivers/haiku/egl_haiku.cpp | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/src/egl/drivers/haiku/egl_haiku.cpp > > b/src/egl/drivers/haiku/egl_haiku.cpp > > index a9c5cf8d29..d4b046c79b 100644 > > --- a/src/egl/drivers/haiku/egl_haiku.cpp > > +++ b/src/egl/drivers/haiku/egl_haiku.cpp > > @@ -29,6 +29,7 @@ > > > > #include "eglconfig.h" > > #include "eglcontext.h" > > +#include "egldevice.h" > > #include "egldisplay.h" > > #include "egldriver.h" > > #include "eglcurrent.h" > > @@ -215,7 +216,7 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) > > _eglError(EGL_NOT_INITIALIZED, "DRI2: failed to find > > EGLDevice"); > > return EGL_FALSE; > > } > > - disp->Device = dev; > > + dpy->Device = dev; > > > > TRACE("Add configs\n"); > > if (!haiku_add_configs_for_visuals(dpy)) > > -- > > 2.14.5 > > Thanks! > > Pushed with these tags added: > Reviewed-by: Eric Engestrom > Fixes: 00992700c9a812a54563 "egl: set the EGLDevice when creating a display" Thanks guys. I think we should follow-up with s/dpy/disp/ to align the haiku code with the rest. Otherwise we might end up doing such mistake again :-\ -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa] travis: avoid using unset llvm-config
On 2019/01/02, Eric Engestrom wrote: > Fixes the following errors: > usage: which [-as] program ... > /Users/travis/.travis/job_stages: line 110: --version: command not found > > ... caused by the use of an undefined $LLVM_CONFIG > > Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] docs: fix the meson aarch64 cross-file
On 2019/01/03, Eric Engestrom wrote: > `gcc-ar` is preferred over the generic `ar`, and the `arm` family is > for 32-bit ARM [1]. > > [1] https://mesonbuild.com/Reference-tables.html#cpu-families > > Signed-off-by: Eric Engestrom Nice. For the series Reviewed-by: Emil Velikov -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] bin/get-pick-list.sh: fix the oneline printing
"--summary" will also print extended header information such as creations, renames and mode changes. Let's just use "-s", which suppresses the diff output. Fixes: 559c32d2412 ("bin/get-pick-list.sh: simplify git oneline printing") Cc: Juan A. Suarez Cc: Eric Engestrom Cc: Dylan Baker Cc: Emil Velikov Signed-off-by: Andres Gomez --- bin/get-pick-list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/get-pick-list.sh b/bin/get-pick-list.sh index 3099fc69413..d71ff4a708a 100755 --- a/bin/get-pick-list.sh +++ b/bin/get-pick-list.sh @@ -143,7 +143,7 @@ do esac printf "[ %8s ] " "$tag" - git --no-pager show --summary --oneline $sha + git --no-pager show -s --oneline $sha done rm -f already_picked -- 2.18.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] bin/get-pick-list.sh: fix redirection in sh
"&>" is bash specific. Fixes: e0dbfc99537 ("bin/get-pick-list.sh: warn when commit lists invalid sha") Cc: Juan A. Suarez Cc: Eric Engestrom Cc: Dylan Baker Cc: Emil Velikov Signed-off-by: Andres Gomez --- bin/get-pick-list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/get-pick-list.sh b/bin/get-pick-list.sh index 79b7a295ea6..3099fc69413 100755 --- a/bin/get-pick-list.sh +++ b/bin/get-pick-list.sh @@ -44,7 +44,7 @@ is_sha_nomination() # Treat only the current line id=`echo "$fixes" | tail -n $fixes_count | head -n 1 | cut -d : -f 2` fixes_count=$(($fixes_count-1)) - if ! git show $id &>/dev/null; then + if ! git show $id >/dev/null 2>&1; then echo WARNING: Commit $1 lists invalid sha $id fi done -- 2.18.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] egl/drivers/haiku: Fix reference to disp vs dpy
On Friday, 2019-01-11 14:20:38 +, Emil Velikov wrote: > On Wed, 2 Jan 2019 at 13:48, Eric Engestrom wrote: > > > > On Thursday, 2018-12-27 20:41:47 +, Alexander von Gluck IV wrote: > > > --- > > > src/egl/drivers/haiku/egl_haiku.cpp | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/src/egl/drivers/haiku/egl_haiku.cpp > > > b/src/egl/drivers/haiku/egl_haiku.cpp > > > index a9c5cf8d29..d4b046c79b 100644 > > > --- a/src/egl/drivers/haiku/egl_haiku.cpp > > > +++ b/src/egl/drivers/haiku/egl_haiku.cpp > > > @@ -29,6 +29,7 @@ > > > > > > #include "eglconfig.h" > > > #include "eglcontext.h" > > > +#include "egldevice.h" > > > #include "egldisplay.h" > > > #include "egldriver.h" > > > #include "eglcurrent.h" > > > @@ -215,7 +216,7 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy) > > > _eglError(EGL_NOT_INITIALIZED, "DRI2: failed to find > > > EGLDevice"); > > > return EGL_FALSE; > > > } > > > - disp->Device = dev; > > > + dpy->Device = dev; > > > > > > TRACE("Add configs\n"); > > > if (!haiku_add_configs_for_visuals(dpy)) > > > -- > > > 2.14.5 > > > > Thanks! > > > > Pushed with these tags added: > > Reviewed-by: Eric Engestrom > > Fixes: 00992700c9a812a54563 "egl: set the EGLDevice when creating a display" > > Thanks guys. I think we should follow-up with s/dpy/disp/ to align the > haiku code with the rest. > Otherwise we might end up doing such mistake again :-\ Ack on the idea, but a quick grep shows that both dri2 and haiku have a mix of both `dpy` and `disp`, so make sure you fix them all ;) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] bin/get-pick-list.sh: fix the oneline printing
On Friday, 2019-01-11 16:42:25 +0200, Andres Gomez wrote: > "--summary" will also print extended header information such as > creations, renames and mode changes. > > Let's just use "-s", which suppresses the diff output. > > Fixes: 559c32d2412 ("bin/get-pick-list.sh: simplify git oneline printing") > Cc: Juan A. Suarez > Cc: Eric Engestrom > Cc: Dylan Baker > Cc: Emil Velikov > Signed-off-by: Andres Gomez > --- > bin/get-pick-list.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/bin/get-pick-list.sh b/bin/get-pick-list.sh > index 3099fc69413..d71ff4a708a 100755 > --- a/bin/get-pick-list.sh > +++ b/bin/get-pick-list.sh > @@ -143,7 +143,7 @@ do > esac > > printf "[ %8s ] " "$tag" > - git --no-pager show --summary --oneline $sha > + git --no-pager show -s --oneline $sha Small preference for the explicit `--no-patch` instead of `-s`, but: Reviewed-by: Eric Engestrom > done > > rm -f already_picked > -- > 2.18.0 > > ___ > 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
Re: [Mesa-dev] [RFC 1/6] dri: Support 64 bit rgba masks
Hi Kevin, Thanks for that massive undertaking in addressing this. On 2019/01/04, Kevin Strasser wrote: > The dri core api was written with the assumption that all attribute values > would fit into 32 bits. This limitation means the config handlers can't > accept 64 bpp formats. Reserve 64 bits for rgba masks and add new > attributes that allow access to the upper 32 bits. > > Signed-off-by: Kevin Strasser > --- > include/GL/internal/dri_interface.h | 6 ++- > src/egl/drivers/dri2/egl_dri2.c | 28 +--- > src/egl/drivers/dri2/egl_dri2.h | 6 +-- > src/egl/drivers/dri2/platform_android.c | 2 +- > src/egl/drivers/dri2/platform_drm.c | 67 > ++--- > src/egl/drivers/dri2/platform_surfaceless.c | 2 +- > src/egl/drivers/dri2/platform_wayland.c | 2 +- > src/egl/drivers/dri2/platform_x11.c | 6 +-- > src/gbm/backends/dri/gbm_driint.h | 8 ++-- > src/glx/glxconfig.h | 2 +- > src/mesa/drivers/dri/common/utils.c | 16 ++- > src/mesa/main/mtypes.h | 2 +- > 12 files changed, 108 insertions(+), 39 deletions(-) > Please split this up a bit. I'm thinking of: - dri_interface - mesa - egl - gbm - glx - seems sparse on updates, guessting you're followed in laster patches? > diff --git a/include/GL/internal/dri_interface.h > b/include/GL/internal/dri_interface.h > index 072f379..c5761c4 100644 > --- a/include/GL/internal/dri_interface.h > +++ b/include/GL/internal/dri_interface.h > @@ -747,7 +747,11 @@ struct __DRIuseInvalidateExtensionRec { > #define __DRI_ATTRIB_YINVERTED 47 > #define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE48 > #define __DRI_ATTRIB_MUTABLE_RENDER_BUFFER 49 /* > EGL_MUTABLE_RENDER_BUFFER_BIT_KHR */ > -#define __DRI_ATTRIB_MAX 50 > +#define __DRI_ATTRIB_RED_MASK_HI 50 > +#define __DRI_ATTRIB_GREEN_MASK_HI 51 > +#define __DRI_ATTRIB_BLUE_MASK_HI52 > +#define __DRI_ATTRIB_ALPHA_MASK_HI 53 > +#define __DRI_ATTRIB_MAX 54 Worth adding some defines as below for clarity/consistency sake and updating the existing code to use them? #define __DRI_ATTRIB_RED_MASK_LO __DRI_ATTRIB_RED_MASK ... > > /* __DRI_ATTRIB_RENDER_TYPE */ > #define __DRI_ATTRIB_RGBA_BIT0x01 > diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c > index 0be9235..d19950d 100644 > --- a/src/egl/drivers/dri2/egl_dri2.c > +++ b/src/egl/drivers/dri2/egl_dri2.c > @@ -179,7 +179,7 @@ dri2_match_config(const _EGLConfig *conf, const > _EGLConfig *criteria) > struct dri2_egl_config * > dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, > EGLint surface_type, const EGLint *attr_list, > -const unsigned int *rgba_masks) > +const unsigned long long int *rgba_masks) I'm slightly inclided towards uint64_t since it's a little more explicit and clear. IIRC sizeof(long long) varies across platforms and/or compilers so uint64_t will avoid all the potential fun ;-) [snip] > + const __DRIconfig *config = dri2_dpy->driver_configs[i]; > + unsigned long long int red, green, blue, alpha; > + unsigned int mask_hi = 0, mask_lo; > + > + dri2_dpy->core->getConfigAttrib(config, __DRI_ATTRIB_RED_MASK_HI, > + &mask_hi); > + dri2_dpy->core->getConfigAttrib(config, __DRI_ATTRIB_RED_MASK, > + &mask_lo); > + red = (unsigned long long int)mask_hi << 32 | mask_lo; > + > + dri2_dpy->core->getConfigAttrib(config, __DRI_ATTRIB_GREEN_MASK_HI, > + &mask_hi); > + dri2_dpy->core->getConfigAttrib(config, __DRI_ATTRIB_GREEN_MASK, > + &mask_lo); > + green = (unsigned long long int)mask_hi << 32 | mask_lo; > + > + dri2_dpy->core->getConfigAttrib(config, __DRI_ATTRIB_BLUE_MASK_HI, > + &mask_hi); > + dri2_dpy->core->getConfigAttrib(config, __DRI_ATTRIB_BLUE_MASK, > + &mask_lo); > + blue = (unsigned long long int)mask_hi << 32 | mask_lo; > + > + dri2_dpy->core->getConfigAttrib(config, __DRI_ATTRIB_ALPHA_MASK_HI, > + &mask_hi); > + dri2_dpy->core->getConfigAttrib(config, __DRI_ATTRIB_ALPHA_MASK, > + &mask_lo); > + alpha = (unsigned long long int)mask_hi << 32 | mask_lo; > Would be great to fold this into a helper since we have it in three places already. Speaking of which did you forget to git add the platform_wayland.c hunk? Note: getConfigAttrib returns 0 (GL_FALSE) on error (think new libEGL, old i965_dri.so) so we want to handle that in some way. [snip] > @@ -460,6 +464,14 @@ driGetConfigAttribIndex
Re: [Mesa-dev] [ANNOUNCE] mesa 18.3.1
I'll start with the 18.3.2 release process and keep with the the following bugfix releases by now. On Mon, 2019-01-07 at 15:33 +0200, Andres Gomez wrote: > Emil, the 18.3.2 should have already happened by the 19th of December. > > Is there anything stopping you from going ahead with it? > > I've also noticed that there is a 3 weeks gap (instead of 2) from > 18.3.2 to 18.3.3. I suppose you decided that due to most of the people > being on XMas and New Year holidays (?). It went unnoticed by me into > the calendar since it landed without review. > > Have into account that we can help to keep the pace of the releases > constant and steady, which is what we want. > > Please, do rise your hand ASAP whenever you feel you won't have time > for a release. Juan, Dylan or I can step in and take over for just a > punctual release or from that moment on, if needed. I, for example, was > working during most of the last weeks and could have helped with 18.3.2 > and 18.3.3 > > Anyway, do you need help for making happen 18.3.2 this week? > > Br. > > On Tue, 2018-12-11 at 21:42 +, Emil Velikov wrote: > > Mesa 18.3.1 is now available. > > > > This version disables the VK_EXT_pci_bus_info extension due to last > > minute issues spotted in the specification. > > > > > > Emil Velikov (3): > > docs: add sha256 checksums for 18.3.0 > > Update version to 18.3.1 > > docs: add release notes for 18.3.1 > > > > Jason Ekstrand (1): > > anv,radv: Disable VK_EXT_pci_bus_info > > > > git tag: mesa-18.3.1 > > > > https://mesa.freedesktop.org/archive/mesa-18.3.1.tar.gz > > MD5: 2de82245518020872fee4c2f9a8c709b mesa-18.3.1.tar.gz > > SHA1: 103cb6e8d52ea82ba30ecd546f4ca5c63ceef2e4 mesa-18.3.1.tar.gz > > SHA256: 256d0c3d88e380c1b8e3fc5c6ac34001e3b7c30458b8b852407ec68b8ccd9fda > > mesa-18.3.1.tar.gz > > SHA512: > > 16e5b52246bcb8c014b59bf7d0ad77b0e350bca212c2ee3e2b8a66bbed59d2f8e2a557f210ea45f98db988039ebb348cb69acf77505fb8e33b29da5efb5307de > > mesa-18.3.1.tar.gz > > PGP: https://mesa.freedesktop.org/archive/mesa-18.3.1.tar.gz.sig > > > > https://mesa.freedesktop.org/archive/mesa-18.3.1.tar.xz > > MD5: d60828056d77bfdbae0970f9b15fb1be mesa-18.3.1.tar.xz > > SHA1: 50ba2d37647fea77ea19416e8a6ffed34c313330 mesa-18.3.1.tar.xz > > SHA256: 5b1f827d28684a25f6657289f8b7d47ac56395988c7ac23e0ec9a62b644bdc63 > > mesa-18.3.1.tar.xz > > SHA512: > > a68d39158cf1e868d70730d0641a0cfe4c6e5b3cd1bc0c47f54022402aca03503933084f6ddc722bf88c9b6d1281ba5c847ec4fed8092a9b33f90527d08e12db > > mesa-18.3.1.tar.xz > > PGP: https://mesa.freedesktop.org/archive/mesa-18.3.1.tar.xz.sig > > > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev -- Br, Andres ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] bin/get-pick-list.sh: fix redirection in sh
On Friday, 2019-01-11 16:43:27 +0200, Andres Gomez wrote: > "&>" is bash specific. > > Fixes: e0dbfc99537 ("bin/get-pick-list.sh: warn when commit lists invalid > sha") > Cc: Juan A. Suarez > Cc: Eric Engestrom > Cc: Dylan Baker > Cc: Emil Velikov > Signed-off-by: Andres Gomez Reviewed-by: Eric Engestrom > --- > bin/get-pick-list.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/bin/get-pick-list.sh b/bin/get-pick-list.sh > index 79b7a295ea6..3099fc69413 100755 > --- a/bin/get-pick-list.sh > +++ b/bin/get-pick-list.sh > @@ -44,7 +44,7 @@ is_sha_nomination() > # Treat only the current line > id=`echo "$fixes" | tail -n $fixes_count | head -n 1 | cut -d : > -f 2` > fixes_count=$(($fixes_count-1)) > - if ! git show $id &>/dev/null; then > + if ! git show $id >/dev/null 2>&1; then > echo WARNING: Commit $1 lists invalid sha $id > fi > done > -- > 2.18.0 > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v3] anv/device: fix maximum number of images supported
We had defined MAX_IMAGES as 8, which we used to size the array for image push constant data. The comment there stated that this was for gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes that array, asserting that we don't exceed that number of images, which imposes a limit of MAX_IMAGES on all gens. Furthermore, despite this, we are exposing up to 64 images per shader stage on all gens, gen8 included. This patch lowers the number of images we expose in gen8 to 8 and keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can actually use up to 64 images in shaders, and then adds an assert specific to gen8 to check that we never exceed 8. v2: - <= instead of < in the assert (Eric, Lionel) - Change the way the assertion is written (Eric) v3: - Revert the way the assertion is written to the for it had in v1, the version in v2 was not equivalent and was incorrect. (Lionel) --- src/intel/vulkan/anv_device.c| 7 +-- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 +++- src/intel/vulkan/anv_private.h | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 523f1483e2..f85458b672 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ? 128 : 16; + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : MAX_IMAGES; + VkSampleCountFlags sample_counts = isl_device_get_sample_counts(&pdevice->isl_dev); + VkPhysicalDeviceLimits limits = { .maxImageDimension1D = (1 << 14), .maxImageDimension2D = (1 << 14), @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( .maxPerStageDescriptorUniformBuffers = 64, .maxPerStageDescriptorStorageBuffers = 64, .maxPerStageDescriptorSampledImages = max_samplers, - .maxPerStageDescriptorStorageImages = 64, + .maxPerStageDescriptorStorageImages = max_images, .maxPerStageDescriptorInputAttachments= 64, .maxPerStageResources = 250, .maxDescriptorSetSamplers = 6 * max_samplers, /* number of stages * maxPerStageDescriptorSamplers */ @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( .maxDescriptorSetStorageBuffers = 6 * 64, /* number of stages * maxPerStageDescriptorStorageBuffers */ .maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, .maxDescriptorSetSampledImages= 6 * max_samplers, /* number of stages * maxPerStageDescriptorSampledImages */ - .maxDescriptorSetStorageImages= 6 * 64, /* number of stages * maxPerStageDescriptorStorageImages */ + .maxDescriptorSetStorageImages= 6 * max_images, /* number of stages * maxPerStageDescriptorStorageImages */ .maxDescriptorSetInputAttachments = 256, .maxVertexInputAttributes = MAX_VBS, .maxVertexInputBindings = MAX_VBS, diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index b3daf702bc..ae5c19578c 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -529,7 +529,9 @@ anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice, } if (map->image_count > 0) { - assert(map->image_count <= MAX_IMAGES); + assert(map->image_count <= MAX_IMAGES && + (pdevice->compiler->devinfo->gen > 8 || + map->image_count <= MAX_GEN8_IMAGES)); assert(shader->num_uniforms == prog_data->nr_params * 4); state.first_image_uniform = shader->num_uniforms; uint32_t *param = brw_stage_prog_data_add_params(prog_data, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 770254e93e..9ddd41b1fa 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -157,7 +157,8 @@ struct gen_l3_config; #define MAX_SCISSORS16 #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_DYNAMIC_BUFFERS 16 -#define MAX_IMAGES 8 +#define MAX_IMAGES 64 +#define MAX_GEN8_IMAGES 8 #define MAX_PUSH_DESCRIPTORS 32 /* Minimum requirement */ /* The kernel relocation API has a limitation of a 32-bit delta value @@ -1882,7 +1883,6 @@ struct anv_push_constants { /* Used for vkCmdDispatchBase */ uint32_t base_work_group_id[3]; - /* Image data for image_load_store on pre-SKL */ struct brw_image_param images[MAX_IMAGES]; }; -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa
Re: [Mesa-dev] [PATCH v3] anv/device: fix maximum number of images supported
On 11/01/2019 15:12, Iago Toral Quiroga wrote: We had defined MAX_IMAGES as 8, which we used to size the array for image push constant data. The comment there stated that this was for gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes that array, asserting that we don't exceed that number of images, which imposes a limit of MAX_IMAGES on all gens. Furthermore, despite this, we are exposing up to 64 images per shader stage on all gens, gen8 included. This patch lowers the number of images we expose in gen8 to 8 and keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can actually use up to 64 images in shaders, and then adds an assert specific to gen8 to check that we never exceed 8. v2: - <= instead of < in the assert (Eric, Lionel) - Change the way the assertion is written (Eric) v3: - Revert the way the assertion is written to the for it had in v1, the version in v2 was not equivalent and was incorrect. (Lionel) Thanks! Do you think this should go to stable? Anyway : Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/anv_device.c| 7 +-- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 +++- src/intel/vulkan/anv_private.h | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 523f1483e2..f85458b672 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ? 128 : 16; + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : MAX_IMAGES; + VkSampleCountFlags sample_counts = isl_device_get_sample_counts(&pdevice->isl_dev); + VkPhysicalDeviceLimits limits = { .maxImageDimension1D = (1 << 14), .maxImageDimension2D = (1 << 14), @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( .maxPerStageDescriptorUniformBuffers = 64, .maxPerStageDescriptorStorageBuffers = 64, .maxPerStageDescriptorSampledImages = max_samplers, - .maxPerStageDescriptorStorageImages = 64, + .maxPerStageDescriptorStorageImages = max_images, .maxPerStageDescriptorInputAttachments= 64, .maxPerStageResources = 250, .maxDescriptorSetSamplers = 6 * max_samplers, /* number of stages * maxPerStageDescriptorSamplers */ @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( .maxDescriptorSetStorageBuffers = 6 * 64, /* number of stages * maxPerStageDescriptorStorageBuffers */ .maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, .maxDescriptorSetSampledImages= 6 * max_samplers, /* number of stages * maxPerStageDescriptorSampledImages */ - .maxDescriptorSetStorageImages= 6 * 64, /* number of stages * maxPerStageDescriptorStorageImages */ + .maxDescriptorSetStorageImages= 6 * max_images, /* number of stages * maxPerStageDescriptorStorageImages */ .maxDescriptorSetInputAttachments = 256, .maxVertexInputAttributes = MAX_VBS, .maxVertexInputBindings = MAX_VBS, diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index b3daf702bc..ae5c19578c 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -529,7 +529,9 @@ anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice, } if (map->image_count > 0) { - assert(map->image_count <= MAX_IMAGES); + assert(map->image_count <= MAX_IMAGES && + (pdevice->compiler->devinfo->gen > 8 || + map->image_count <= MAX_GEN8_IMAGES)); assert(shader->num_uniforms == prog_data->nr_params * 4); state.first_image_uniform = shader->num_uniforms; uint32_t *param = brw_stage_prog_data_add_params(prog_data, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 770254e93e..9ddd41b1fa 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -157,7 +157,8 @@ struct gen_l3_config; #define MAX_SCISSORS16 #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_DYNAMIC_BUFFERS 16 -#define MAX_IMAGES 8 +#define MAX_IMAGES 64 +#define MAX_GEN8_IMAGES 8 #define MAX_PUSH_DESCRIPTORS 32 /* Minimum requirement */ /* The kernel relocation API has a limitation of a 32-bit delta value @@ -1882,7 +1883,6 @@ struct anv_push_constants { /* Used for vkCmdDispatchBase */ uint32_t base_work_group_id[3]; - /* Image data for image_load_store on pre-SKL */ struct brw_image
Re: [Mesa-dev] [ANNOUNCE] mesa 18.3.1
Hi Andres, On Fri, 11 Jan 2019 at 15:05, Andres Gomez wrote: > > I'll start with the 18.3.2 release process and keep with the the > following bugfix releases by now. > I was going through it earlier today and was going to send it out in the next couple of hours. For anyone wondering "lucky" me got into some nasty health problem around spending some holidays :-\ Everything has been sorted and I'm back to normal now. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3] anv/device: fix maximum number of images supported
On Fri, 2019-01-11 at 15:24 +, Lionel Landwerlin wrote: > On 11/01/2019 15:12, Iago Toral Quiroga wrote: > > We had defined MAX_IMAGES as 8, which we used to size the array for > > image push constant data. The comment there stated that this was > > for > > gen8, but anv_nir_apply_pipeline_layout runs for all gens and > > writes > > that array, asserting that we don't exceed that number of images, > > which imposes a limit of MAX_IMAGES on all gens. > > > > Furthermore, despite this, we are exposing up to 64 images per > > shader > > stage on all gens, gen8 included. > > > > This patch lowers the number of images we expose in gen8 to 8 and > > keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can > > actually use up to 64 images in shaders, and then adds an assert > > specific to gen8 to check that we never exceed 8. > > > > v2: > > - <= instead of < in the assert (Eric, Lionel) > > - Change the way the assertion is written (Eric) > > > > v3: > > - Revert the way the assertion is written to the for it had in > > v1, > > the version in v2 was not equivalent and was incorrect. > > (Lionel) > > > Thanks! Do you think this should go to stable? Yes, I think it should, I'll add a CC to stable when I push the patch, but I'll wait for Jason's ack before doing that since I discussed the underlying problem with him before. Iago > Anyway : > > > Reviewed-by: Lionel Landwerlin > > > > > --- > > src/intel/vulkan/anv_device.c| 7 +-- > > src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 +++- > > src/intel/vulkan/anv_private.h | 4 ++-- > > 3 files changed, 10 insertions(+), 5 deletions(-) > > > > diff --git a/src/intel/vulkan/anv_device.c > > b/src/intel/vulkan/anv_device.c > > index 523f1483e2..f85458b672 100644 > > --- a/src/intel/vulkan/anv_device.c > > +++ b/src/intel/vulkan/anv_device.c > > @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( > > const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo- > > >is_haswell) ? > >128 : 16; > > > > + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES > > : MAX_IMAGES; > > + > > VkSampleCountFlags sample_counts = > > isl_device_get_sample_counts(&pdevice->isl_dev); > > > > + > > VkPhysicalDeviceLimits limits = { > > .maxImageDimension1D = (1 << 14), > > .maxImageDimension2D = (1 << 14), > > @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( > > .maxPerStageDescriptorUniformBuffers = 64, > > .maxPerStageDescriptorStorageBuffers = 64, > > .maxPerStageDescriptorSampledImages = max_samplers, > > - .maxPerStageDescriptorStorageImages = 64, > > + .maxPerStageDescriptorStorageImages = max_images, > > .maxPerStageDescriptorInputAttachments= 64, > > .maxPerStageResources = 250, > > .maxDescriptorSetSamplers = 6 * > > max_samplers, /* number of stages * maxPerStageDescriptorSamplers > > */ > > @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( > > .maxDescriptorSetStorageBuffers = 6 * > > 64, /* number of stages * > > maxPerStageDescriptorStorageBuffers */ > > .maxDescriptorSetStorageBuffersDynamic= > > MAX_DYNAMIC_BUFFERS / 2, > > .maxDescriptorSetSampledImages= 6 * > > max_samplers, /* number of stages * > > maxPerStageDescriptorSampledImages */ > > - .maxDescriptorSetStorageImages= 6 * > > 64, /* number of stages * > > maxPerStageDescriptorStorageImages */ > > + .maxDescriptorSetStorageImages= 6 * > > max_images, /* number of stages * > > maxPerStageDescriptorStorageImages */ > > .maxDescriptorSetInputAttachments = 256, > > .maxVertexInputAttributes = MAX_VBS, > > .maxVertexInputBindings = MAX_VBS, > > diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > index b3daf702bc..ae5c19578c 100644 > > --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > > @@ -529,7 +529,9 @@ anv_nir_apply_pipeline_layout(const struct > > anv_physical_device *pdevice, > > } > > > > if (map->image_count > 0) { > > - assert(map->image_count <= MAX_IMAGES); > > + assert(map->image_count <= MAX_IMAGES && > > + (pdevice->compiler->devinfo->gen > 8 || > > + map->image_count <= MAX_GEN8_IMAGES)); > > assert(shader->num_uniforms == prog_data->nr_params * 4); > > state.first_image_uniform = shader->num_uniforms; > > uint32_t *param = brw_stage_prog_data_add_params(prog_data, > > diff --git a/src/intel/vulkan/anv_private.h > > b/src/intel/vulkan/anv_private.h > > index
Re: [Mesa-dev] [ANNOUNCE] mesa 18.3.1
On Fri, 11 Jan 2019 at 15:22, Emil Velikov wrote: > > Hi Andres, > > On Fri, 11 Jan 2019 at 15:05, Andres Gomez wrote: > > > > I'll start with the 18.3.2 release process and keep with the the > > following bugfix releases by now. > > > I was going through it earlier today and was going to send it out in > the next couple of hours. > Ouch, should have git fetch before sending this. You guys have 18.3.2 almost sorted so it's better to let you finalise it. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [ANNOUNCE] mesa 18.3.1
On Fri, 2019-01-11 at 15:22 +, Emil Velikov wrote: > Hi Andres, > > On Fri, 11 Jan 2019 at 15:05, Andres Gomez wrote: > > > > I'll start with the 18.3.2 release process and keep with the the > > following bugfix releases by now. > > > > I was going through it earlier today and was going to send it out in > the next couple of hours. Ugh! I had also been going through it and was having a queue half done while doing local testing ... ... well, let's not duplicate the effort any more. Let us know if you need a hand in the future. > For anyone wondering "lucky" me got into some nasty health problem > around spending some holidays :-\ > Everything has been sorted and I'm back to normal now. Happy to hear you are healthy again and back! ☺ -- Br, Andres ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] bin/get-pick-list.sh: fix redirection in sh
On 2019/01/11, Andres Gomez wrote: > "&>" is bash specific. > > Fixes: e0dbfc99537 ("bin/get-pick-list.sh: warn when commit lists invalid > sha") > Cc: Juan A. Suarez > Cc: Eric Engestrom > Cc: Dylan Baker > Cc: Emil Velikov Reviewed-by: Emil Velikov Out of curiosity, are you using dash/mksh? ZSH seems happy. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] bin/get-pick-list.sh: fix the oneline printing
On 2019/01/11, Andres Gomez wrote: > "--summary" will also print extended header information such as > creations, renames and mode changes. > I might be missing some settings - cannot see any of those here. Regardless, I have slight inclination towards --no-patch (as Eric suggested) but either way the patch is Reviewed-by: Emil Velikov -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Wednesday, January 9, 2019 5:33:22 PM PST Ian Romanick wrote: > On 1/8/19 9:57 PM, Kenneth Graunke wrote: > > On Tuesday, December 4, 2018 10:26:43 AM PST Karol Herbst wrote: > >> the naming is a bit confusing no matter how you look at it. Within SPIR-V > >> "global" memory is memory accessible from all threads. glsl "global" memory > >> normally refers to shader thread private memory declared at global scope. > >> As > >> we already use "shared" for memory shared across all thrads of a work group > >> the solution where everybody could be happy with is to rename "global" to > >> "private" and use "global" later for memory usually stored within system > >> accessible memory (be it VRAM or system RAM if keeping SVM in mind). > >> glsl "local" memory is memory only accessible within a function, while > >> SPIR-V > >> "local" memory is memory accessible within the same workgroup. > >> > >> v2: rename local to function as well > >> > >> Signed-off-by: Karol Herbst > > > > I strongly dislike this patch, and I think we ought to revert it. > > > > This probably makes sense from an OpenCL memory-model view of the world, > > but it's really confusing from a compiler or general programming point > > of view. > > > > /Everybody/ knows what a local variable is. It's one of the most used > > concepts in programming. Calling it nir_var_function is very confusing. > > The variable is a...function? Maybe it's a function pointer? Neither > > of those things even exist in GLSL, so...what the heck is it? > > > > Renaming global scope variables to "private" is also confusing IMO. > > They're certainly not private to a function. They're globally > > accessible by anything in the whole shader. I'll admit "global" isn't > > a great name either. > > It seems like the concepts we're after a function local and thread > local, so why not nir_var_thread_local (for old nir_var_global) and > nir_var_function_local (for old nir_var_local). When "global" is > reintroduced to mean thread global, we could add it as > nir_var_thread_global. That seems to match at least one reasonable view > of a storage hierarchy. Those names (nir_var_func_local, nir_var_thread_local, and nir_var_thread_global) make more sense to me than private/function. Another option is `nir_var_local_temp` and `nir_var_shader_temp`, indicating that they're just temporary variables, and not anything with special semantics like memory. shader_temp would pair well with the existing shader_in/shader_out, since they have the same scope. I might also consider adding 'mem' to variables representing memory. So that would look like... nir_var_shader_in nir_var_shader_out nir_var_shader_temp (formerly local/function) nir_var_local_temp (formerly global/private) nir_var_uniform nir_var_system_value nir_var_mem_ubo (added mem) nir_var_mem_ssbo (added mem) nir_var_mem_shared (added mem) nir_var_mem_global (the new global memory type being introduced) How does that look? We may also want to rename the nir->globals list, or nir_lower_global_vars_to_local and nir_opt_global_to_local. Not sure. --Ken 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
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote: > On Wednesday, January 9, 2019 5:33:22 PM PST Ian Romanick wrote: > > On 1/8/19 9:57 PM, Kenneth Graunke wrote: > > > On Tuesday, December 4, 2018 10:26:43 AM PST Karol Herbst wrote: > > >> the naming is a bit confusing no matter how you look at it. Within > SPIR-V > > >> "global" memory is memory accessible from all threads. glsl "global" > memory > > >> normally refers to shader thread private memory declared at global > scope. As > > >> we already use "shared" for memory shared across all thrads of a work > group > > >> the solution where everybody could be happy with is to rename > "global" to > > >> "private" and use "global" later for memory usually stored within > system > > >> accessible memory (be it VRAM or system RAM if keeping SVM in mind). > > >> glsl "local" memory is memory only accessible within a function, > while SPIR-V > > >> "local" memory is memory accessible within the same workgroup. > > >> > > >> v2: rename local to function as well > > >> > > >> Signed-off-by: Karol Herbst > > > > > > I strongly dislike this patch, and I think we ought to revert it. > > > > > > This probably makes sense from an OpenCL memory-model view of the > world, > > > but it's really confusing from a compiler or general programming point > > > of view. > > > > > > /Everybody/ knows what a local variable is. It's one of the most used > > > concepts in programming. Calling it nir_var_function is very > confusing. > > > The variable is a...function? Maybe it's a function pointer? Neither > > > of those things even exist in GLSL, so...what the heck is it? > > > > > > Renaming global scope variables to "private" is also confusing IMO. > > > They're certainly not private to a function. They're globally > > > accessible by anything in the whole shader. I'll admit "global" isn't > > > a great name either. > > > > It seems like the concepts we're after a function local and thread > > local, so why not nir_var_thread_local (for old nir_var_global) and > > nir_var_function_local (for old nir_var_local). When "global" is > > reintroduced to mean thread global, we could add it as > > nir_var_thread_global. That seems to match at least one reasonable view > > of a storage hierarchy. > > Those names (nir_var_func_local, nir_var_thread_local, and > nir_var_thread_global) make more sense to me than private/function. > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, > indicating that they're just temporary variables, and not anything > with special semantics like memory. shader_temp would pair well with > the existing shader_in/shader_out, since they have the same scope. > > I might also consider adding 'mem' to variables representing memory. > > So that would look like... > >nir_var_shader_in >nir_var_shader_out >nir_var_shader_temp (formerly local/function) >nir_var_local_temp (formerly global/private) > Are those flipped? >nir_var_uniform >nir_var_system_value >nir_var_mem_ubo (added mem) >nir_var_mem_ssbo (added mem) >nir_var_mem_shared (added mem) >nir_var_mem_global (the new global memory type being introduced) > > How does that look? > I think I kind of like having "mem" be on external things. Shared is a little weird there because it never leaves the chip so is it mem or shader? > We may also want to rename the nir->globals list, or > nir_lower_global_vars_to_local and nir_opt_global_to_local. Not sure. > Yes, whatever we do, we should make those lists more consistent. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v3 1/3] util: introduce the util_strnappend function (v2)
This function is similar to strncat, but unlike strncat it allows to concatenate the buffer with a formatted string. The alternative would be to have an intermediate string that is formated first, and then appended via strncat. v2: revert accidentally introduced blank line removal Signed-off-by: Silvestrs Timofejevs Reviewed-by: Eric Engestrom --- src/util/u_string.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/util/u_string.h b/src/util/u_string.h index e408146..2036815 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -223,6 +223,21 @@ util_strstr(const char *haystack, const char *needle) #endif +/* Append a formatted string to the buffer, up to the buffer size */ +static inline void +util_strnappend(char *const buf, const int buf_size, const char *fmt, ...) +{ + int max_allowed; + va_list args; + size_t buf_len = strlen(buf); + + max_allowed = buf_size - buf_len; + assert(max_allowed >= 0); + + va_start(args, fmt); + (void) util_vsnprintf(&buf[buf_len], max_allowed, fmt, args); + va_end(args); +} #ifdef __cplusplus } -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] debug feature to dump "get configs" and "chosen configs" (v3)
This patch series provides an easy way to see what configs have been returned by the 'eglGetConfigs' and 'eglChooseConfig' functions, and give an overview of config attributes. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v3 2/3] egl: introduce a log level getter function
Being able to retrieve the log level can be useful to enable/disable debug code. The alternative, which is calling 'getenv' function every time to retrieve the log level, is more "expensive". Signed-off-by: Silvestrs Timofejevs Reviewed-by: Eric Engestrom --- src/egl/main/egllog.c | 9 + src/egl/main/egllog.h | 4 2 files changed, 13 insertions(+) diff --git a/src/egl/main/egllog.c b/src/egl/main/egllog.c index c223f49..42bae01 100644 --- a/src/egl/main/egllog.c +++ b/src/egl/main/egllog.c @@ -133,6 +133,15 @@ _eglInitLogger(void) } } +/** + * Return the log level. + */ +EGLint +_eglGetLogLevel(void) +{ + return logging.level; +} + /** * Log a message with message logger. diff --git a/src/egl/main/egllog.h b/src/egl/main/egllog.h index 2a06a34..a1cf977 100644 --- a/src/egl/main/egllog.h +++ b/src/egl/main/egllog.h @@ -44,6 +44,10 @@ extern "C" { #define _EGL_DEBUG 3 /* useful info for debugging */ +extern EGLint +_eglGetLogLevel(void); + + extern void _eglLog(EGLint level, const char *fmtStr, ...); -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v3 3/3] egl: add config debug printout (v3)
Feature to print out EGL returned configs for debug purposes. 'eglChooseConfig' and 'eglGetConfigs' debug information printout is enabled when the log level equals '_EGL_DEBUG'. The configs are printed, and if any of them are "chosen" they are marked with their index in the chosen configs array. v2: a) refactor the code in line with Eric's comments b) rename function _snprintfStrcat, split it out and put into the src/util/u_string.h, make it a separate patch. v3: remove unnecessary 'const' qualifiers from the function prototype Signed-off-by: Silvestrs Timofejevs Reviewed-by: Eric Engestrom --- src/egl/Makefile.sources | 4 +- src/egl/main/eglconfig.c | 20 +++- src/egl/main/eglconfigdebug.c | 265 ++ src/egl/main/eglconfigdebug.h | 55 + src/egl/meson.build | 2 + 5 files changed, 341 insertions(+), 5 deletions(-) create mode 100644 src/egl/main/eglconfigdebug.c create mode 100644 src/egl/main/eglconfigdebug.h diff --git a/src/egl/Makefile.sources b/src/egl/Makefile.sources index 0cc5f1b..353a848 100644 --- a/src/egl/Makefile.sources +++ b/src/egl/Makefile.sources @@ -28,7 +28,9 @@ LIBEGL_C_FILES := \ main/eglsync.c \ main/eglsync.h \ main/eglentrypoint.h \ - main/egltypedefs.h + main/egltypedefs.h \ + main/eglconfigdebug.h \ + main/eglconfigdebug.c dri2_backend_core_FILES := \ drivers/dri2/egl_dri2.c \ diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index a346f93..0095dc2 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -40,6 +40,7 @@ #include "util/macros.h" #include "eglconfig.h" +#include "eglconfigdebug.h" #include "egldisplay.h" #include "eglcurrent.h" #include "egllog.h" @@ -797,14 +798,21 @@ _eglChooseConfig(_EGLDriver *drv, _EGLDisplay *disp, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_configs) { _EGLConfig criteria; + EGLBoolean result; if (!_eglParseConfigAttribList(&criteria, disp, attrib_list)) return _eglError(EGL_BAD_ATTRIBUTE, "eglChooseConfig"); - return _eglFilterConfigArray(disp->Configs, - configs, config_size, num_configs, - _eglFallbackMatch, _eglFallbackCompare, - (void *) &criteria); + result = _eglFilterConfigArray(disp->Configs, + configs, config_size, num_configs, + _eglFallbackMatch, _eglFallbackCompare, + (void *) &criteria); + + if (result && (_eglGetLogLevel() == _EGL_DEBUG)) + eglPrintConfigDebug(drv, disp, configs, *num_configs, + EGL_CONFIG_DEBUG_CHOOSE); + + return result; } @@ -857,5 +865,9 @@ _eglGetConfigs(_EGLDriver *drv, _EGLDisplay *disp, EGLConfig *configs, *num_config = _eglFlattenArray(disp->Configs, (void *) configs, sizeof(configs[0]), config_size, _eglFlattenConfig); + if (_eglGetLogLevel() == _EGL_DEBUG) + eglPrintConfigDebug(drv, disp, configs, *num_config, + EGL_CONFIG_DEBUG_GET); + return EGL_TRUE; } diff --git a/src/egl/main/eglconfigdebug.c b/src/egl/main/eglconfigdebug.c new file mode 100644 index 000..0617c99 --- /dev/null +++ b/src/egl/main/eglconfigdebug.c @@ -0,0 +1,265 @@ +/* + * Copyright 2017 Imagination Technologies. + * All Rights Reserved. + * + * Based on eglinfo, which has copyright: + * Copyright (C) 2005 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include +#include +#include +#include + +#include "eglarray.h" +#include "eglconfig.h" +#include "eglconfigdebug.h" +#include "egldisplay.h" +#include "egllog.h" +#include "egltypedefs.h" +#include "util/macros.h" +#include "util/u_string.h" + +/* Max debug message length */ +#define CONFIG_DEBUG_MSG_MAX 1000 + +/* + * These are X visual types, so if
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
" On Fri, Jan 11, 2019 at 5:19 PM Kenneth Graunke wrote: > > On Wednesday, January 9, 2019 5:33:22 PM PST Ian Romanick wrote: > > On 1/8/19 9:57 PM, Kenneth Graunke wrote: > > > On Tuesday, December 4, 2018 10:26:43 AM PST Karol Herbst wrote: > > >> the naming is a bit confusing no matter how you look at it. Within SPIR-V > > >> "global" memory is memory accessible from all threads. glsl "global" > > >> memory > > >> normally refers to shader thread private memory declared at global > > >> scope. As > > >> we already use "shared" for memory shared across all thrads of a work > > >> group > > >> the solution where everybody could be happy with is to rename "global" to > > >> "private" and use "global" later for memory usually stored within system > > >> accessible memory (be it VRAM or system RAM if keeping SVM in mind). > > >> glsl "local" memory is memory only accessible within a function, while > > >> SPIR-V > > >> "local" memory is memory accessible within the same workgroup. > > >> > > >> v2: rename local to function as well > > >> > > >> Signed-off-by: Karol Herbst > > > > > > I strongly dislike this patch, and I think we ought to revert it. > > > > > > This probably makes sense from an OpenCL memory-model view of the world, > > > but it's really confusing from a compiler or general programming point > > > of view. > > > > > > /Everybody/ knows what a local variable is. It's one of the most used > > > concepts in programming. Calling it nir_var_function is very confusing. > > > The variable is a...function? Maybe it's a function pointer? Neither > > > of those things even exist in GLSL, so...what the heck is it? > > > > > > Renaming global scope variables to "private" is also confusing IMO. > > > They're certainly not private to a function. They're globally > > > accessible by anything in the whole shader. I'll admit "global" isn't > > > a great name either. > > > > It seems like the concepts we're after a function local and thread > > local, so why not nir_var_thread_local (for old nir_var_global) and > > nir_var_function_local (for old nir_var_local). When "global" is > > reintroduced to mean thread global, we could add it as > > nir_var_thread_global. That seems to match at least one reasonable view > > of a storage hierarchy. > > Those names (nir_var_func_local, nir_var_thread_local, and > nir_var_thread_global) make more sense to me than private/function. > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, > indicating that they're just temporary variables, and not anything > with special semantics like memory. shader_temp would pair well with > the existing shader_in/shader_out, since they have the same scope. > > I might also consider adding 'mem' to variables representing memory. > > So that would look like... > >nir_var_shader_in >nir_var_shader_out >nir_var_shader_temp (formerly local/function) >nir_var_local_temp (formerly global/private) >nir_var_uniform >nir_var_system_value >nir_var_mem_ubo (added mem) >nir_var_mem_ssbo (added mem) >nir_var_mem_shared (added mem) >nir_var_mem_global (the new global memory type being introduced) > > How does that look? > overall it makes inherently sense. I just would like to express that "shader_temp" is actually memory belonging to a function (parameters or variables). > We may also want to rename the nir->globals list, or > nir_lower_global_vars_to_local and nir_opt_global_to_local. Not sure. > > --Ken ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Thoughts after hitting 100 merge requests?
All, The mesa project has now hit 100 merge requests (36 are still open). I (and I'm sure others) would be curious to hear people's initial thoughts on the process. What's working well? What's not working? Is it total fail and should we go back to mailing lists? --Jason ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Thoughts after hitting 100 merge requests?
I'm putting my own thoughts in a reply for some reason. Here's what I've seen. 1. I really like GitLab "discussions". It provides a very good way for both the author and the reviewers to keep track of what review comments have been dealt with and what comments are still outstanding. 2. GitLab is currently missing a good way to comment on commit messages which makes giving review tags rather painful. There is a GitLab issue opened about this: https://gitlab.com/gitlab-org/gitlab-ce/issues/38602 3. GitLab has a bug regarding per-commit comments where they tend to get lost while you're looking at the commit itself: https://gitlab.com/gitlab-org/gitlab-ce/issues/53175 4. At least two of those merge requests were small bug fixes by brand new contributors who I've never seen on the mailing list. 5. There's no way with gitlab for Reviewed-by tags to get automatically applied as part of the merging process. This makes merging a bit more manual than it needs to be but is really no worse than it was before. Ok, there you have my thoughts. I'd be happy to hear others. --Jason On Fri, Jan 11, 2019 at 10:57 AM Jason Ekstrand wrote: > All, > > The mesa project has now hit 100 merge requests (36 are still open). I > (and I'm sure others) would be curious to hear people's initial thoughts on > the process. What's working well? What's not working? Is it total fail > and should we go back to mailing lists? > > --Jason > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote: > > Those names (nir_var_func_local, nir_var_thread_local, and > > nir_var_thread_global) make more sense to me than private/function. > > > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, > > indicating that they're just temporary variables, and not anything > > with special semantics like memory. shader_temp would pair well with > > the existing shader_in/shader_out, since they have the same scope. > > > > I might also consider adding 'mem' to variables representing memory. > > > > So that would look like... > > > >nir_var_shader_in > >nir_var_shader_out > >nir_var_shader_temp (formerly local/function) > >nir_var_local_temp (formerly global/private) > > > > Are those flipped? Gah! Sorry. Yes. nir_var_shader_in nir_var_shader_out nir_var_shader_temp (formerly global/private) nir_var_local_temp (formerly local/function) nir_var_uniform nir_var_system_value nir_var_mem_ubo (added mem) nir_var_mem_ssbo (added mem) nir_var_mem_shared (added mem) nir_var_mem_global (the new global memory type being introduced) --Ken 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
Re: [Mesa-dev] [PATCH v3] anv/device: fix maximum number of images supported
On Fri, Jan 11, 2019 at 9:13 AM Iago Toral Quiroga wrote: > We had defined MAX_IMAGES as 8, which we used to size the array for > image push constant data. The comment there stated that this was for > gen8, but anv_nir_apply_pipeline_layout runs for all gens and writes > that array, asserting that we don't exceed that number of images, > which imposes a limit of MAX_IMAGES on all gens. > > Furthermore, despite this, we are exposing up to 64 images per shader > stage on all gens, gen8 included. > > This patch lowers the number of images we expose in gen8 to 8 and > keeps 64 images for gen9+. It also sets MAX_IMAGES to 64 so we can > actually use up to 64 images in shaders, and then adds an assert > specific to gen8 to check that we never exceed 8. > > v2: > - <= instead of < in the assert (Eric, Lionel) > - Change the way the assertion is written (Eric) > > v3: > - Revert the way the assertion is written to the for it had in v1, >the version in v2 was not equivalent and was incorrect. (Lionel) > --- > src/intel/vulkan/anv_device.c| 7 +-- > src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 +++- > src/intel/vulkan/anv_private.h | 4 ++-- > 3 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c > index 523f1483e2..f85458b672 100644 > --- a/src/intel/vulkan/anv_device.c > +++ b/src/intel/vulkan/anv_device.c > @@ -987,9 +987,12 @@ void anv_GetPhysicalDeviceProperties( > const uint32_t max_samplers = (devinfo->gen >= 8 || > devinfo->is_haswell) ? > 128 : 16; > > + const uint32_t max_images = devinfo->gen < 9 ? MAX_GEN8_IMAGES : > MAX_IMAGES; > + > VkSampleCountFlags sample_counts = >isl_device_get_sample_counts(&pdevice->isl_dev); > > + > VkPhysicalDeviceLimits limits = { >.maxImageDimension1D = (1 << 14), >.maxImageDimension2D = (1 << 14), > @@ -1009,7 +1012,7 @@ void anv_GetPhysicalDeviceProperties( >.maxPerStageDescriptorUniformBuffers = 64, >.maxPerStageDescriptorStorageBuffers = 64, >.maxPerStageDescriptorSampledImages = max_samplers, > - .maxPerStageDescriptorStorageImages = 64, > + .maxPerStageDescriptorStorageImages = max_images, >.maxPerStageDescriptorInputAttachments= 64, >.maxPerStageResources = 250, >.maxDescriptorSetSamplers = 6 * max_samplers, /* > number of stages * maxPerStageDescriptorSamplers */ > @@ -1018,7 +1021,7 @@ void anv_GetPhysicalDeviceProperties( >.maxDescriptorSetStorageBuffers = 6 * 64, /* > number of stages * maxPerStageDescriptorStorageBuffers */ >.maxDescriptorSetStorageBuffersDynamic= MAX_DYNAMIC_BUFFERS / 2, >.maxDescriptorSetSampledImages= 6 * max_samplers, /* > number of stages * maxPerStageDescriptorSampledImages */ > - .maxDescriptorSetStorageImages= 6 * 64, /* > number of stages * maxPerStageDescriptorStorageImages */ > + .maxDescriptorSetStorageImages= 6 * max_images, /* > number of stages * maxPerStageDescriptorStorageImages */ >.maxDescriptorSetInputAttachments = 256, >.maxVertexInputAttributes = MAX_VBS, >.maxVertexInputBindings = MAX_VBS, > diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > index b3daf702bc..ae5c19578c 100644 > --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c > @@ -529,7 +529,9 @@ anv_nir_apply_pipeline_layout(const struct > anv_physical_device *pdevice, > } > > if (map->image_count > 0) { > - assert(map->image_count <= MAX_IMAGES); > + assert(map->image_count <= MAX_IMAGES && > + (pdevice->compiler->devinfo->gen > 8 || > + map->image_count <= MAX_GEN8_IMAGES)); >assert(shader->num_uniforms == prog_data->nr_params * 4); >state.first_image_uniform = shader->num_uniforms; >uint32_t *param = brw_stage_prog_data_add_params(prog_data, > diff --git a/src/intel/vulkan/anv_private.h > b/src/intel/vulkan/anv_private.h > index 770254e93e..9ddd41b1fa 100644 > --- a/src/intel/vulkan/anv_private.h > +++ b/src/intel/vulkan/anv_private.h > @@ -157,7 +157,8 @@ struct gen_l3_config; > #define MAX_SCISSORS16 > #define MAX_PUSH_CONSTANTS_SIZE 128 > #define MAX_DYNAMIC_BUFFERS 16 > -#define MAX_IMAGES 8 > +#define MAX_IMAGES 64 > +#define MAX_GEN8_IMAGES 8 > #define MAX_PUSH_DESCRIPTORS 32 /* Minimum requirement */ > > /* The kernel relocation API has a limitation of a 32-bit delta value > @@ -1882,7 +1883,6 @@ struct anv_push_constants { > /* Used for vkCmdDispatchBase */ > uint32_t base_work_group_id[3]; > > - /* Image data fo
[Mesa-dev] [Bug 106595] [RADV] Rendering distortions only when MSAA is enabled
https://bugs.freedesktop.org/show_bug.cgi?id=106595 --- Comment #24 from Rhys Perry --- I seem to be able to reproduce the problem (alpha-tested geometry not visible) but only when Multi-sample Alpha-Test is enabled and WineD3D is used. After disabling Multi-sample Alpha-Test or using DXVK, alpha-tested geometry seems to render perfectly. Are you sure you're using DXVK? If so, are you able to reproduce the problem in the character creation screen (which is what I've been looking at)? Perhaps it only occurs in some areas (such as the one you've been taking screenshots of). -- You are receiving this mail because: You are the QA Contact for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Fri, Jan 11, 2019 at 11:11 AM Kenneth Graunke wrote: > On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: > > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote: > > > Those names (nir_var_func_local, nir_var_thread_local, and > > > nir_var_thread_global) make more sense to me than private/function. > > > > > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, > > > indicating that they're just temporary variables, and not anything > > > with special semantics like memory. shader_temp would pair well with > > > the existing shader_in/shader_out, since they have the same scope. > > > > > > I might also consider adding 'mem' to variables representing memory. > > > > > > So that would look like... > > > > > >nir_var_shader_in > > >nir_var_shader_out > > >nir_var_shader_temp (formerly local/function) > > >nir_var_local_temp (formerly global/private) > > > > > > > Are those flipped? > > Gah! Sorry. Yes. > >nir_var_shader_in >nir_var_shader_out >nir_var_shader_temp (formerly global/private) >nir_var_local_temp (formerly local/function) >nir_var_uniform >nir_var_system_value >nir_var_mem_ubo (added mem) >nir_var_mem_ssbo (added mem) >nir_var_mem_shared (added mem) >nir_var_mem_global (the new global memory type being introduced) > I can work with that. I do think I'd mildly prefer function_temp over local_temp but I think the adding of _temp is an improvement. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Thoughts after hitting 100 merge requests?
My small thoughts/questions: - First of all discussions are really much more convenient. - Several (mine) merge requests were "Closed" and merged (not just merged, they are under "Closed" category), am I missing something? - Is there a way to grant rights to creator of merge request to add/change tags if he doesn't have "Developer" role? - Maybe adding more tags/more granular tags would be a good idea. - Could Intel CI be integrated in some way with gitlab? Overall as someone who didn't interact with mailing lists workflow much Gitlab is definitely a win. On 1/11/19 6:57 PM, Jason Ekstrand wrote: All, The mesa project has now hit 100 merge requests (36 are still open). I (and I'm sure others) would be curious to hear people's initial thoughts on the process. What's working well? What's not working? Is it total fail and should we go back to mailing lists? --Jason ___ 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
Re: [Mesa-dev] Please bring back __GL_FSAA_MODE
On Fri, 11 Jan 2019 at 13:05, Tom Butler wrote: > In particular I'm looking to get FSAA working in older games via wine, mostly > they don't support antialiasing which is a shame because there's plenty of > GPU power going to waste which could be fixing the jaggles. On nvidia > __GL_FSAA_MODE works as intended provided you set wine's > OffScreenRenderingMode to "backbuffer" which slightly impacts performance but > doesn't matter for older games. I'd love to see the functionality return for > AMD GPUs. > I don't have a particularly strong opinion on the Mesa environment variable, but on the Wine side, the "SampleCount" registry setting [1] is probably what you're looking for. Henri [1] https://wiki.winehq.org/Useful_Registry_Keys ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Thoughts after hitting 100 merge requests?
Quoting Jason Ekstrand (2019-01-11 09:05:21) > I'm putting my own thoughts in a reply for some reason. Here's what I've > seen. > > 1. I really like GitLab "discussions". It provides a very good way for both > the author and the reviewers to keep track of what review comments have been > dealt with and what comments are still outstanding. > > 2. GitLab is currently missing a good way to comment on commit messages which > makes giving review tags rather painful. There is a GitLab issue opened about > this: https://gitlab.com/gitlab-org/gitlab-ce/issues/38602 > > 3. GitLab has a bug regarding per-commit comments where they tend to get lost > while you're looking at the commit itself: https://gitlab.com/gitlab-org/ > gitlab-ce/issues/53175 > > 4. At least two of those merge requests were small bug fixes by brand new > contributors who I've never seen on the mailing list. > > 5. There's no way with gitlab for Reviewed-by tags to get automatically > applied as part of the merging process. This makes merging a bit more manual > than it needs to be but is really no worse than it was before. > > Ok, there you have my thoughts. I'd be happy to hear others. > > --Jason > > On Fri, Jan 11, 2019 at 10:57 AM Jason Ekstrand wrote: > > All, > > The mesa project has now hit 100 merge requests (36 are still open). I > (and I'm sure others) would be curious to hear people's initial thoughts > on > the process. What's working well? What's not working? Is it total fail > and should we go back to mailing lists? > > --Jason > Your assessment matches pretty closely with mine. Dylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
Jason Ekstrand writes: > On Fri, Jan 11, 2019 at 11:11 AM Kenneth Graunke > wrote: > >> On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: >> > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote: >> > > Those names (nir_var_func_local, nir_var_thread_local, and >> > > nir_var_thread_global) make more sense to me than private/function. >> > > >> > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, >> > > indicating that they're just temporary variables, and not anything >> > > with special semantics like memory. shader_temp would pair well with >> > > the existing shader_in/shader_out, since they have the same scope. >> > > >> > > I might also consider adding 'mem' to variables representing memory. >> > > >> > > So that would look like... >> > > >> > >nir_var_shader_in >> > >nir_var_shader_out >> > >nir_var_shader_temp (formerly local/function) >> > >nir_var_local_temp (formerly global/private) >> > > >> > >> > Are those flipped? >> >> Gah! Sorry. Yes. >> >>nir_var_shader_in >>nir_var_shader_out >>nir_var_shader_temp (formerly global/private) >>nir_var_local_temp (formerly local/function) >>nir_var_uniform >>nir_var_system_value >>nir_var_mem_ubo (added mem) >>nir_var_mem_ssbo (added mem) >>nir_var_mem_shared (added mem) >>nir_var_mem_global (the new global memory type being introduced) >> > > I can work with that. I do think I'd mildly prefer function_temp over > local_temp but I think the adding of _temp is an improvement. I like the _temp suggestion a lot! And I think I'm also mildly in favor of function_temp. (Also, thanks to taking naming seriously, to everyone involved here. It's hard.) signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Thoughts after hitting 100 merge requests?
On Fri, Jan 11, 2019 at 11:23 AM Danylo Piliaiev wrote: > My small thoughts/questions: > > - First of all discussions are really much more convenient. > - Several (mine) merge requests were "Closed" and merged (not just merged, > they are under "Closed" category), am I missing something? > It depends on how it's merged. My preference (and I would recommend this to others) is to have the submitter check the "Allow commits from members who can merge to the target branch." check box and then use the web UI to rebase and merge. Then the merge request shows up under "merged" instead of "closed". What some other people have taken to doing is to just push the changes to master and then close the MR. It also works but I think it's probably more confusing to submitters. > - Is there a way to grant rights to creator of merge request to add/change > tags if he doesn't have "Developer" role? > I'm not sure. > - Maybe adding more tags/more granular tags would be a good idea. > - Could Intel CI be integrated in some way with gitlab? > > Overall as someone who didn't interact with mailing lists workflow much > Gitlab is definitely a win. > > On 1/11/19 6:57 PM, Jason Ekstrand wrote: > > All, > > The mesa project has now hit 100 merge requests (36 are still open). I > (and I'm sure others) would be curious to hear people's initial thoughts on > the process. What's working well? What's not working? Is it total fail > and should we go back to mailing lists? > > --Jason > > > > ___ > mesa-dev mailing > listmesa-dev@lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/mesa-dev > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Thoughts after hitting 100 merge requests?
I haven't played with merge requests yet, except for reviewing some small RADV patches from Bas. From my point of view, the main problem now is that we have to look both at the mailing list and at the merge requests page and that's quite annoying. I don't think it's really a win to have two different workflows for the same project. I think I would still prefer the mailing list approach because it looks faster than open a browser, click, click and re-click (all my emails are well sorted in Thunderbird). On 1/11/19 5:57 PM, Jason Ekstrand wrote: All, The mesa project has now hit 100 merge requests (36 are still open). I (and I'm sure others) would be curious to hear people's initial thoughts on the process. What's working well? What's not working? Is it total fail and should we go back to mailing lists? --Jason ___ 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
Re: [Mesa-dev] Thoughts after hitting 100 merge requests?
On Fri, Jan 11, 2019 at 10:57:16AM -0600, Jason Ekstrand wrote: > All, > > The mesa project has now hit 100 merge requests (36 are still open). I > (and I'm sure others) would be curious to hear people's initial thoughts on > the process. What's working well? What's not working? Is it total fail > and should we go back to mailing lists? Here are my findings after interacting with it for a few patches (both in Mesa and other repositories) + It is way easier to keep track of patches that are still open/being-reviewed. + Labels on the MRs work well to filter out patches. + Because MRs git references are published in the repo, it is easy to "checkout" a MR. - Reviewing patch series with lots of patches is very inconvenient: - Can't make comments on individual patches. Which forces us to view all the changes together. Which then makes UI hide some files that are too big (you need to manually expand). Upstream issue https://gitlab.com/gitlab-org/gitlab-ce/issues/53175. - Can't make comments on the commit message. Upstream issue https://gitlab.com/gitlab-org/gitlab-ce/issues/38602. - Having to send the "Hey, here's a new MR" email to the mailing list for a small patch made me just go ahead and send the patch directly to the list instead. Making those announcements automatic would be very helpful. - To find the discussion associated with a commit in master, I'd search the title in the mailing list archives. With MRs, the usual way that this connection is made would be the reference to the MR as part of the merge commit message, but in Mesa we don't currently use merge commits. I've tried to search for commit titles in MR interface but it doesn't find them. Thanks, Caio ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Fri, Jan 11, 2019 at 9:11 AM Kenneth Graunke wrote: > > On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: > > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote: > > > Those names (nir_var_func_local, nir_var_thread_local, and > > > nir_var_thread_global) make more sense to me than private/function. > > > > > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, > > > indicating that they're just temporary variables, and not anything > > > with special semantics like memory. shader_temp would pair well with > > > the existing shader_in/shader_out, since they have the same scope. > > > > > > I might also consider adding 'mem' to variables representing memory. > > > > > > So that would look like... > > > > > >nir_var_shader_in > > >nir_var_shader_out > > >nir_var_shader_temp (formerly local/function) > > >nir_var_local_temp (formerly global/private) > > > > > > > Are those flipped? > > Gah! Sorry. Yes. > >nir_var_shader_in >nir_var_shader_out >nir_var_shader_temp (formerly global/private) >nir_var_local_temp (formerly local/function) >nir_var_uniform >nir_var_system_value >nir_var_mem_ubo (added mem) >nir_var_mem_ssbo (added mem) >nir_var_mem_shared (added mem) >nir_var_mem_global (the new global memory type being introduced) That sounds good to me. Thanks for coming up with those names. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [MR] anv: Implement SSBOs bindings with GPU addresses in a descriptor BO
This merge request, which I've marked WIP, is trying to push ANV in a more modern direction. Whereas most other drivers have abandon binding tables in favour of descriptor buffers, we've been holding on to binding tables like our lives depended on it. This MR attempts to start moving us into the future. So far, I've done the following: 1. Add a BO to the side of each descriptor set (push descriptors don't work yet). 2. Moved the image param data into that BO. This means more pulling in compute shaders on gen8 and earlier but it means push space is no longer a constraint on the number of images we can have. 3. Switched SSBOs over to pushing a GPU address + size and using A64 messages in the shader to directly access the GPU address. This only works if we have softpin because I really didn't want to try put relocations in descriptor buffers. All in all, this whole thing makes me a bit uneasy. It's a major change to our binding model and what we've got now has been working well for quite a while. However, it is going to be needed in order to implement several extensions so we need to start moving that direction. The one thing that gives me some hope is that AMD and NVIDIA have been doing things more-or-less this way for quite some time and it's working well for them. Note: This MR depends on !70 (intel: Add support for split SEND instructions) which is why it's so many patches ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/6] anv/blorp: Refactor MSAA resolves into an exportable helper function
On Fri, Jan 11, 2019 at 2:19 AM Iago Toral wrote: > On Mon, 2019-01-07 at 09:39 -0600, Jason Ekstrand wrote: > > This function is modeled after the aux_op functions except that it > > has a > > lot more parameters because it deals with two images as well as > > source > > and destination regions. > > --- > > src/intel/vulkan/anv_blorp.c | 225 ++- > > -- > > src/intel/vulkan/anv_private.h | 14 ++ > > 2 files changed, 107 insertions(+), 132 deletions(-) > > > > diff --git a/src/intel/vulkan/anv_blorp.c > > b/src/intel/vulkan/anv_blorp.c > > index eee7a8c3b3c..2f8d502e289 100644 > > --- a/src/intel/vulkan/anv_blorp.c > > +++ b/src/intel/vulkan/anv_blorp.c > > @@ -1169,63 +1169,52 @@ enum subpass_stage { > > SUBPASS_STAGE_RESOLVE, > > }; > > > > -static void > > -resolve_surface(struct blorp_batch *batch, > > -struct blorp_surf *src_surf, > > -uint32_t src_level, uint32_t src_layer, > > -struct blorp_surf *dst_surf, > > -uint32_t dst_level, uint32_t dst_layer, > > -uint32_t src_x, uint32_t src_y, uint32_t dst_x, > > uint32_t dst_y, > > -uint32_t width, uint32_t height, > > -enum blorp_filter filter) > > -{ > > - blorp_blit(batch, > > - src_surf, src_level, src_layer, > > - ISL_FORMAT_UNSUPPORTED, ISL_SWIZZLE_IDENTITY, > > - dst_surf, dst_level, dst_layer, > > - ISL_FORMAT_UNSUPPORTED, ISL_SWIZZLE_IDENTITY, > > - src_x, src_y, src_x + width, src_y + height, > > - dst_x, dst_y, dst_x + width, dst_y + height, > > - filter, false, false); > > -} > > - > > -static void > > -resolve_image(struct anv_device *device, > > - struct blorp_batch *batch, > > - const struct anv_image *src_image, > > - VkImageLayout src_image_layout, > > - uint32_t src_level, uint32_t src_layer, > > - const struct anv_image *dst_image, > > - VkImageLayout dst_image_layout, > > - uint32_t dst_level, uint32_t dst_layer, > > - VkImageAspectFlags aspect_mask, > > - uint32_t src_x, uint32_t src_y, uint32_t dst_x, > > uint32_t dst_y, > > - uint32_t width, uint32_t height) > > +void > > +anv_image_msaa_resolve(struct anv_cmd_buffer *cmd_buffer, > > + const struct anv_image *src_image, > > + enum isl_aux_usage src_aux_usage, > > + uint32_t src_level, uint32_t src_base_layer, > > + const struct anv_image *dst_image, > > + enum isl_aux_usage dst_aux_usage, > > + uint32_t dst_level, uint32_t dst_base_layer, > > + VkImageAspectFlagBits aspect, > > + uint32_t src_x, uint32_t src_y, > > + uint32_t dst_x, uint32_t dst_y, > > + uint32_t width, uint32_t height, > > + uint32_t layer_count, > > + enum blorp_filter filter) > > { > > - struct anv_cmd_buffer *cmd_buffer = batch->driver_batch; > > + struct blorp_batch batch; > > + blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer, > > 0); > > > > assert(src_image->type == VK_IMAGE_TYPE_2D); > > assert(src_image->samples > 1); > > assert(dst_image->type == VK_IMAGE_TYPE_2D); > > assert(dst_image->samples == 1); > > assert(src_image->n_planes == dst_image->n_planes); > > + assert(!src_image->format->can_ycbcr); > > + assert(!dst_image->format->can_ycbcr); > > > > - uint32_t aspect_bit; > > - > > - anv_foreach_image_aspect_bit(aspect_bit, src_image, aspect_mask) > > { > > - struct blorp_surf src_surf, dst_surf; > > - get_blorp_surf_for_anv_image(device, src_image, 1UL << > > aspect_bit, > > - src_image_layout, > > ISL_AUX_USAGE_NONE, > > - &src_surf); > > - get_blorp_surf_for_anv_image(device, dst_image, 1UL << > > aspect_bit, > > - dst_image_layout, > > ISL_AUX_USAGE_NONE, > > - &dst_surf); > > - anv_cmd_buffer_mark_image_written(cmd_buffer, dst_image, > > -1UL << aspect_bit, > > -dst_surf.aux_usage, > > -dst_level, dst_layer, 1); > > - > > - enum blorp_filter filter; > > + struct blorp_surf src_surf, dst_surf; > > + get_blorp_surf_for_anv_image(cmd_buffer->device, src_image, > > aspect, > > +ANV_IMAGE_LAYOUT_EXPLICIT_AUX, > > +src_aux_usage, &src_surf); > > + if (src_aux_usage == ISL_AUX_USAGE_MCS) { > > + src_surf.clear_color_addr = anv_to_blorp_address( > > + anv_image_get_clear_c
Re: [Mesa-dev] [PATCH 6/6] anv: Implement VK_KHR_depth_stencil_resolve
On Fri, Jan 11, 2019 at 3:21 AM Iago Toral wrote: > On Mon, 2019-01-07 at 09:39 -0600, Jason Ekstrand wrote: > > --- > > src/intel/vulkan/anv_device.c | 28 ++ > > src/intel/vulkan/anv_extensions.py | 1 + > > src/intel/vulkan/anv_pass.c| 37 +++- > > src/intel/vulkan/anv_private.h | 3 + > > src/intel/vulkan/genX_cmd_buffer.c | 136 > > + > > 5 files changed, 204 insertions(+), 1 deletion(-) > > > > diff --git a/src/intel/vulkan/anv_device.c > > b/src/intel/vulkan/anv_device.c > > index 2a3919d2949..3761846bb7f 100644 > > --- a/src/intel/vulkan/anv_device.c > > +++ b/src/intel/vulkan/anv_device.c > > @@ -1138,6 +1138,34 @@ void anv_GetPhysicalDeviceProperties2( > > break; > >} > > > > + case > > VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KH > > R: { > > + VkPhysicalDeviceDepthStencilResolvePropertiesKHR *props = > > +(VkPhysicalDeviceDepthStencilResolvePropertiesKHR *)ext; > > + > > + /* We support all of the depth resolve modes */ > > + props->supportedDepthResolveModes = > > +VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR | > > +VK_RESOLVE_MODE_AVERAGE_BIT_KHR | > > +VK_RESOLVE_MODE_MIN_BIT_KHR | > > +VK_RESOLVE_MODE_MAX_BIT_KHR; > > + > > + /* Average doesn't make sense for stencil so we don't > > support that */ > > + props->supportedStencilResolveModes = > > +VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR; > > + if (pdevice->info.gen >= 8) { > > +/* The advanced stencil resolve modes currently require > > stencil > > + * sampling be supported by the hardware. > > + */ > > +props->supportedStencilResolveModes |= > > + VK_RESOLVE_MODE_MIN_BIT_KHR | > > + VK_RESOLVE_MODE_MAX_BIT_KHR; > > + } > > + > > + props->independentResolveNone = VK_TRUE; > > + props->independentResolve = VK_TRUE; > > + break; > > + } > > + > >case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR: > > { > > VkPhysicalDeviceDriverPropertiesKHR *driver_props = > > (VkPhysicalDeviceDriverPropertiesKHR *) ext; > > diff --git a/src/intel/vulkan/anv_extensions.py > > b/src/intel/vulkan/anv_extensions.py > > index 388845003aa..2ea4cab0e97 100644 > > --- a/src/intel/vulkan/anv_extensions.py > > +++ b/src/intel/vulkan/anv_extensions.py > > @@ -76,6 +76,7 @@ EXTENSIONS = [ > > Extension('VK_KHR_bind_memory2', 1, True), > > Extension('VK_KHR_create_renderpass2',1, True), > > Extension('VK_KHR_dedicated_allocation', 1, True), > > +Extension('VK_KHR_depth_stencil_resolve', 1, True), > > Extension('VK_KHR_descriptor_update_template',1, True), > > Extension('VK_KHR_device_group', 1, True), > > Extension('VK_KHR_device_group_creation', 1, True), > > diff --git a/src/intel/vulkan/anv_pass.c > > b/src/intel/vulkan/anv_pass.c > > index 7b17cc06935..196cf3ff8fd 100644 > > --- a/src/intel/vulkan/anv_pass.c > > +++ b/src/intel/vulkan/anv_pass.c > > @@ -74,6 +74,10 @@ anv_render_pass_compile(struct anv_render_pass > > *pass) > >subpass->depth_stencil_attachment->attachment == > > VK_ATTACHMENT_UNUSED) > > subpass->depth_stencil_attachment = NULL; > > > > + if (subpass->ds_resolve_attachment && > > + subpass->ds_resolve_attachment->attachment == > > VK_ATTACHMENT_UNUSED) > > + subpass->ds_resolve_attachment = NULL; > > + > > This is a nitpick, but since we setup subpass->ds_resolve_attachment in > anv_CreateRenderPass2KHR(), should't we just do this sanitation there? > Maybe? It's an interesting philosophical question. The original idea behind the compile step was to make stuff like this unified between the two create paths. That said, this only happens in the CreateRenderPass2KHR path so should it go there? I don't know. I'm inclined to leave it as-is if that's ok. > >for (uint32_t j = 0; j < subpass->attachment_count; j++) { > > struct anv_subpass_attachment *subpass_att = &subpass- > > >attachments[j]; > > if (subpass_att->attachment == VK_ATTACHMENT_UNUSED) > > @@ -116,6 +120,16 @@ anv_render_pass_compile(struct anv_render_pass > > *pass) > > color_att->usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; > > } > >} > > + > > + if (subpass->ds_resolve_attachment) { > > + struct anv_subpass_attachment *ds_att = > > +subpass->depth_stencil_attachment; > > + UNUSED struct anv_subpass_attachment *resolve_att = > > +subpass->ds_resolve_attachment; > > + > > + assert(resolve_att->usage == > > VK_IMAGE_USAGE_TRANSFER_DST_BIT); > > + ds_att->usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; > > + } > > } > > > >
[Mesa-dev] [MR] util: Helper to create sets and hashes with pointer keys
Just a small convenience patch I had sitting here for a while. https://gitlab.freedesktop.org/mesa/mesa/merge_requests/104 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
Am So., 16. Dez. 2018 um 12:24 Uhr schrieb Gert Wollny : > > Since Meson will eventually be the only build system deprecate autotools > now. It can still be used by invoking configure with the flag > --enable-autotools > > Signed-off-by: Gert Wollny Reviewed-by: Christian Gmeiner > --- > IMO autotools should be properly deprecated prior it its removal, so here > is a patch to do just that. I think autotools should be marked as deprecated > for the 19.0 release and, depending on feedback, it could be removed with > 19.1. > Anyway, in the end it's up to the release team how to handle this. > > Best, > Gert > > configure.ac | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/configure.ac b/configure.ac > index 9b437a252c..73f5978bb7 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -52,6 +52,19 @@ mingw*) > ;; > esac > > +AC_ARG_ENABLE(autotools, > + [AS_HELP_STRING([--enable-autotools], > + [Enable the use of this autotools based build > configuration])], > + [enable_autotools=$enableval], [enable_autotools=no]) > + > +if test "x$enable_autotools" != "xyes" ; then > +AC_MSG_ERROR([the autotools build system has been deprecated in favour of > +meson and will be removed eventually. For instructions on how to use > meson > +see https://www.mesa3d.org/meson.html. > +If you still want to use the autotools build, then add --enable-autotools > +to the configure command line.]) > +fi > + > # Support silent build rules, requires at least automake-1.11. Disable > # by either passing --disable-silent-rules to configure or passing V=1 > # to make > -- > 2.19.2 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 77449] Tracker bug for all bugs related to Steam titles
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Kai changed: What|Removed |Added Depends on||109319 Referenced Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=109319 [Bug 109319] [radeonsi] Two Point Hospital: rendered in mostly black on an Oland XT GPU -- You are receiving this mail because: You are the assignee for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Friday, January 11, 2019 9:32:20 AM PST Eric Anholt wrote: > Jason Ekstrand writes: > > > On Fri, Jan 11, 2019 at 11:11 AM Kenneth Graunke > > wrote: > > > >> On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: > >> > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote: > >> > > Those names (nir_var_func_local, nir_var_thread_local, and > >> > > nir_var_thread_global) make more sense to me than private/function. > >> > > > >> > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, > >> > > indicating that they're just temporary variables, and not anything > >> > > with special semantics like memory. shader_temp would pair well with > >> > > the existing shader_in/shader_out, since they have the same scope. > >> > > > >> > > I might also consider adding 'mem' to variables representing memory. > >> > > > >> > > So that would look like... > >> > > > >> > >nir_var_shader_in > >> > >nir_var_shader_out > >> > >nir_var_shader_temp (formerly local/function) > >> > >nir_var_local_temp (formerly global/private) > >> > > > >> > > >> > Are those flipped? > >> > >> Gah! Sorry. Yes. > >> > >>nir_var_shader_in > >>nir_var_shader_out > >>nir_var_shader_temp (formerly global/private) > >>nir_var_local_temp (formerly local/function) > >>nir_var_uniform > >>nir_var_system_value > >>nir_var_mem_ubo (added mem) > >>nir_var_mem_ssbo (added mem) > >>nir_var_mem_shared (added mem) > >>nir_var_mem_global (the new global memory type being introduced) > >> > > > > I can work with that. I do think I'd mildly prefer function_temp over > > local_temp but I think the adding of _temp is an improvement. > > I like the _temp suggestion a lot! And I think I'm also mildly in favor > of function_temp. > > (Also, thanks to taking naming seriously, to everyone involved here. > It's hard.) Yep, it's not easy. Karol, sorry for being grumpy the other day, it wasn't a very constructive email on my part. I agree that the names should change, for all the reasons you suggested. I'm fine with nir_var_function_temp / nir_var_func_temp if people prefer that to local_temp. Closer to Karol's original suggestion, but I think "temp" clarifies it a bit. shader_in is an input in the shader, function_temp is a temp in a function. Sound good? Should I do the sed-job and send patches? --Ken 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
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Fri, Jan 11, 2019 at 1:50 PM Kenneth Graunke wrote: > On Friday, January 11, 2019 9:32:20 AM PST Eric Anholt wrote: > > Jason Ekstrand writes: > > > > > On Fri, Jan 11, 2019 at 11:11 AM Kenneth Graunke < > kenn...@whitecape.org> > > > wrote: > > > > > >> On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: > > >> > On Fri, Jan 11, 2019 at 10:19 AM Kenneth Graunke wrote: > > >> > > Those names (nir_var_func_local, nir_var_thread_local, and > > >> > > nir_var_thread_global) make more sense to me than > private/function. > > >> > > > > >> > > Another option is `nir_var_local_temp` and `nir_var_shader_temp`, > > >> > > indicating that they're just temporary variables, and not anything > > >> > > with special semantics like memory. shader_temp would pair well > with > > >> > > the existing shader_in/shader_out, since they have the same scope. > > >> > > > > >> > > I might also consider adding 'mem' to variables representing > memory. > > >> > > > > >> > > So that would look like... > > >> > > > > >> > >nir_var_shader_in > > >> > >nir_var_shader_out > > >> > >nir_var_shader_temp (formerly local/function) > > >> > >nir_var_local_temp (formerly global/private) > > >> > > > > >> > > > >> > Are those flipped? > > >> > > >> Gah! Sorry. Yes. > > >> > > >>nir_var_shader_in > > >>nir_var_shader_out > > >>nir_var_shader_temp (formerly global/private) > > >>nir_var_local_temp (formerly local/function) > > >>nir_var_uniform > > >>nir_var_system_value > > >>nir_var_mem_ubo (added mem) > > >>nir_var_mem_ssbo (added mem) > > >>nir_var_mem_shared (added mem) > > >>nir_var_mem_global (the new global memory type being introduced) > > >> > > > > > > I can work with that. I do think I'd mildly prefer function_temp over > > > local_temp but I think the adding of _temp is an improvement. > > > > I like the _temp suggestion a lot! And I think I'm also mildly in favor > > of function_temp. > > > > (Also, thanks to taking naming seriously, to everyone involved here. > > It's hard.) > > Yep, it's not easy. Karol, sorry for being grumpy the other day, it > wasn't a very constructive email on my part. I agree that the names > should change, for all the reasons you suggested. > > I'm fine with nir_var_function_temp / nir_var_func_temp if people > prefer that to local_temp. Closer to Karol's original suggestion, > but I think "temp" clarifies it a bit. shader_in is an input in the > shader, function_temp is a temp in a function. > > Sound good? Should I do the sed-job and send patches? > Go for it. Mind also renaming the variable lists? I don't care if it's one patch or two. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: > I think I kind of like having "mem" be on external things. Shared is a > little weird there because it never leaves the chip so is it mem or shader? On Intel GPUs, "shared" maps to a concept called "Shared Local Memory". So I tend to think of it as memory :) It's not perfect, though. While most shader_in/shader_out end up being thread-local, shader_out in a TCS is actually shared across threads (and pre-dates the shared keyword). I'm sort of inclined to leave that alone for now unless you think we ought to do something about it. > > We may also want to rename the nir->globals list, or > > nir_lower_global_vars_to_local and nir_opt_global_to_local. Not sure. > > > > Yes, whatever we do, we should make those lists more consistent. > 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
Re: [Mesa-dev] [PATCH 05/12] nir: rename global/local to private/function memory
On Fri, Jan 11, 2019 at 1:55 PM Kenneth Graunke wrote: > On Friday, January 11, 2019 8:33:41 AM PST Jason Ekstrand wrote: > > I think I kind of like having "mem" be on external things. Shared is a > > little weird there because it never leaves the chip so is it mem or > shader? > > On Intel GPUs, "shared" maps to a concept called "Shared Local Memory". > So I tend to think of it as memory :) > > It's not perfect, though. While most shader_in/shader_out end up being > thread-local, shader_out in a TCS is actually shared across threads (and > pre-dates the shared keyword). > > I'm sort of inclined to leave that alone for now unless you think we > ought to do something about it. > If by "leave it alone" you mean leave _mem on there, that's fine with me. It was more of a philosophical question than an actual request for any sort of change. > > > We may also want to rename the nir->globals list, or > > > nir_lower_global_vars_to_local and nir_opt_global_to_local. Not sure. > > > > > > > Yes, whatever we do, we should make those lists more consistent. > > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v3] etnaviv: fix resource usage tracking across different pipe_context's
From: Christian Gmeiner A pipe_resource can be shared by all the pipe_context's hanging off the same pipe_screen. Signed-off-by: Christian Gmeiner Signed-off-by: Marek Vasut To: mesa-dev@lists.freedesktop.org Cc: etna...@lists.freedesktop.org --- Changes from v1 -> v2: - to remove the resource from the used_resources set when it is destroyed Changes from v2 -> v3: - add locking with mtx_*() to resource and screen (Marek) --- src/gallium/drivers/etnaviv/etnaviv_context.c | 25 src/gallium/drivers/etnaviv/etnaviv_context.h | 3 - .../drivers/etnaviv/etnaviv_resource.c| 58 +++ .../drivers/etnaviv/etnaviv_resource.h| 9 +-- src/gallium/drivers/etnaviv/etnaviv_screen.c | 10 src/gallium/drivers/etnaviv/etnaviv_screen.h | 6 ++ 6 files changed, 82 insertions(+), 29 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c index 3038d21..abb2652 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.c +++ b/src/gallium/drivers/etnaviv/etnaviv_context.c @@ -36,6 +36,7 @@ #include "etnaviv_query.h" #include "etnaviv_query_hw.h" #include "etnaviv_rasterizer.h" +#include "etnaviv_resource.h" #include "etnaviv_screen.h" #include "etnaviv_shader.h" #include "etnaviv_state.h" @@ -329,7 +330,8 @@ static void etna_cmd_stream_reset_notify(struct etna_cmd_stream *stream, void *priv) { struct etna_context *ctx = priv; - struct etna_resource *rsc, *rsc_tmp; + struct etna_screen *screen = ctx->screen; + struct set_entry *entry; etna_set_state(stream, VIVS_GL_API_MODE, VIVS_GL_API_MODE_OPENGL); etna_set_state(stream, VIVS_GL_VERTEX_ELEMENT_CONFIG, 0x0001); @@ -384,16 +386,17 @@ etna_cmd_stream_reset_notify(struct etna_cmd_stream *stream, void *priv) ctx->dirty = ~0L; ctx->dirty_sampler_views = ~0L; - /* go through all the used resources and clear their status flag */ - LIST_FOR_EACH_ENTRY_SAFE(rsc, rsc_tmp, &ctx->used_resources, list) - { - debug_assert(rsc->status != 0); - rsc->status = 0; - rsc->pending_ctx = NULL; - list_delinit(&rsc->list); - } + /* go through all the used context resources and clear their status flag */ + mtx_lock(&screen->lock); + set_foreach(screen->used_resources, entry) { + struct etna_resource *rsc = (struct etna_resource *)entry->key; - assert(LIST_IS_EMPTY(&ctx->used_resources)); + mtx_lock(&rsc->lock); + _mesa_set_remove_key(rsc->pending_ctx, ctx); + _mesa_set_remove(screen->used_resources, entry); + mtx_unlock(&rsc->lock); + } + mtx_unlock(&screen->lock); } static void @@ -437,8 +440,6 @@ etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) /* need some sane default in case state tracker doesn't set some state: */ ctx->sample_mask = 0x; - list_inithead(&ctx->used_resources); - /* Set sensible defaults for state */ etna_cmd_stream_reset_notify(ctx->stream, ctx); diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.h b/src/gallium/drivers/etnaviv/etnaviv_context.h index 584caa7..eff0a23 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.h +++ b/src/gallium/drivers/etnaviv/etnaviv_context.h @@ -136,9 +136,6 @@ struct etna_context { uint32_t prim_hwsupport; struct primconvert_context *primconvert; - /* list of resources used by currently-unsubmitted renders */ - struct list_head used_resources; - struct slab_child_pool transfer_pool; struct blitter_context *blitter; diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index 3808c29..6b6d245 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -33,6 +33,7 @@ #include "etnaviv_screen.h" #include "etnaviv_translate.h" +#include "util/hash_table.h" #include "util/u_inlines.h" #include "util/u_memory.h" @@ -275,7 +276,6 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout, rsc->halign = halign; pipe_reference_init(&rsc->base.reference, 1); - list_inithead(&rsc->list); size = setup_miptree(rsc, paddingX, paddingY, msaa_xscale, msaa_yscale); @@ -296,6 +296,12 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout, memset(map, 0, size); } + mtx_init(&rsc->lock, mtx_recursive); + rsc->pending_ctx = _mesa_set_create(NULL, _mesa_hash_pointer, + _mesa_key_pointer_equal); + if (!rsc->pending_ctx) + goto free_rsc; + return &rsc->base; free_rsc: @@ -455,8 +461,17 @@ etna_resource_changed(struct pipe_screen *pscreen, struct pipe_resource *prsc) static void etna_resource_destroy(struct pipe_screen *pscreen, struct pipe_resource *prsc) { + struct etna_screen *screen = etna_screen(pscreen); struct etna_resource *rsc = etna_resource(prsc); + mtx_lock(&screen->lock); + mtx_lock(&rsc->lock); +
[Mesa-dev] [PATCH 2/3] spirv: Contain the GLSLang issue #179 workaround to old GLSLang
Instead of applying the workaround universally, detect semi-old GLSLang via the generator ID and only enable the workaround on old GLSLang. This isn't nearly as precise as one would like it to be because the first GLSLang generator id version bump was on October 7, 2017 which is about 1.5 years after the bug was fixed. However, it at least lets us disable it for non-GLSLang and for more modern versions. --- src/compiler/spirv/spirv_to_nir.c | 9 ++ src/compiler/spirv/vtn_private.h | 3 ++ src/compiler/spirv/vtn_variables.c | 44 ++ 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index e3dc619c6f7..76a997ee341 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -4316,6 +4316,15 @@ vtn_create_builder(const uint32_t *words, size_t word_count, goto fail; } + uint16_t generator_id = words[2] >> 16; + uint16_t generator_version = words[2]; + + /* The first GLSLang version bump actually 1.5 years after #179 was fixed +* but this should at least let us shut the workaround off for modern +* versions of GLSLang. +*/ + b->wa_glslang_179 = (generator_id == 8 && generator_version == 1); + /* words[2] == generator magic */ unsigned value_id_bound = words[3]; if (words[4] != 0) { diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index a54cb8c6495..09ae8b7145c 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -586,6 +586,9 @@ struct vtn_builder { unsigned value_id_bound; struct vtn_value *values; + /* True if we should watch out for GLSLang issue #179 */ + bool wa_glslang_179; + gl_shader_stage entry_point_stage; const char *entry_point_name; struct vtn_value *entry_point; diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 6036295e61c..6106ff35591 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -544,9 +544,11 @@ repair_atomic_type(const struct glsl_type *type) nir_deref_instr * vtn_pointer_to_deref(struct vtn_builder *b, struct vtn_pointer *ptr) { - /* Do on-the-fly copy propagation for samplers. */ - if (ptr->var && ptr->var->copy_prop_sampler) - return vtn_pointer_to_deref(b, ptr->var->copy_prop_sampler); + if (b->wa_glslang_179) { + /* Do on-the-fly copy propagation for samplers. */ + if (ptr->var && ptr->var->copy_prop_sampler) + return vtn_pointer_to_deref(b, ptr->var->copy_prop_sampler); + } vtn_assert(!vtn_pointer_uses_ssa_offset(b, ptr)); if (!ptr->deref) { @@ -1800,16 +1802,18 @@ vtn_pointer_from_ssa(struct vtn_builder *b, nir_ssa_def *ssa, ptr->type = ptr_type->deref; ptr->ptr_type = ptr_type; - /* To work around https://github.com/KhronosGroup/glslang/issues/179 we -* need to whack the mode because it creates a function parameter with the -* Function storage class even though it's a pointer to a sampler. If we -* don't do this, then NIR won't get rid of the deref_cast for us. -*/ - if (ptr->mode == vtn_variable_mode_function && - (ptr->type->base_type == vtn_base_type_sampler || -ptr->type->base_type == vtn_base_type_sampled_image)) { - ptr->mode = vtn_variable_mode_uniform; - nir_mode = nir_var_uniform; + if (b->wa_glslang_179) { + /* To work around https://github.com/KhronosGroup/glslang/issues/179 we + * need to whack the mode because it creates a function parameter with + * the Function storage class even though it's a pointer to a sampler. + * If we don't do this, then NIR won't get rid of the deref_cast for us. + */ + if (ptr->mode == vtn_variable_mode_function && + (ptr->type->base_type == vtn_base_type_sampler || + ptr->type->base_type == vtn_base_type_sampled_image)) { + ptr->mode = vtn_variable_mode_uniform; + nir_mode = nir_var_uniform; + } } if (vtn_pointer_uses_ssa_offset(b, ptr)) { @@ -2266,11 +2270,15 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, vtn_assert_types_equal(b, opcode, dest_val->type->deref, src_val->type); if (glsl_type_is_sampler(dest->type->type)) { - vtn_warn("OpStore of a sampler detected. Doing on-the-fly copy " - "propagation to workaround the problem."); - vtn_assert(dest->var->copy_prop_sampler == NULL); - dest->var->copy_prop_sampler = -vtn_value(b, w[2], vtn_value_type_pointer)->pointer; + if (b->wa_glslang_179) { +vtn_warn("OpStore of a sampler detected. Doing on-the-fly copy " + "propagation to workaround the problem."); +vtn_assert(dest->var->copy_prop_sampler == NULL); +dest->var->copy_prop_sampler = + vtn_value(b, w[2], vtn_value_type_pointer
[Mesa-dev] [PATCH 3/3] intel/nir: Call nir_opt_deref in brw_nir_optimize
It's an optimization so we should probably be calling it in the optimization loop. --- src/intel/compiler/brw_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 749c00ebcc6..92d7fe4bede 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -544,6 +544,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler, progress = false; OPT(nir_split_array_vars, nir_var_function); OPT(nir_shrink_vec_array_vars, nir_var_function); + OPT(nir_opt_deref); OPT(nir_lower_vars_to_ssa); if (allow_copies) { /* Only run this pass in the first call to brw_nir_optimize. Later -- 2.20.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/3] spirv: Whack sampler/image pointers to uniform
A long time in a galaxy far far away, there was a GLSLang bug with how it handled samplers passed in as function parameters. (The bug can be found here: https://github.com/KhronosGroup/glslang/issues/179.) Unfortunately, that version was shipped in several apps and has been causing heartburn for our SPIR-V parser ever since. Recent changes to NIR uncovered a moderately old bug in how we work around this issue. In particular, we ended up with a deref_cast from uniform to local which is not a no-op cast so nir_opt_deref wasn't getting rid of the cast. The only reason why it worked before was because someone just happened to call nir_fixup_deref_modes which "fixed" the cast (that shouldn't be happening) and then a later round of copy-prop would get rid of it. The fact that the deref_cast survived that long without causing trouble for other parts of NIR is a bit surprising. Just whacking the mode of the pointer seems to fix it fairly unobtrusively. Currently, only apps with this bug will have a local variable containing an image or sampler. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109304 --- src/compiler/spirv/vtn_variables.c | 12 1 file changed, 12 insertions(+) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 50cd1b42c69..6036295e61c 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1800,6 +1800,18 @@ vtn_pointer_from_ssa(struct vtn_builder *b, nir_ssa_def *ssa, ptr->type = ptr_type->deref; ptr->ptr_type = ptr_type; + /* To work around https://github.com/KhronosGroup/glslang/issues/179 we +* need to whack the mode because it creates a function parameter with the +* Function storage class even though it's a pointer to a sampler. If we +* don't do this, then NIR won't get rid of the deref_cast for us. +*/ + if (ptr->mode == vtn_variable_mode_function && + (ptr->type->base_type == vtn_base_type_sampler || +ptr->type->base_type == vtn_base_type_sampled_image)) { + ptr->mode = vtn_variable_mode_uniform; + nir_mode = nir_var_uniform; + } + if (vtn_pointer_uses_ssa_offset(b, ptr)) { /* This pointer type needs to have actual storage */ vtn_assert(ptr_type->type); -- 2.20.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 105371] r600_shader_from_tgsi - GPR limit exceeded - shader requires 360 registers
https://bugs.freedesktop.org/show_bug.cgi?id=105371 --- Comment #19 from amonpaike --- is not there anyone who can give a view to what happens in what I reported in the previous comment? are these GPUs really old enough to be abandoned? on windows blender on these gpu runs that is a beauty ... it's a pity that on linux they stay so far back ... both in performance and in graphic rendering ... the intel gpu on the same pc much lower has better performance and graphics performance with the mesa drivers intel .. I'm forced to use windows for this unique reason... :((( -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
Gert Wollny writes: > Since Meson will eventually be the only build system deprecate autotools > now. It can still be used by invoking configure with the flag > --enable-autotools > > Signed-off-by: Gert Wollny Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 105371] r600_shader_from_tgsi - GPR limit exceeded - shader requires 360 registers
https://bugs.freedesktop.org/show_bug.cgi?id=105371 --- Comment #20 from mirh --- A couple of devs are working into reinventing the wheel so that you could basically have r600 cards work and be supported almost like they had been released in 2018 (well, sans vulkan) And you have been already provided with an explanation of why this is kinda difficult to debug, and with a workaround. So please, just wait. -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
From: Gert Wollny Since Meson will eventually be the only build system deprecate autotools now. It can still be used by invoking configure with the flag --enable-autotools NAKed-by: Ilia Mirkin Acked-by: Eric Engestrom Acked-by: Kenneth Graunke Acked-by: Lionel Landwerlin Acked-by: Jason Ekstrand Acked-by: Rob Clark Acked-by: Marek Olšák Reviewed-by: Christian Gmeiner Reviewed-by: Matt Turner Reviewed-by: Eric Anholt Signed-off-by: Gert Wollny --- I think there's support for overriding the sole objection to this patch. To confirm: (1) The plan is to remove Autotools, perhaps after the 19.0 release (2) This patch's purpose is to ensure that everyone knows that Autotools will be going away (think: people who build Mesa as part of an automated process and wouldn't notice a deprecation warning unless it requires some action from them) (3) We expect all reasonable concerns about Meson to be resolved before Autotools is removed (e.g., reconfiguration problems, retrieving configuration command line, configuration status output, etc.) configure.ac | 13 + 1 file changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index e4d20054d5f..c7473d77eff 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,19 @@ mingw*) ;; esac +AC_ARG_ENABLE(autotools, + [AS_HELP_STRING([--enable-autotools], + [Enable the use of this autotools based build configuration])], + [enable_autotools=$enableval], [enable_autotools=no]) + +if test "x$enable_autotools" != "xyes" ; then +AC_MSG_ERROR([the autotools build system has been deprecated in favour of +meson and will be removed eventually. For instructions on how to use meson +see https://www.mesa3d.org/meson.html. +If you still want to use the autotools build, then add --enable-autotools +to the configure command line.]) +fi + # Support silent build rules, requires at least automake-1.11. Disable # by either passing --disable-silent-rules to configure or passing V=1 # to make -- 2.19.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
On Fri, Jan 11, 2019 at 4:11 PM Matt Turner wrote: > From: Gert Wollny > > Since Meson will eventually be the only build system deprecate autotools > now. It can still be used by invoking configure with the flag > --enable-autotools > > NAKed-by: Ilia Mirkin > Acked-by: Eric Engestrom > Acked-by: Kenneth Graunke > Acked-by: Lionel Landwerlin > Acked-by: Jason Ekstrand > Acked-by: Rob Clark > Acked-by: Marek Olšák > Reviewed-by: Christian Gmeiner > Reviewed-by: Matt Turner > Reviewed-by: Eric Anholt > Signed-off-by: Gert Wollny > --- > I think there's support for overriding the sole objection to this patch. > > To confirm: > > (1) The plan is to remove Autotools, perhaps after the 19.0 release > > (2) This patch's purpose is to ensure that everyone knows that > Autotools will be going away (think: people who build Mesa as > part of an automated process and wouldn't notice a deprecation > warning unless it requires some action from them) > > (3) We expect all reasonable concerns about Meson to be resolved > before Autotools is removed (e.g., reconfiguration problems, > retrieving configuration command line, configuration status > output, etc.) > Do we have a tracker bug for these yet? It'd be good to have one if we don't already so that we can keep track of the reasonable blocking issues. --Jason > > configure.ac | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/configure.ac b/configure.ac > index e4d20054d5f..c7473d77eff 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -52,6 +52,19 @@ mingw*) > ;; > esac > > +AC_ARG_ENABLE(autotools, > + [AS_HELP_STRING([--enable-autotools], > + [Enable the use of this autotools based build > configuration])], > + [enable_autotools=$enableval], [enable_autotools=no]) > + > +if test "x$enable_autotools" != "xyes" ; then > +AC_MSG_ERROR([the autotools build system has been deprecated in > favour of > +meson and will be removed eventually. For instructions on how to use > meson > +see https://www.mesa3d.org/meson.html. > +If you still want to use the autotools build, then add > --enable-autotools > +to the configure command line.]) > +fi > + > # Support silent build rules, requires at least automake-1.11. Disable > # by either passing --disable-silent-rules to configure or passing V=1 > # to make > -- > 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
[Mesa-dev] [Bug 109323] [TRACKER] mesa: Remove autotools
https://bugs.freedesktop.org/show_bug.cgi?id=109323 Bug ID: 109323 Summary: [TRACKER] mesa: Remove autotools Product: Mesa Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Other Assignee: mesa-dev@lists.freedesktop.org Reporter: matts...@gmail.com QA Contact: mesa-dev@lists.freedesktop.org We plan to remove autotools in favor of the Meson build system (https://mesonbuild.com/). This bug will be used as a tracker for issues blocking the removal of autotools. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 109323] [TRACKER] mesa: Remove autotools
https://bugs.freedesktop.org/show_bug.cgi?id=109323 Matt Turner changed: What|Removed |Added Alias||autotools-removal -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
On Fri, Jan 11, 2019 at 2:17 PM Jason Ekstrand wrote: > > On Fri, Jan 11, 2019 at 4:11 PM Matt Turner wrote: >> >> From: Gert Wollny >> >> Since Meson will eventually be the only build system deprecate autotools >> now. It can still be used by invoking configure with the flag >> --enable-autotools >> >> NAKed-by: Ilia Mirkin >> Acked-by: Eric Engestrom >> Acked-by: Kenneth Graunke >> Acked-by: Lionel Landwerlin >> Acked-by: Jason Ekstrand >> Acked-by: Rob Clark >> Acked-by: Marek Olšák >> Reviewed-by: Christian Gmeiner >> Reviewed-by: Matt Turner >> Reviewed-by: Eric Anholt >> Signed-off-by: Gert Wollny >> --- >> I think there's support for overriding the sole objection to this patch. >> >> To confirm: >> >> (1) The plan is to remove Autotools, perhaps after the 19.0 release >> >> (2) This patch's purpose is to ensure that everyone knows that >> Autotools will be going away (think: people who build Mesa as >> part of an automated process and wouldn't notice a deprecation >> warning unless it requires some action from them) >> >> (3) We expect all reasonable concerns about Meson to be resolved >> before Autotools is removed (e.g., reconfiguration problems, >> retrieving configuration command line, configuration status >> output, etc.) > > > Do we have a tracker bug for these yet? It'd be good to have one if we don't > already so that we can keep track of the reasonable blocking issues. We did not, but that's a good idea. I've created a tracker bug: https://bugs.freedesktop.org/show_bug.cgi?id=109323 and will file blocking issues for the three things I mentioned above. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 109323] [TRACKER] mesa: Remove autotools
https://bugs.freedesktop.org/show_bug.cgi?id=109323 Matt Turner changed: What|Removed |Added Depends on||109324 Referenced Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=109324 [Bug 109324] mesa: Need ability to reconfigure on upgrade of Meson -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 109324] mesa: Need ability to reconfigure on upgrade of Meson
https://bugs.freedesktop.org/show_bug.cgi?id=109324 Bug ID: 109324 Summary: mesa: Need ability to reconfigure on upgrade of Meson Product: Mesa Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Other Assignee: baker.dyla...@gmail.com Reporter: matts...@gmail.com QA Contact: mesa-dev@lists.freedesktop.org Blocks: 109323 Currently Meson fails to reconfigure if it is upgraded. This is not good. Dylan is working on this with the upstream Meson project. Referenced Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=109323 [Bug 109323] [TRACKER] mesa: Remove autotools -- You are receiving this mail because: You are the QA Contact for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
On Fri, Jan 11, 2019 at 5:12 PM Matt Turner wrote: > > From: Gert Wollny > > Since Meson will eventually be the only build system deprecate autotools > now. It can still be used by invoking configure with the flag > --enable-autotools > > NAKed-by: Ilia Mirkin [nouveau] > Acked-by: Eric Engestrom > Acked-by: Kenneth Graunke > Acked-by: Lionel Landwerlin > Acked-by: Jason Ekstrand > Reviewed-by: Matt Turner [intel] > Acked-by: Rob Clark [freedreno] > Acked-by: Marek Olšák [radeon] > Reviewed-by: Christian Gmeiner [etnaviv] > Reviewed-by: Eric Anholt [vc4] > Signed-off-by: Gert Wollny [sorry Gert, not sure how to classify you] I think the vmware team (which largely maintains llvmpipe and svga) is probably worth hearing from -- I believe they've largely stayed out of it. But an ack/nack would be good. Also virgl isn't represented, I believe. Probably not *required* to hear from these, but perhaps worth a poke? > --- > I think there's support for overriding the sole objection to this patch. > > To confirm: > > (1) The plan is to remove Autotools, perhaps after the 19.0 release > > (2) This patch's purpose is to ensure that everyone knows that > Autotools will be going away (think: people who build Mesa as > part of an automated process and wouldn't notice a deprecation > warning unless it requires some action from them) If it's being removed _after_ the 19.0 release, does it make sense to have a patch like this _in_ the 19.0 release? (Perhaps the answer is `yes', but I'd still like to ask the question.) > > (3) We expect all reasonable concerns about Meson to be resolved > before Autotools is removed (e.g., reconfiguration problems, > retrieving configuration command line, configuration status > output, etc.) > > configure.ac | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/configure.ac b/configure.ac > index e4d20054d5f..c7473d77eff 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -52,6 +52,19 @@ mingw*) > ;; > esac > > +AC_ARG_ENABLE(autotools, > + [AS_HELP_STRING([--enable-autotools], > + [Enable the use of this autotools based build > configuration])], > + [enable_autotools=$enableval], [enable_autotools=no]) > + > +if test "x$enable_autotools" != "xyes" ; then > +AC_MSG_ERROR([the autotools build system has been deprecated in favour of > +meson and will be removed eventually. For instructions on how to use > meson > +see https://www.mesa3d.org/meson.html. > +If you still want to use the autotools build, then add --enable-autotools > +to the configure command line.]) > +fi > + > # Support silent build rules, requires at least automake-1.11. Disable > # by either passing --disable-silent-rules to configure or passing V=1 > # to make > -- > 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
[Mesa-dev] [Bug 109323] [TRACKER] mesa: Remove autotools
https://bugs.freedesktop.org/show_bug.cgi?id=109323 Matt Turner changed: What|Removed |Added Depends on||109325 Referenced Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=109325 [Bug 109325] mesa: Need ability to retrieve command line of Meson configuration -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 109325] mesa: Need ability to retrieve command line of Meson configuration
https://bugs.freedesktop.org/show_bug.cgi?id=109325 Bug ID: 109325 Summary: mesa: Need ability to retrieve command line of Meson configuration Product: Mesa Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Other Assignee: baker.dyla...@gmail.com Reporter: matts...@gmail.com QA Contact: mesa-dev@lists.freedesktop.org Blocks: 109323 Similar to how the configuration command line is saved in autotools' config.log, there needs to be a way to retrieve this information from Meson. Dylan is working on this with the upstream Meson project and has plans for a stop-gap solution as well. Referenced Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=109323 [Bug 109323] [TRACKER] mesa: Remove autotools -- You are receiving this mail because: You are the QA Contact for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 109323] [TRACKER] mesa: Remove autotools
https://bugs.freedesktop.org/show_bug.cgi?id=109323 Matt Turner changed: What|Removed |Added Depends on||109326 Referenced Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=109326 [Bug 109326] mesa: Meson configuration summary should be printed -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 109326] mesa: Meson configuration summary should be printed
https://bugs.freedesktop.org/show_bug.cgi?id=109326 Bug ID: 109326 Summary: mesa: Meson configuration summary should be printed Product: Mesa Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Other Assignee: baker.dyla...@gmail.com Reporter: matts...@gmail.com QA Contact: mesa-dev@lists.freedesktop.org Blocks: 109323 Like autotools does, our Meson build system should print a summary of the build configuration. Dylan is working on this with the upstream Meson project. Referenced Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=109323 [Bug 109323] [TRACKER] mesa: Remove autotools -- You are receiving this mail because: You are the QA Contact for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 109323] [TRACKER] mesa: Remove autotools
https://bugs.freedesktop.org/show_bug.cgi?id=109323 Matt Turner changed: What|Removed |Added Alias|autotools-removal |mesa-autotools-removal -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
On Fri, Jan 11, 2019 at 2:28 PM Ilia Mirkin wrote: > > On Fri, Jan 11, 2019 at 5:12 PM Matt Turner wrote: > > > > From: Gert Wollny > > > > Since Meson will eventually be the only build system deprecate autotools > > now. It can still be used by invoking configure with the flag > > --enable-autotools > > > > NAKed-by: Ilia Mirkin > > [nouveau] > > > Acked-by: Eric Engestrom > > Acked-by: Kenneth Graunke > > Acked-by: Lionel Landwerlin > > Acked-by: Jason Ekstrand > > Reviewed-by: Matt Turner > > [intel] > > > Acked-by: Rob Clark > > [freedreno] > > > Acked-by: Marek Olšák > > [radeon] > > > Reviewed-by: Christian Gmeiner > > [etnaviv] > > > Reviewed-by: Eric Anholt > > [vc4] > > > Signed-off-by: Gert Wollny > > [sorry Gert, not sure how to classify you] > > I think the vmware team (which largely maintains llvmpipe and svga) is > probably worth hearing from -- I believe they've largely stayed out of > it. But an ack/nack would be good. Also virgl isn't represented, I > believe. Probably not *required* to hear from these, but perhaps worth > a poke? Sure. I've Cc'd Dave, Brian, José, and Roland on this reply. > > --- > > I think there's support for overriding the sole objection to this patch. > > > > To confirm: > > > > (1) The plan is to remove Autotools, perhaps after the 19.0 release > > > > (2) This patch's purpose is to ensure that everyone knows that > > Autotools will be going away (think: people who build Mesa as > > part of an automated process and wouldn't notice a deprecation > > warning unless it requires some action from them) > > If it's being removed _after_ the 19.0 release, does it make sense to > have a patch like this _in_ the 19.0 release? (Perhaps the answer is > `yes', but I'd still like to ask the question.) Yes, I think so -- I might be missing or misunderstanding a part of your question though. My thinking is in 19.0 mark autotools as deprecated with this patch so as to ensure everyone knows, and depending on progress on the blocking issues to aim for removal after the 19.0 branch point. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] autotools: Deprecate the use of autotools
On Fri, Jan 11, 2019 at 5:38 PM Matt Turner wrote: > > On Fri, Jan 11, 2019 at 2:28 PM Ilia Mirkin wrote: > > > > On Fri, Jan 11, 2019 at 5:12 PM Matt Turner wrote: > > > > > > From: Gert Wollny > > > > > > Since Meson will eventually be the only build system deprecate autotools > > > now. It can still be used by invoking configure with the flag > > > --enable-autotools > > > > > > NAKed-by: Ilia Mirkin > > > > [nouveau] > > > > > Acked-by: Eric Engestrom > > > Acked-by: Kenneth Graunke > > > Acked-by: Lionel Landwerlin > > > Acked-by: Jason Ekstrand > > > Reviewed-by: Matt Turner > > > > [intel] > > > > > Acked-by: Rob Clark > > > > [freedreno] > > > > > Acked-by: Marek Olšák > > > > [radeon] > > > > > Reviewed-by: Christian Gmeiner > > > > [etnaviv] > > > > > Reviewed-by: Eric Anholt > > > > [vc4] > > > > > Signed-off-by: Gert Wollny > > > > [sorry Gert, not sure how to classify you] > > > > I think the vmware team (which largely maintains llvmpipe and svga) is > > probably worth hearing from -- I believe they've largely stayed out of > > it. But an ack/nack would be good. Also virgl isn't represented, I > > believe. Probably not *required* to hear from these, but perhaps worth > > a poke? > > Sure. I've Cc'd Dave, Brian, José, and Roland on this reply. > > > > --- > > > I think there's support for overriding the sole objection to this patch. > > > > > > To confirm: > > > > > > (1) The plan is to remove Autotools, perhaps after the 19.0 release > > > > > > (2) This patch's purpose is to ensure that everyone knows that > > > Autotools will be going away (think: people who build Mesa as > > > part of an automated process and wouldn't notice a deprecation > > > warning unless it requires some action from them) > > > > If it's being removed _after_ the 19.0 release, does it make sense to > > have a patch like this _in_ the 19.0 release? (Perhaps the answer is > > `yes', but I'd still like to ask the question.) > > Yes, I think so -- I might be missing or misunderstanding a part of > your question though. > > My thinking is in 19.0 mark autotools as deprecated with this patch so > as to ensure everyone knows, and depending on progress on the blocking > issues to aim for removal after the 19.0 branch point. Perhaps I was just responding (in my head) too literally to your comment about automated processes. If the automated process is around building HEAD, then it's not necessary for this change to be in the release. But I guess you also want to catch the people with automated processes against released versions who might have various hypothetical issues with meson, and you want them to report the issues while they still have an easy fallback to autotools, as opposed to when there's no other option and they're stuck in an inconvenient situation. So ... the answer is `yes'. -ilia ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev