[Mesa-dev] [PATCH] glsl: move xfb BufferStride into gl_transform_feedback_info
It makes more sense to have this here where we store the other values from xfb qualifiers. The struct it was previously part of is now only used to store values to come from the api. --- src/compiler/glsl/link_varyings.cpp | 4 ++-- src/compiler/glsl/linker.cpp| 8 src/mesa/main/mtypes.h | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index e622b3e..e339823 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -1136,11 +1136,11 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog, /* Apply any xfb_stride global qualifiers */ if (has_xfb_qualifiers) { for (unsigned j = 0; j < MAX_FEEDBACK_BUFFERS; j++) { -if (prog->TransformFeedback.BufferStride[j]) { +if (prog->LinkedTransformFeedback.BufferStride[j]) { buffers |= 1 << j; explicit_stride[j] = true; prog->LinkedTransformFeedback.Buffers[j].Stride = - prog->TransformFeedback.BufferStride[j] / 4; + prog->LinkedTransformFeedback.BufferStride[j] / 4; } } } diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index b8dc8a7..d040b92 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -1695,19 +1695,19 @@ link_xfb_stride_layout_qualifiers(struct gl_context *ctx, for (unsigned j = 0; j < MAX_FEEDBACK_BUFFERS; j++) { if (linked_shader->info.TransformFeedback.BufferStride[j]) { - prog->TransformFeedback.BufferStride[j] = + prog->LinkedTransformFeedback.BufferStride[j] = linked_shader->info.TransformFeedback.BufferStride[j]; /* We will validate doubles at a later stage */ - if (prog->TransformFeedback.BufferStride[j] % 4) { + if (prog->LinkedTransformFeedback.BufferStride[j] % 4) { linker_error(prog, "invalid qualifier xfb_stride=%d must be a " "multiple of 4 or if its applied to a type that is " "or contains a double a multiple of 8.", - prog->TransformFeedback.BufferStride[j]); + prog->LinkedTransformFeedback.BufferStride[j]); return; } - if (prog->TransformFeedback.BufferStride[j] / 4 > + if (prog->LinkedTransformFeedback.BufferStride[j] / 4 > ctx->Const.MaxTransformFeedbackInterleavedComponents) { linker_error(prog, "The MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS " diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 1ad93c3..b621431 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1696,6 +1696,9 @@ struct gl_transform_feedback_info struct gl_transform_feedback_varying_info *Varyings; GLint NumVarying; + /** Global xfb_stride out qualifier if any */ + GLuint BufferStride[MAX_FEEDBACK_BUFFERS]; + struct gl_transform_feedback_buffer Buffers[MAX_FEEDBACK_BUFFERS]; }; @@ -2756,8 +2759,6 @@ struct gl_shader_program */ struct { GLenum BufferMode; - /** Global xfb_stride out qualifier if any */ - GLuint BufferStride[MAX_FEEDBACK_BUFFERS]; GLuint NumVarying; GLchar **VaryingNames; /**< Array [NumVarying] of char * */ } TransformFeedback; -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 97879] [amdgpu] Rocket League: long hangs (several seconds) when loading assets (models/textures/shaders?)
https://bugs.freedesktop.org/show_bug.cgi?id=97879 --- Comment #12 from Michel Dänzer--- (In reply to Andreas Hartmetz from comment #4) > Assuming the problem was shader compilation, what could be done about it, > though? Optimizing shader compilation by a factor of 10 seems unrealistic, Not necessarily. Let's worry about that once the code taking so much time is identified and analyzed. For that purpose, what's needed next is CPU profiles of the stalls. > a disk cache for shaders has been rejected (right?) No, it hasn't. > and would not always help, e.g. when somebody with a car that uses a new > asset joins. Right, there's only so much the driver stack can do when the game (engine) keeps compiling shaders. -- 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] i965/gen8+: Enable GL_OES_viewport_array
On Wed, Sep 21, 2016 at 2:15 PM, Anuj Phogatwrote: > Signed-off-by: Anuj Phogat > > --- > This patch requires below series: > https://patchwork.freedesktop.org/series/12594/ FYI, this is now pushed. Given that the ext relies on OES_geometry_shader, the placement of the enable makes sense. However all 3 of these should probably go into the gen7.5 section since HSW now has ES 3.1 as well. But that should be done later. As is, this is Reviewed-by: Ilia Mirkin > --- > src/mesa/drivers/dri/i965/intel_extensions.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c > b/src/mesa/drivers/dri/i965/intel_extensions.c > index 93eb966..53bd7cc 100644 > --- a/src/mesa/drivers/dri/i965/intel_extensions.c > +++ b/src/mesa/drivers/dri/i965/intel_extensions.c > @@ -404,6 +404,7 @@ intelInitExtensions(struct gl_context *ctx) >ctx->Extensions.ARB_ES3_2_compatibility = true; >ctx->Extensions.OES_geometry_shader = true; >ctx->Extensions.OES_texture_cube_map_array = true; > + ctx->Extensions.OES_viewport_array = true; > } > > if (brw->gen >= 9) { > -- > 2.5.5 > > ___ > 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 2/2] st/mesa: enable ARB_ES3_2_compatibility when enough available
ping On Tue, Sep 13, 2016 at 8:54 PM, Ilia Mirkinwrote: > Signed-off-by: Ilia Mirkin > --- > src/mesa/state_tracker/st_extensions.c | 20 > 1 file changed, 20 insertions(+) > > diff --git a/src/mesa/state_tracker/st_extensions.c > b/src/mesa/state_tracker/st_extensions.c > index 4d54928..55019d7 100644 > --- a/src/mesa/state_tracker/st_extensions.c > +++ b/src/mesa/state_tracker/st_extensions.c > @@ -1246,4 +1246,24 @@ void st_init_extensions(struct pipe_screen *screen, >extensions->OES_texture_buffer && >extensions->OES_texture_cube_map_array && >extensions->EXT_texture_sRGB_decode; > + > + /* Same deal as for ARB_ES3_1_compatibility - this has to be computed > +* before overall versions are selected. Also it's actually a subset of ES > +* 3.2, since it doesn't require ASTC or advanced blending. > +*/ > + extensions->ARB_ES3_2_compatibility = > + extensions->ARB_ES3_1_compatibility && > + extensions->KHR_robustness && > + extensions->ARB_copy_image && > + extensions->ARB_draw_buffers_blend && > + extensions->ARB_draw_elements_base_vertex && > + extensions->OES_geometry_shader && > + extensions->ARB_gpu_shader5 && > + extensions->ARB_sample_shading && > + extensions->ARB_tessellation_shader && > + extensions->ARB_texture_border_clamp && > + extensions->OES_texture_buffer && > + extensions->ARB_texture_cube_map_array && > + extensions->ARB_texture_stencil8 && > + extensions->ARB_texture_multisample; > } > -- > 2.7.3 > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] st/mesa: enable GL_ANDROID_extension_pack_es31a when available
ping On Tue, Sep 13, 2016 at 8:54 PM, Ilia Mirkinwrote: > For now that's never since advanced blend hasn't been piped through. > > Signed-off-by: Ilia Mirkin > --- > src/mesa/state_tracker/st_extensions.c | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/src/mesa/state_tracker/st_extensions.c > b/src/mesa/state_tracker/st_extensions.c > index 807fbfb..4d54928 100644 > --- a/src/mesa/state_tracker/st_extensions.c > +++ b/src/mesa/state_tracker/st_extensions.c > @@ -1228,4 +1228,22 @@ void st_init_extensions(struct pipe_screen *screen, > > extensions->OES_primitive_bounding_box = > extensions->ARB_ES3_1_compatibility; > consts->NoPrimitiveBoundingBoxOutput = true; > + > + extensions->ANDROID_extension_pack_es31a = > + extensions->KHR_texture_compression_astc_ldr && > + extensions->KHR_blend_equation_advanced && > + extensions->OES_sample_variables && > + extensions->ARB_shader_image_load_store && > + extensions->ARB_texture_stencil8 && > + extensions->ARB_texture_multisample && > + extensions->OES_copy_image && > + extensions->ARB_draw_buffers_blend && > + extensions->OES_geometry_shader && > + extensions->ARB_gpu_shader5 && > + extensions->OES_primitive_bounding_box && > + extensions->ARB_tessellation_shader && > + extensions->ARB_texture_border_clamp && > + extensions->OES_texture_buffer && > + extensions->OES_texture_cube_map_array && > + extensions->EXT_texture_sRGB_decode; > } > -- > 2.7.3 > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] osmesa: Unbind the current context when given a null context and buffer.
This is needed to be consistent with other drivers. I used both the context and the buffer as a condition in order to ensure it's an intentional unbind, and not a programming error, but let me know if you think I should change it to check only the context. Also, this is my very first mesa patch, so if this patch gets accepted I think someone should land it for me, since I have no access to the repo. Thanks! Signed-off-by: Emilio Cobos Álvarez--- src/mesa/drivers/osmesa/osmesa.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 8462ab6..356ba71 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -966,6 +966,9 @@ OSMesaDestroyContext( OSMesaContext osmesa ) * If the context's viewport hasn't been initialized yet, it will now be * initialized to (0,0,width,height). * + * If both the context and the buffer are null, the current context will be + * unbound. + * * Input: osmesa - the rendering context * buffer - the image buffer memory * type - data type for pixel components @@ -983,6 +986,10 @@ GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type, GLsizei width, GLsizei height ) { + if (!osmesa && !buffer) { + return _mesa_make_current(NULL, NULL, NULL); + } + if (!osmesa || !buffer || width < 1 || height < 1 || width > SWRAST_MAX_WIDTH || height > SWRAST_MAX_HEIGHT) { -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] anv/formats: Disallow 1D compressed textures
Signed-off-by: Nanley Chery--- src/intel/vulkan/anv_formats.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 701add5..accf45c 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -496,6 +496,17 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties( break; } + /* Our hardware doesn't support 1D compressed textures. +*From the SKL PRM, RENDER_SURFACE_STATE::SurfaceFormat: +** This field cannot be a compressed (BC*, DXT*, FXT*, ETC*, EAC*) format +* if the Surface Type is SURFTYPE_1D. +** This field cannot be ASTC format if the Surface Type is SURFTYPE_1D. +*/ + if (type == VK_IMAGE_TYPE_1D && + isl_format_is_compressed(anv_formats[format].isl_format)) { + goto unsupported; + } + if (tiling == VK_IMAGE_TILING_OPTIMAL && type == VK_IMAGE_TYPE_2D && (format_feature_flags & (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/3] anv/formats: Disallow linear ASTC textures
Signed-off-by: Nanley Chery--- src/intel/vulkan/anv_formats.c | 4 1 file changed, 4 insertions(+) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index ff59f47..701add5 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -408,6 +408,10 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d tiled &= ~VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT & ~VK_FORMAT_FEATURE_BLIT_DST_BIT; } + + /* ASTC textures must be in Y-tiled memory */ + if (isl_format_get_layout(linear_fmt.isl_format)->txc == ISL_TXC_ASTC) + linear = 0; } out_properties->linearTilingFeatures = linear; -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/3] isl: Only allow Y-tiling for ASTC textures
Signed-off-by: Nanley Chery--- src/intel/isl/isl_gen7.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/intel/isl/isl_gen7.c b/src/intel/isl/isl_gen7.c index 4f1cc9d..36a3401 100644 --- a/src/intel/isl/isl_gen7.c +++ b/src/intel/isl/isl_gen7.c @@ -231,6 +231,12 @@ gen6_filter_tiling(const struct isl_device *dev, *flags &= ~ISL_TILING_W_BIT; } + /* From the SKL+ PRMs, RENDER_SURFACE_STATE:TileMode, +*If Surface Format is ASTC*, this field must be TILEMODE_YMAJOR. +*/ + if (isl_format_get_layout(info->format)->txc == ISL_TXC_ASTC) + *flags &= ISL_TILING_Y0_BIT; + /* The HiZ format and tiling always go together */ if (info->format == ISL_FORMAT_HIZ) { *flags &= ISL_TILING_HIZ_BIT; -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 0/3] anv: Prevent creation of invalid compressed textures
This series prevents invalid compressed textures from being created in the Vulkan driver. There aren't any Vulkan CTS tests for 1D compressed textures, so no change has been observed in that test suite. Nanley Chery (3): isl: Only allow Y-tiling for ASTC textures anv/formats: Disallow linear ASTC textures anv/formats: Disallow 1D compressed textures src/intel/isl/isl_gen7.c | 6 ++ src/intel/vulkan/anv_formats.c | 15 +++ 2 files changed, 21 insertions(+) -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 3/7] intel/isl: Add support for 1-D compressed textures
On Thu, Sep 22, 2016 at 02:12:08PM -0700, Jason Ekstrand wrote: > On Sep 22, 2016 11:11 PM, "Nanley Chery"wrote: > > > > On Wed, Sep 14, 2016 at 01:28:23PM -0700, Jason Ekstrand wrote: > > > Compressed 1-D textures are a well-defined thing in both GL and Vulkan. > > > > Could you provide a reference? I could not find any documentation on 1D > > compressed textures. Instead I found that OpenGL disallows them and > > Vulkan does not explicitly mention them. In OpenGL CompressedTexImage1D > > returns INVALID_ENUM for ASTC, LATC, S3TC, RGTC, BPTC, and FXT1. The same ^ Sorry, there's an extra ASTC here. > > return value is implied for ASTC. In Vulkan, drivers are required to > > support one of the following: BPTC for 2D and 3D images, ASTC LDR for 2D > > images, or ETC2 and EAC for 2D images. > > OK, so they don't normally exist... > > > Our HW also doesn't support this. RENDER_SURFACE_STATE says: > > * This field cannot be a compressed (BC*, DXT*, FXT*, ETC*, EAC*) format > > if the Surface Type is SURFTYPE_1D. > > * This field cannot be ASTC format if the Surface Type is SURFTYPE_1D. > > Right. Maybe assert in surface state setup about that. > > > I retract my earlier review feedback - the isl_*_gen9_1d functions > > should not be updated because ISL_DIM_LAYOUT_GEN9_1D compressed > > textures cannot exist. > > > > > > > > v2: Fix some asserts (Nanley) > > > > > > Signed-off-by: Jason Ekstrand > > > --- > > > src/intel/isl/isl.c | 12 +++- > > > 1 file changed, 7 insertions(+), 5 deletions(-) > > > > > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > > > index a75fddf..710c990 100644 > > > --- a/src/intel/isl/isl.c > > > +++ b/src/intel/isl/isl.c > > > @@ -518,7 +518,6 @@ isl_calc_phys_level0_extent_sa(const struct > isl_device *dev, > > >assert(info->height == 1); > > >assert(info->depth == 1); > > >assert(info->samples == 1); > > > - assert(!isl_format_is_compressed(info->format)); > > > > If you'd like to make this change for HiZ, I think we should keep this > > assert and OR in a requirement that the format or tiling is HiZ. > > Eh... We also need it for CCS (both gen9 compression and fast clears) and I > think the calculations are fairly well-defined. I don't see why we > shouldn't just allow it in the calculation code. It wouldn't hurt to have > an assert somewhere that prevents creating "normal" compressed 1D > surfaces. As I said above, maybe assert in the surface state setup code or > something. I think it's fine to allow it in the calculation code for auxiliary surfaces. The commit message and removal of the assertion implied a much greater change (to me at least). An assertion in the surface state file sounds like a good place. -Nanley > > --Jason > > > -Nanley > > > > > > > >switch (dim_layout) { > > >case ISL_DIM_LAYOUT_GEN4_3D: > > > @@ -527,8 +526,8 @@ isl_calc_phys_level0_extent_sa(const struct > isl_device *dev, > > >case ISL_DIM_LAYOUT_GEN9_1D: > > >case ISL_DIM_LAYOUT_GEN4_2D: > > > *phys_level0_sa = (struct isl_extent4d) { > > > -.w = info->width, > > > -.h = 1, > > > +.w = isl_align_npot(info->width, fmtl->bw), > > > +.h = fmtl->bh, > > > .d = 1, > > > .a = info->array_len, > > > }; > > > @@ -757,7 +756,7 @@ isl_calc_phys_slice0_extent_sa_gen9_1d( > > > { > > > MAYBE_UNUSED const struct isl_format_layout *fmtl = > isl_format_get_layout(info->format); > > > > > > - assert(phys_level0_sa->height == 1); > > > + assert(phys_level0_sa->height == fmtl->bh); > > > assert(phys_level0_sa->depth == 1); > > > assert(info->samples == 1); > > > assert(image_align_sa->w >= fmtl->bw); > > > @@ -1567,9 +1566,12 @@ get_image_offset_sa_gen9_1d(const struct > isl_surf *surf, > > > uint32_t *x_offset_sa, > > > uint32_t *y_offset_sa) > > > { > > > + MAYBE_UNUSED const struct isl_format_layout *fmtl = > > > + isl_format_get_layout(surf->format); > > > + > > > assert(level < surf->levels); > > > assert(layer < surf->phys_level0_sa.array_len); > > > - assert(surf->phys_level0_sa.height == 1); > > > + assert(surf->phys_level0_sa.height == fmtl->bh); > > > assert(surf->phys_level0_sa.depth == 1); > > > assert(surf->samples == 1); > > > > > > -- > > > 2.5.0.400.gff86faf > > > > > > ___ > > > 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] [AppVeyor] mesa master #2241 failed
Build mesa 2241 failed Commit e66a2b879b by Dylan Baker on 9/22/2016 6:30 PM: mapi: export all GLES 3.2 functions in libGLESv2.so\n\nSee commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of\nthis commit.\n\nSigned-off-by: Dylan Baker\nReviewed-by: Ilia Mirkin \nReviewed-by: Kenneth Graunke Configure your notification preferences ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/3] intel/i965: make gen_device_info mutable
On Friday, September 23, 2016 1:17:14 AM PDT Lionel Landwerlin wrote: > Make gen_device_info a mutable structure so we can update the fields that > can be refined by querying the kernel (like subslices and EU numbers). > > This patch does not make any functional change, it just make > gen_get_device_info() fill a structure rather than returning a const > pointer. > > Cc: Kenneth Graunke> Signed-off-by: Lionel Landwerlin Thank you, thank you! This is so much nicer! I've wanted to get rid of all the duplicate URB fields and thread counts for ages. Series is: Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 0/3] anv/i965: make gen_device_info mutable
Hi, Kenneth metionned that we might be interested in making gen_device_info mutable so that its values could be updated (for example after querying the kernel about the number of EUs and subslices). Here is a first attempt. I think a follow up series could add the subslices number to gen_device_info (we only have the slices number at the moment). Also factoring out the update of gen_device_info into src/intel/common might make sense. Any comments? Cheers, Lionel Landwerlin (3): intel/i965: make gen_device_info mutable i965: get rid of duplicated values from gen_device_info anv: get rid of duplicated values from gen_device_info src/intel/common/gen_device_info.c | 11 ++-- src/intel/common/gen_device_info.h | 2 +- .../isl/tests/isl_surf_get_image_offset_test.c | 18 -- src/intel/tools/disasm.c | 4 +- src/intel/vulkan/anv_allocator.c | 15 ++--- src/intel/vulkan/anv_device.c | 65 ++ src/intel/vulkan/anv_formats.c | 16 +++--- src/intel/vulkan/anv_private.h | 13 + src/intel/vulkan/gen7_pipeline.c | 11 ++-- src/intel/vulkan/gen8_pipeline.c | 7 ++- src/intel/vulkan/genX_pipeline.c | 5 +- src/mesa/drivers/dri/i965/brw_clip.c | 4 +- src/mesa/drivers/dri/i965/brw_compute.c| 3 +- src/mesa/drivers/dri/i965/brw_context.c| 26 +++-- src/mesa/drivers/dri/i965/brw_context.h| 17 -- src/mesa/drivers/dri/i965/brw_cs.c | 5 +- src/mesa/drivers/dri/i965/brw_ff_gs.c | 4 +- src/mesa/drivers/dri/i965/brw_gs.c | 7 ++- src/mesa/drivers/dri/i965/brw_sf.c | 4 +- src/mesa/drivers/dri/i965/brw_state_dump.c | 2 +- src/mesa/drivers/dri/i965/brw_surface_formats.c| 2 +- src/mesa/drivers/dri/i965/brw_tcs.c| 2 +- src/mesa/drivers/dri/i965/brw_tes.c| 4 +- src/mesa/drivers/dri/i965/brw_vs.c | 7 ++- src/mesa/drivers/dri/i965/brw_vs_state.c | 3 +- src/mesa/drivers/dri/i965/brw_wm.c | 5 +- src/mesa/drivers/dri/i965/brw_wm_state.c | 4 +- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 10 ++-- src/mesa/drivers/dri/i965/gen6_gs_state.c | 7 ++- src/mesa/drivers/dri/i965/gen6_urb.c | 11 ++-- src/mesa/drivers/dri/i965/gen6_vs_state.c | 3 +- src/mesa/drivers/dri/i965/gen6_wm_state.c | 3 +- src/mesa/drivers/dri/i965/gen7_cs_state.c | 6 +- src/mesa/drivers/dri/i965/gen7_ds_state.c | 3 +- src/mesa/drivers/dri/i965/gen7_gs_state.c | 3 +- src/mesa/drivers/dri/i965/gen7_hs_state.c | 3 +- src/mesa/drivers/dri/i965/gen7_l3_state.c | 8 +-- src/mesa/drivers/dri/i965/gen7_urb.c | 18 +++--- src/mesa/drivers/dri/i965/gen7_vs_state.c | 3 +- src/mesa/drivers/dri/i965/gen7_wm_state.c | 3 +- src/mesa/drivers/dri/i965/gen8_ds_state.c | 3 +- src/mesa/drivers/dri/i965/gen8_gs_state.c | 5 +- src/mesa/drivers/dri/i965/gen8_hs_state.c | 3 +- src/mesa/drivers/dri/i965/gen8_vs_state.c | 3 +- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +- src/mesa/drivers/dri/i965/intel_screen.c | 41 +++--- src/mesa/drivers/dri/i965/intel_screen.h | 2 +- 47 files changed, 195 insertions(+), 213 deletions(-) -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] anv: get rid of duplicated values from gen_device_info
Signed-off-by: Lionel LandwerlinCc: Kenneth Graunke --- src/intel/vulkan/anv_allocator.c | 15 --- src/intel/vulkan/anv_device.c| 22 +++--- src/intel/vulkan/anv_private.h | 11 --- src/intel/vulkan/gen7_pipeline.c | 11 ++- src/intel/vulkan/gen8_pipeline.c | 7 --- src/intel/vulkan/genX_pipeline.c | 5 +++-- 6 files changed, 28 insertions(+), 43 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index a59ad3c..83a701e 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -924,8 +924,9 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool, if (size == 0) { /* We own the lock. Allocate a buffer */ - struct anv_physical_device *physical_device = + const struct anv_physical_device *physical_device = >instance->physicalDevice; + const struct gen_device_info *devinfo = _device->info; /* WaCSScratchSize:hsw * @@ -944,14 +945,14 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool, */ const unsigned subslices = MAX2(physical_device->subslice_total, 1); const unsigned scratch_ids_per_subslice = - device->info.is_haswell ? 16 * 8 : physical_device->max_cs_threads; + device->info.is_haswell ? 16 * 8 : devinfo->max_cs_threads; uint32_t max_threads[] = { - [MESA_SHADER_VERTEX] = physical_device->max_vs_threads, - [MESA_SHADER_TESS_CTRL]= physical_device->max_hs_threads, - [MESA_SHADER_TESS_EVAL]= physical_device->max_ds_threads, - [MESA_SHADER_GEOMETRY] = physical_device->max_gs_threads, - [MESA_SHADER_FRAGMENT] = physical_device->max_wm_threads, + [MESA_SHADER_VERTEX] = devinfo->max_vs_threads, + [MESA_SHADER_TESS_CTRL]= devinfo->max_hs_threads, + [MESA_SHADER_TESS_EVAL]= devinfo->max_ds_threads, + [MESA_SHADER_GEOMETRY] = devinfo->max_gs_threads, + [MESA_SHADER_FRAGMENT] = devinfo->max_wm_threads, [MESA_SHADER_COMPUTE] = scratch_ids_per_subslice * subslices, }; diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 6edbb1c..f786ebe 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -135,12 +135,6 @@ anv_physical_device_init(struct anv_physical_device *device, bool swizzled = anv_gem_get_bit6_swizzle(fd, I915_TILING_X); - device->max_vs_threads = device->info.max_vs_threads; - device->max_hs_threads = device->info.max_hs_threads; - device->max_ds_threads = device->info.max_ds_threads; - device->max_gs_threads = device->info.max_gs_threads; - device->max_wm_threads = device->info.max_wm_threads; - /* GENs prior to 8 do not support EU/Subslice info */ if (device->info.gen >= 8) { device->subslice_total = anv_gem_get_param(fd, I915_PARAM_SUBSLICE_TOTAL); @@ -161,13 +155,11 @@ anv_physical_device_init(struct anv_physical_device *device, if (device->info.is_cherryview && device->subslice_total > 0 && device->eu_total > 0) { /* Logical CS threads = EUs per subslice * 7 threads per EU */ - device->max_cs_threads = device->eu_total / device->subslice_total * 7; + uint32_t max_cs_threads = device->eu_total / device->subslice_total * 7; /* Fuse configurations may give more threads than expected, never less. */ - if (device->max_cs_threads < device->info.max_cs_threads) - device->max_cs_threads = device->info.max_cs_threads; - } else { - device->max_cs_threads = device->info.max_cs_threads; + if (max_cs_threads > device->info.max_cs_threads) + device->info.max_cs_threads = max_cs_threads; } close(fd); @@ -537,11 +529,11 @@ void anv_GetPhysicalDeviceProperties( .maxFragmentCombinedOutputResources = 8, .maxComputeSharedMemorySize = 32768, .maxComputeWorkGroupCount = { 65535, 65535, 65535 }, - .maxComputeWorkGroupInvocations = 16 * pdevice->max_cs_threads, + .maxComputeWorkGroupInvocations = 16 * devinfo->max_cs_threads, .maxComputeWorkGroupSize = { - 16 * pdevice->max_cs_threads, - 16 * pdevice->max_cs_threads, - 16 * pdevice->max_cs_threads, + 16 * devinfo->max_cs_threads, + 16 * devinfo->max_cs_threads, + 16 * devinfo->max_cs_threads, }, .subPixelPrecisionBits= 4 /* FIXME */, .subTexelPrecisionBits= 4 /* FIXME */, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 839f813..443c31f 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -573,17 +573,6 @@ struct
[Mesa-dev] [PATCH 1/3] intel/i965: make gen_device_info mutable
Make gen_device_info a mutable structure so we can update the fields that can be refined by querying the kernel (like subslices and EU numbers). This patch does not make any functional change, it just make gen_get_device_info() fill a structure rather than returning a const pointer. Cc: Kenneth GraunkeSigned-off-by: Lionel Landwerlin --- src/intel/common/gen_device_info.c | 11 ++-- src/intel/common/gen_device_info.h | 2 +- .../isl/tests/isl_surf_get_image_offset_test.c | 18 --- src/intel/tools/disasm.c | 4 +- src/intel/vulkan/anv_device.c | 59 +++--- src/intel/vulkan/anv_formats.c | 16 +++--- src/intel/vulkan/anv_private.h | 2 +- src/mesa/drivers/dri/i965/brw_clip.c | 4 +- src/mesa/drivers/dri/i965/brw_context.c| 6 +-- src/mesa/drivers/dri/i965/brw_cs.c | 2 +- src/mesa/drivers/dri/i965/brw_ff_gs.c | 4 +- src/mesa/drivers/dri/i965/brw_gs.c | 4 +- src/mesa/drivers/dri/i965/brw_sf.c | 4 +- src/mesa/drivers/dri/i965/brw_state_dump.c | 2 +- src/mesa/drivers/dri/i965/brw_surface_formats.c| 2 +- src/mesa/drivers/dri/i965/brw_tes.c| 2 +- src/mesa/drivers/dri/i965/brw_vs.c | 4 +- src/mesa/drivers/dri/i965/brw_wm.c | 2 +- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 10 ++-- src/mesa/drivers/dri/i965/gen7_cs_state.c | 2 +- src/mesa/drivers/dri/i965/gen7_l3_state.c | 8 +-- src/mesa/drivers/dri/i965/gen7_urb.c | 2 +- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +- src/mesa/drivers/dri/i965/intel_screen.c | 41 --- src/mesa/drivers/dri/i965/intel_screen.h | 2 +- 25 files changed, 111 insertions(+), 106 deletions(-) diff --git a/src/intel/common/gen_device_info.c b/src/intel/common/gen_device_info.c index 7f1af19..615605c 100644 --- a/src/intel/common/gen_device_info.c +++ b/src/intel/common/gen_device_info.c @@ -487,21 +487,20 @@ static const struct gen_device_info gen_device_info_kbl_gt4 = { .num_slices = 3, }; -const struct gen_device_info * -gen_get_device_info(int devid) +const bool +gen_get_device_info(int devid, struct gen_device_info *devinfo) { - const struct gen_device_info *devinfo; switch (devid) { #undef CHIPSET #define CHIPSET(id, family, name) \ - case id: devinfo = _device_info_##family; break; + case id: *devinfo = gen_device_info_##family; break; #include "pci_ids/i965_pci_ids.h" default: fprintf(stderr, "i965_dri.so does not support the 0x%x PCI ID.\n", devid); - return NULL; + return false; } - return devinfo; + return true; } const char * diff --git a/src/intel/common/gen_device_info.h b/src/intel/common/gen_device_info.h index 6b639d3..8b68a01 100644 --- a/src/intel/common/gen_device_info.h +++ b/src/intel/common/gen_device_info.h @@ -143,5 +143,5 @@ struct gen_device_info /** @} */ }; -const struct gen_device_info *gen_get_device_info(int devid); +const bool gen_get_device_info(int devid, struct gen_device_info *devinfo); const char *gen_get_device_name(int devid); diff --git a/src/intel/isl/tests/isl_surf_get_image_offset_test.c b/src/intel/isl/tests/isl_surf_get_image_offset_test.c index 5ce326f..1b3dc58 100644 --- a/src/intel/isl/tests/isl_surf_get_image_offset_test.c +++ b/src/intel/isl/tests/isl_surf_get_image_offset_test.c @@ -124,9 +124,11 @@ test_bdw_2d_r8g8b8a8_unorm_512x512_array01_samples01_noaux_tiley0(void) { bool ok; + struct gen_device_info devinfo; + t_assert(gen_get_device_info(BDW_GT2_DEVID, )); + struct isl_device dev; - isl_device_init(, gen_get_device_info(BDW_GT2_DEVID), - /*bit6_swizzle*/ false); + isl_device_init(, , /*bit6_swizzle*/ false); struct isl_surf surf; ok = isl_surf_init(, , @@ -170,9 +172,11 @@ test_bdw_2d_r8g8b8a8_unorm_1024x1024_array06_samples01_noaux_tiley0(void) { bool ok; + struct gen_device_info devinfo; + t_assert(gen_get_device_info(BDW_GT2_DEVID, )); + struct isl_device dev; - isl_device_init(, gen_get_device_info(BDW_GT2_DEVID), - /*bit6_swizzle*/ false); + isl_device_init(, , /*bit6_swizzle*/ false); struct isl_surf surf; ok = isl_surf_init(, , @@ -229,9 +233,11 @@ test_bdw_3d_r8g8b8a8_unorm_256x256x256_levels09_tiley0(void) { bool ok; + struct gen_device_info devinfo; + t_assert(gen_get_device_info(BDW_GT2_DEVID, )); + struct isl_device dev; - isl_device_init(, gen_get_device_info(BDW_GT2_DEVID), - /*bit6_swizzle*/ false); + isl_device_init(, , /*bit6_swizzle*/ false); struct isl_surf surf; ok = isl_surf_init(, , diff --git a/src/intel/tools/disasm.c
[Mesa-dev] [PATCH 2/3] i965: get rid of duplicated values from gen_device_info
Now that we have gen_device_info mutable, we can update its values and drop all copies we had in brw_context. Signed-off-by: Lionel LandwerlinCc: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_compute.c | 3 ++- src/mesa/drivers/dri/i965/brw_context.c | 22 +- src/mesa/drivers/dri/i965/brw_context.h | 17 - src/mesa/drivers/dri/i965/brw_cs.c| 5 +++-- src/mesa/drivers/dri/i965/brw_gs.c| 7 --- src/mesa/drivers/dri/i965/brw_tcs.c | 2 +- src/mesa/drivers/dri/i965/brw_tes.c | 2 +- src/mesa/drivers/dri/i965/brw_vs.c| 7 --- src/mesa/drivers/dri/i965/brw_vs_state.c | 3 ++- src/mesa/drivers/dri/i965/brw_wm.c| 5 +++-- src/mesa/drivers/dri/i965/brw_wm_state.c | 4 ++-- src/mesa/drivers/dri/i965/gen6_gs_state.c | 7 +-- src/mesa/drivers/dri/i965/gen6_urb.c | 11 ++- src/mesa/drivers/dri/i965/gen6_vs_state.c | 3 ++- src/mesa/drivers/dri/i965/gen6_wm_state.c | 3 ++- src/mesa/drivers/dri/i965/gen7_cs_state.c | 4 ++-- src/mesa/drivers/dri/i965/gen7_ds_state.c | 3 ++- src/mesa/drivers/dri/i965/gen7_gs_state.c | 3 ++- src/mesa/drivers/dri/i965/gen7_hs_state.c | 3 ++- src/mesa/drivers/dri/i965/gen7_urb.c | 16 src/mesa/drivers/dri/i965/gen7_vs_state.c | 3 ++- src/mesa/drivers/dri/i965/gen7_wm_state.c | 3 ++- src/mesa/drivers/dri/i965/gen8_ds_state.c | 3 ++- src/mesa/drivers/dri/i965/gen8_gs_state.c | 5 +++-- src/mesa/drivers/dri/i965/gen8_hs_state.c | 3 ++- src/mesa/drivers/dri/i965/gen8_vs_state.c | 3 ++- 26 files changed, 71 insertions(+), 79 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_compute.c b/src/mesa/drivers/dri/i965/brw_compute.c index 0d2aca5..cde3bad 100644 --- a/src/mesa/drivers/dri/i965/brw_compute.c +++ b/src/mesa/drivers/dri/i965/brw_compute.c @@ -116,6 +116,7 @@ static void brw_emit_gpgpu_walker(struct brw_context *brw) { const struct brw_cs_prog_data *prog_data = brw->cs.prog_data; + const struct gen_device_info *devinfo = >screen->devinfo; const GLuint *num_groups = brw->compute.num_work_groups; uint32_t indirect_flag; @@ -148,7 +149,7 @@ brw_emit_gpgpu_walker(struct brw_context *brw) OUT_BATCH(0); /* Indirect Data Length */ OUT_BATCH(0); /* Indirect Data Start Address */ } - assert(thread_width_max <= brw->max_cs_threads); + assert(thread_width_max <= devinfo->max_cs_threads); OUT_BATCH(SET_FIELD(simd_size / 16, GPGPU_WALKER_SIMD_SIZE) | SET_FIELD(thread_width_max - 1, GPGPU_WALKER_THREAD_WIDTH_MAX)); OUT_BATCH(0);/* Thread Group ID Starting X */ diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 9b72e84..6efad78 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -806,19 +806,17 @@ brw_initialize_cs_context_constants(struct brw_context *brw) { struct gl_context *ctx = >ctx; const struct intel_screen *screen = brw->screen; - const struct gen_device_info *devinfo = >devinfo; + struct gen_device_info *devinfo = >screen->devinfo; /* FINISHME: Do this for all platforms that the kernel supports */ if (brw->is_cherryview && screen->subslice_total > 0 && screen->eu_total > 0) { /* Logical CS threads = EUs per subslice * 7 threads per EU */ - brw->max_cs_threads = screen->eu_total / screen->subslice_total * 7; + uint32_t max_cs_threads = screen->eu_total / screen->subslice_total * 7; /* Fuse configurations may give more threads than expected, never less. */ - if (brw->max_cs_threads < devinfo->max_cs_threads) - brw->max_cs_threads = devinfo->max_cs_threads; - } else { - brw->max_cs_threads = devinfo->max_cs_threads; + if (max_cs_threads > devinfo->max_cs_threads) + devinfo->max_cs_threads = max_cs_threads; } /* Maximum number of scalar compute shader invocations that can be run in @@ -830,7 +828,7 @@ brw_initialize_cs_context_constants(struct brw_context *brw) * threads. With SIMD32 and 64 threads, Haswell still provides twice the * required the number of invocation needed for ARB_compute_shader. */ - const unsigned max_threads = MIN2(64, brw->max_cs_threads); + const unsigned max_threads = MIN2(64, devinfo->max_cs_threads); const uint32_t max_invocations = 32 * max_threads; ctx->Const.MaxComputeWorkGroupSize[0] = max_invocations; ctx->Const.MaxComputeWorkGroupSize[1] = max_invocations; @@ -1078,17 +1076,7 @@ brwCreateContext(gl_api api, if (brw->gen >= 6) brw_blorp_init(brw); - brw->max_vs_threads = devinfo->max_vs_threads; - brw->max_hs_threads = devinfo->max_hs_threads; - brw->max_ds_threads = devinfo->max_ds_threads; - brw->max_gs_threads = devinfo->max_gs_threads; - brw->max_wm_threads
Re: [Mesa-dev] [PATCH v3 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
Quoting Ilia Mirkin (2016-09-22 14:37:05) > On Thu, Sep 22, 2016 at 5:16 PM, Dylan Bakerwrote: > > See commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of > > this commit. > > > > Signed-off-by: Dylan Baker > > --- > > > > Changes since v2: > > > > Re-sort the whole list, and remove duplicates, which there were several. > > I've also checked that there are no duplicates by importing the list in > > python and asserting that len(functions) == len(set(functions)), since > > set() > > will drop duplicates. > > > > src/mapi/glapi/gen/static_data.py | 13 + > > 1 file changed, 13 insertions(+) > > > > diff --git a/src/mapi/glapi/gen/static_data.py > > b/src/mapi/glapi/gen/static_data.py > > index bb11c1d..6aa1716 100644 > > --- a/src/mapi/glapi/gen/static_data.py > > +++ b/src/mapi/glapi/gen/static_data.py > > @@ -484,17 +484,22 @@ functions = [ > > "BindVertexBuffer", > > "BindVertexBuffers", > > "Bitmap", > > +"BlendBarrier", > > "BlendColor", > > "BlendColorEXT", > > "BlendEquation", > > "BlendEquationEXT", > > "BlendEquationSeparate", > > +"BlendEquationSeparatei", > > "BlendEquationSeparateiARB", > > +"BlendEquationi", > > "BlendEquationiARB", > > "BlendFunc", > > "BlendFuncSeparate", > > "BlendFuncSeparateEXT", > > +"BlendFuncSeparatei", > > "BlendFuncSeparateiARB", > > +"BlendFunci", > > "BlendFunciARB", > > "BlitFramebuffer", > > "BufferData", > > @@ -825,6 +830,7 @@ functions = [ > > "GetFramebufferAttachmentParameteriv", > > "GetFramebufferAttachmentParameterivEXT", > > "GetFramebufferParameteriv", > > +"GetGraphicsResetStatus", > > "GetGraphicsResetStatusARB", > > "GetHandleARB", > > "GetHistogram", > > @@ -887,6 +893,7 @@ functions = [ > > "GetSamplerParameterIiv", > > "GetSamplerParameterIuiv", > > "GetSamplerParameterfv", > > +"GetSamplerParameteri", > > That's not a function that's defined anywhere that I can see. Unless > I'm somehow obviously wrong, please remove it. Otherwise this patch is You're right, and I'll remove it. I'm going to assume I typoed "GetSamplerParameteriv". > > Reviewed-by: Ilia Mirkin > > The other patches in the series appear mechanical and I didn't look at > them carefully, but are Acked-by: Ilia Mirkin Thanks for putting up with all of my silly mistakes and getting this reviewed. > > > "GetSamplerParameteriv", > > "GetSeparableFilter", > > "GetShaderInfoLog", > > @@ -951,8 +958,11 @@ functions = [ > > "GetnSeparableFilterARB", > > "GetnTexImageARB", > > "GetnUniformdvARB", > > +"GetnUniformfv", > > "GetnUniformfvARB", > > +"GetnUniformiv", > > "GetnUniformivARB", > > +"GetnUniformuiv", > > "GetnUniformuivARB", > > "Hint", > > "Histogram", > > @@ -1160,6 +1170,7 @@ functions = [ > > "Orthof", > > "Orthox", > > "PassThrough", > > +"PatchParameteri" > > "PauseTransformFeedback", > > "PixelMapfv", > > "PixelMapuiv", > > @@ -1191,6 +1202,7 @@ functions = [ > > "PopDebugGroup", > > "PopMatrix", > > "PopName", > > +"PrimitiveBoundingBox", > > "PrimitiveRestartIndex", > > "PrimitiveRestartIndexNV", > > "PrimitiveRestartNV", > > @@ -1274,6 +1286,7 @@ functions = [ > > "RasterPos4sv", > > "ReadBuffer", > > "ReadPixels", > > +"ReadnPixels", > > "ReadnPixelsARB", > > "Rectd", > > "Rectdv", > > -- > > 2.10.0 > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev 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 v3 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
On Thu, Sep 22, 2016 at 5:16 PM, Dylan Bakerwrote: > See commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of > this commit. > > Signed-off-by: Dylan Baker > --- > > Changes since v2: > > Re-sort the whole list, and remove duplicates, which there were several. > I've also checked that there are no duplicates by importing the list in > python and asserting that len(functions) == len(set(functions)), since > set() > will drop duplicates. > > src/mapi/glapi/gen/static_data.py | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/src/mapi/glapi/gen/static_data.py > b/src/mapi/glapi/gen/static_data.py > index bb11c1d..6aa1716 100644 > --- a/src/mapi/glapi/gen/static_data.py > +++ b/src/mapi/glapi/gen/static_data.py > @@ -484,17 +484,22 @@ functions = [ > "BindVertexBuffer", > "BindVertexBuffers", > "Bitmap", > +"BlendBarrier", > "BlendColor", > "BlendColorEXT", > "BlendEquation", > "BlendEquationEXT", > "BlendEquationSeparate", > +"BlendEquationSeparatei", > "BlendEquationSeparateiARB", > +"BlendEquationi", > "BlendEquationiARB", > "BlendFunc", > "BlendFuncSeparate", > "BlendFuncSeparateEXT", > +"BlendFuncSeparatei", > "BlendFuncSeparateiARB", > +"BlendFunci", > "BlendFunciARB", > "BlitFramebuffer", > "BufferData", > @@ -825,6 +830,7 @@ functions = [ > "GetFramebufferAttachmentParameteriv", > "GetFramebufferAttachmentParameterivEXT", > "GetFramebufferParameteriv", > +"GetGraphicsResetStatus", > "GetGraphicsResetStatusARB", > "GetHandleARB", > "GetHistogram", > @@ -887,6 +893,7 @@ functions = [ > "GetSamplerParameterIiv", > "GetSamplerParameterIuiv", > "GetSamplerParameterfv", > +"GetSamplerParameteri", That's not a function that's defined anywhere that I can see. Unless I'm somehow obviously wrong, please remove it. Otherwise this patch is Reviewed-by: Ilia Mirkin The other patches in the series appear mechanical and I didn't look at them carefully, but are Acked-by: Ilia Mirkin > "GetSamplerParameteriv", > "GetSeparableFilter", > "GetShaderInfoLog", > @@ -951,8 +958,11 @@ functions = [ > "GetnSeparableFilterARB", > "GetnTexImageARB", > "GetnUniformdvARB", > +"GetnUniformfv", > "GetnUniformfvARB", > +"GetnUniformiv", > "GetnUniformivARB", > +"GetnUniformuiv", > "GetnUniformuivARB", > "Hint", > "Histogram", > @@ -1160,6 +1170,7 @@ functions = [ > "Orthof", > "Orthox", > "PassThrough", > +"PatchParameteri" > "PauseTransformFeedback", > "PixelMapfv", > "PixelMapuiv", > @@ -1191,6 +1202,7 @@ functions = [ > "PopDebugGroup", > "PopMatrix", > "PopName", > +"PrimitiveBoundingBox", > "PrimitiveRestartIndex", > "PrimitiveRestartIndexNV", > "PrimitiveRestartNV", > @@ -1274,6 +1286,7 @@ functions = [ > "RasterPos4sv", > "ReadBuffer", > "ReadPixels", > +"ReadnPixels", > "ReadnPixelsARB", > "Rectd", > "Rectdv", > -- > 2.10.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
[Mesa-dev] [PATCH v3 1/3] mapi: retab static_data.py to be consistent
This file currently uses a mixture of 3 and 4 space indent. I have changed it all to 4 space indent, matching the settings in $ROOT/.editorconfig. Signed-off-by: Dylan Baker--- src/mapi/glapi/gen/static_data.py | 2570 ++--- 1 file changed, 1285 insertions(+), 1285 deletions(-) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index b25dab1..396f941 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -436,1291 +436,1291 @@ offsets = { } functions = [ - "Accum", - "ActiveShaderProgram", - "ActiveTexture", - "ActiveTextureARB", - "AlphaFunc", - "AlphaFuncx", - "AreTexturesResident", - "AreTexturesResidentEXT", - "ArrayElement", - "ArrayElementEXT", - "AttachObjectARB", - "AttachShader", - "Begin", - "BeginConditionalRender", - "BeginConditionalRenderNV", - "BeginQuery", - "BeginQueryARB", - "BeginQueryIndexed", - "BeginTransformFeedback", - "BindAttribLocation", - "BindAttribLocationARB", - "BindBuffer", - "BindBufferARB", - "BindBufferBase", - "BindBufferRange", - "BindBuffersBase", - "BindBuffersRange", - "BindFragDataLocation", - "BindFragDataLocationEXT", - "BindFragDataLocationIndexed", - "BindFramebuffer", - "BindFramebufferEXT", - "BindImageTexture", - "BindImageTextures", - "BindProgramARB", - "BindProgramPipeline", - "BindRenderbuffer", - "BindRenderbufferEXT", - "BindSampler", - "BindSamplers", - "BindTexture", - "BindTextureEXT", - "BindTextures", - "BindTransformFeedback", - "BindVertexArray", - "BindVertexBuffer", - "BindVertexBuffers", - "Bitmap", - "BlendColor", - "BlendColorEXT", - "BlendEquation", - "BlendEquationEXT", - "BlendEquationiARB", - "BlendEquationSeparate", - "BlendEquationSeparateiARB", - "BlendFunc", - "BlendFunciARB", - "BlendFuncSeparate", - "BlendFuncSeparateEXT", - "BlendFuncSeparateiARB", - "BlitFramebuffer", - "BufferData", - "BufferDataARB", - "BufferStorage", - "BufferSubData", - "BufferSubDataARB", - "CallList", - "CallLists", - "CheckFramebufferStatus", - "CheckFramebufferStatusEXT", - "ClampColor", - "ClampColorARB", - "Clear", - "ClearAccum", - "ClearBufferData", - "ClearBufferfi", - "ClearBufferfv", - "ClearBufferiv", - "ClearBufferSubData", - "ClearBufferuiv", - "ClearColor", - "ClearColorIiEXT", - "ClearColorIuiEXT", - "ClearColorx", - "ClearDepth", - "ClearDepthf", - "ClearDepthx", - "ClearIndex", - "ClearStencil", - "ClearTexImage", - "ClearTexSubImage", - "ClientActiveTexture", - "ClientActiveTextureARB", - "ClientWaitSync", - "ClipPlane", - "ClipPlanef", - "ClipPlanex", - "Color3b", - "Color3bv", - "Color3d", - "Color3dv", - "Color3f", - "Color3fv", - "Color3i", - "Color3iv", - "Color3s", - "Color3sv", - "Color3ub", - "Color3ubv", - "Color3ui", - "Color3uiv", - "Color3us", - "Color3usv", - "Color4b", - "Color4bv", - "Color4d", - "Color4dv", - "Color4f", - "Color4fv", - "Color4i", - "Color4iv", - "Color4s", - "Color4sv", - "Color4ub", - "Color4ubv", - "Color4ui", - "Color4uiv", - "Color4us", - "Color4usv", - "Color4x", - "ColorMask", - "ColorMaski", - "ColorMaskIndexedEXT", - "ColorMaterial", - "ColorP3ui", - "ColorP3uiv", - "ColorP4ui", - "ColorP4uiv", - "ColorPointer", - "ColorPointerEXT", - "ColorSubTable", - "ColorTable", - "ColorTableParameterfv", - "ColorTableParameteriv", - "CompileShader", - "CompileShaderARB", - "CompressedTexImage1D", - "CompressedTexImage1DARB", - "CompressedTexImage2D", - "CompressedTexImage2DARB", - "CompressedTexImage3D", - "CompressedTexImage3DARB", - "CompressedTexSubImage1D", - "CompressedTexSubImage1DARB", - "CompressedTexSubImage2D", - "CompressedTexSubImage2DARB", - "CompressedTexSubImage3D", - "CompressedTexSubImage3DARB", - "ConvolutionFilter1D", - "ConvolutionFilter2D", - "ConvolutionParameterf", - "ConvolutionParameterfv", - "ConvolutionParameteri", - "ConvolutionParameteriv", - "CopyBufferSubData", - "CopyColorSubTable", - "CopyColorTable", - "CopyConvolutionFilter1D", - "CopyConvolutionFilter2D", - "CopyImageSubData", - "CopyPixels", - "CopyTexImage1D", - "CopyTexImage2D", - "CopyTexSubImage1D", - "CopyTexSubImage2D", - "CopyTexSubImage3D", - "CopyTexSubImage3DEXT", - "CreateProgram", - "CreateProgramObjectARB", - "CreateShader", - "CreateShaderObjectARB", - "CreateShaderProgramv", - "CullFace", - "DebugMessageCallback", - "DebugMessageCallbackARB", - "DebugMessageControl", - "DebugMessageControlARB", - "DebugMessageInsert", - "DebugMessageInsertARB", - "DeleteBuffers", - "DeleteBuffersARB", - "DeleteFramebuffers", - "DeleteFramebuffersEXT", - "DeleteLists", - "DeleteObjectARB", - "DeleteProgram",
[Mesa-dev] [PATCH v3 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
See commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of this commit. Signed-off-by: Dylan Baker--- Changes since v2: Re-sort the whole list, and remove duplicates, which there were several. I've also checked that there are no duplicates by importing the list in python and asserting that len(functions) == len(set(functions)), since set() will drop duplicates. src/mapi/glapi/gen/static_data.py | 13 + 1 file changed, 13 insertions(+) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index bb11c1d..6aa1716 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -484,17 +484,22 @@ functions = [ "BindVertexBuffer", "BindVertexBuffers", "Bitmap", +"BlendBarrier", "BlendColor", "BlendColorEXT", "BlendEquation", "BlendEquationEXT", "BlendEquationSeparate", +"BlendEquationSeparatei", "BlendEquationSeparateiARB", +"BlendEquationi", "BlendEquationiARB", "BlendFunc", "BlendFuncSeparate", "BlendFuncSeparateEXT", +"BlendFuncSeparatei", "BlendFuncSeparateiARB", +"BlendFunci", "BlendFunciARB", "BlitFramebuffer", "BufferData", @@ -825,6 +830,7 @@ functions = [ "GetFramebufferAttachmentParameteriv", "GetFramebufferAttachmentParameterivEXT", "GetFramebufferParameteriv", +"GetGraphicsResetStatus", "GetGraphicsResetStatusARB", "GetHandleARB", "GetHistogram", @@ -887,6 +893,7 @@ functions = [ "GetSamplerParameterIiv", "GetSamplerParameterIuiv", "GetSamplerParameterfv", +"GetSamplerParameteri", "GetSamplerParameteriv", "GetSeparableFilter", "GetShaderInfoLog", @@ -951,8 +958,11 @@ functions = [ "GetnSeparableFilterARB", "GetnTexImageARB", "GetnUniformdvARB", +"GetnUniformfv", "GetnUniformfvARB", +"GetnUniformiv", "GetnUniformivARB", +"GetnUniformuiv", "GetnUniformuivARB", "Hint", "Histogram", @@ -1160,6 +1170,7 @@ functions = [ "Orthof", "Orthox", "PassThrough", +"PatchParameteri" "PauseTransformFeedback", "PixelMapfv", "PixelMapuiv", @@ -1191,6 +1202,7 @@ functions = [ "PopDebugGroup", "PopMatrix", "PopName", +"PrimitiveBoundingBox", "PrimitiveRestartIndex", "PrimitiveRestartIndexNV", "PrimitiveRestartNV", @@ -1274,6 +1286,7 @@ functions = [ "RasterPos4sv", "ReadBuffer", "ReadPixels", +"ReadnPixels", "ReadnPixelsARB", "Rectd", "Rectdv", -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v3 2/3] mapi: sort static_data.py functions
Signed-off-by: Dylan Baker--- src/mapi/glapi/gen/static_data.py | 164 +++--- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index 396f941..bb11c1d 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -488,14 +488,14 @@ functions = [ "BlendColorEXT", "BlendEquation", "BlendEquationEXT", -"BlendEquationiARB", "BlendEquationSeparate", "BlendEquationSeparateiARB", +"BlendEquationiARB", "BlendFunc", -"BlendFunciARB", "BlendFuncSeparate", "BlendFuncSeparateEXT", "BlendFuncSeparateiARB", +"BlendFunciARB", "BlitFramebuffer", "BufferData", "BufferDataARB", @@ -511,10 +511,10 @@ functions = [ "Clear", "ClearAccum", "ClearBufferData", +"ClearBufferSubData", "ClearBufferfi", "ClearBufferfv", "ClearBufferiv", -"ClearBufferSubData", "ClearBufferuiv", "ClearColor", "ClearColorIiEXT", @@ -567,8 +567,8 @@ functions = [ "Color4usv", "Color4x", "ColorMask", -"ColorMaski", "ColorMaskIndexedEXT", +"ColorMaski", "ColorMaterial", "ColorP3ui", "ColorP3uiv", @@ -649,17 +649,17 @@ functions = [ "DepthMask", "DepthRange", "DepthRangeArrayv", -"DepthRangef", "DepthRangeIndexed", +"DepthRangef", "DepthRangex", "DetachObjectARB", "DetachShader", "Disable", "DisableClientState", -"Disablei", "DisableIndexedEXT", "DisableVertexAttribArray", "DisableVertexAttribArrayARB", +"Disablei", "DispatchCompute", "DispatchComputeIndirect", "DrawArrays", @@ -696,10 +696,10 @@ functions = [ "EdgeFlagv", "Enable", "EnableClientState", -"Enablei", "EnableIndexedEXT", "EnableVertexAttribArray", "EnableVertexAttribArrayARB", +"Enablei", "End", "EndConditionalRender", "EndConditionalRenderNV", @@ -725,6 +725,8 @@ functions = [ "Finish", "Flush", "FlushMappedBufferRange", +"FogCoordPointer", +"FogCoordPointerEXT", "FogCoordd", "FogCoorddEXT", "FogCoorddv", @@ -733,8 +735,6 @@ functions = [ "FogCoordfEXT", "FogCoordfv", "FogCoordfvEXT", -"FogCoordPointer", -"FogCoordPointerEXT", "Fogf", "Fogfv", "Fogi", @@ -761,8 +761,6 @@ functions = [ "Frustumx", "GenBuffers", "GenBuffersARB", -"GenerateMipmap", -"GenerateMipmapEXT", "GenFramebuffers", "GenFramebuffersEXT", "GenLists", @@ -777,13 +775,15 @@ functions = [ "GenTexturesEXT", "GenTransformFeedbacks", "GenVertexArrays", +"GenerateMipmap", +"GenerateMipmapEXT", "GetActiveAtomicCounterBufferiv", "GetActiveAttrib", "GetActiveAttribARB", "GetActiveUniform", "GetActiveUniformARB", -"GetActiveUniformBlockiv", "GetActiveUniformBlockName", +"GetActiveUniformBlockiv", "GetActiveUniformName", "GetActiveUniformsiv", "GetAttachedObjectsARB", @@ -849,24 +849,6 @@ functions = [ "GetMinmaxParameterfv", "GetMinmaxParameteriv", "GetMultisamplefv", -"GetnColorTableARB", -"GetnCompressedTexImageARB", -"GetnConvolutionFilterARB", -"GetnHistogramARB", -"GetnMapdvARB", -"GetnMapfvARB", -"GetnMapivARB", -"GetnMinmaxARB", -"GetnPixelMapfvARB", -"GetnPixelMapuivARB", -"GetnPixelMapusvARB", -"GetnPolygonStippleARB", -"GetnSeparableFilterARB", -"GetnTexImageARB", -"GetnUniformdvARB", -"GetnUniformfvARB", -"GetnUniformivARB", -"GetnUniformuivARB", "GetObjectLabel", "GetObjectParameterfvARB", "GetObjectParameterivARB", @@ -882,36 +864,36 @@ functions = [ "GetProgramEnvParameterfvARB", "GetProgramInfoLog", "GetProgramInterfaceiv", -"GetProgramiv", -"GetProgramivARB", "GetProgramLocalParameterdvARB", "GetProgramLocalParameterfvARB", "GetProgramPipelineInfoLog", "GetProgramPipelineiv", "GetProgramResourceIndex", -"GetProgramResourceiv", "GetProgramResourceLocation", "GetProgramResourceName", +"GetProgramResourceiv", "GetProgramStringARB", +"GetProgramiv", +"GetProgramivARB", "GetQueryIndexediv", -"GetQueryiv", -"GetQueryivARB", "GetQueryObjectiv", "GetQueryObjectivARB", "GetQueryObjectuiv", "GetQueryObjectuivARB", +"GetQueryiv", +"GetQueryivARB", "GetRenderbufferParameteriv", "GetRenderbufferParameterivEXT", -"GetSamplerParameterfv", "GetSamplerParameterIiv", "GetSamplerParameterIuiv", +"GetSamplerParameterfv", "GetSamplerParameteriv", "GetSeparableFilter", "GetShaderInfoLog", -"GetShaderiv", "GetShaderPrecisionFormat", "GetShaderSource", "GetShaderSourceARB", +"GetShaderiv",
Re: [Mesa-dev] [PATCH v3 3/7] intel/isl: Add support for 1-D compressed textures
On Sep 22, 2016 11:11 PM, "Nanley Chery"wrote: > > On Wed, Sep 14, 2016 at 01:28:23PM -0700, Jason Ekstrand wrote: > > Compressed 1-D textures are a well-defined thing in both GL and Vulkan. > > Could you provide a reference? I could not find any documentation on 1D > compressed textures. Instead I found that OpenGL disallows them and > Vulkan does not explicitly mention them. In OpenGL CompressedTexImage1D > returns INVALID_ENUM for ASTC, LATC, S3TC, RGTC, BPTC, and FXT1. The same > return value is implied for ASTC. In Vulkan, drivers are required to > support one of the following: BPTC for 2D and 3D images, ASTC LDR for 2D > images, or ETC2 and EAC for 2D images. OK, so they don't normally exist... > Our HW also doesn't support this. RENDER_SURFACE_STATE says: > * This field cannot be a compressed (BC*, DXT*, FXT*, ETC*, EAC*) format > if the Surface Type is SURFTYPE_1D. > * This field cannot be ASTC format if the Surface Type is SURFTYPE_1D. Right. Maybe assert in surface state setup about that. > I retract my earlier review feedback - the isl_*_gen9_1d functions > should not be updated because ISL_DIM_LAYOUT_GEN9_1D compressed > textures cannot exist. > > > > > v2: Fix some asserts (Nanley) > > > > Signed-off-by: Jason Ekstrand > > --- > > src/intel/isl/isl.c | 12 +++- > > 1 file changed, 7 insertions(+), 5 deletions(-) > > > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > > index a75fddf..710c990 100644 > > --- a/src/intel/isl/isl.c > > +++ b/src/intel/isl/isl.c > > @@ -518,7 +518,6 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev, > >assert(info->height == 1); > >assert(info->depth == 1); > >assert(info->samples == 1); > > - assert(!isl_format_is_compressed(info->format)); > > If you'd like to make this change for HiZ, I think we should keep this > assert and OR in a requirement that the format or tiling is HiZ. Eh... We also need it for CCS (both gen9 compression and fast clears) and I think the calculations are fairly well-defined. I don't see why we shouldn't just allow it in the calculation code. It wouldn't hurt to have an assert somewhere that prevents creating "normal" compressed 1D surfaces. As I said above, maybe assert in the surface state setup code or something. --Jason > -Nanley > > > > >switch (dim_layout) { > >case ISL_DIM_LAYOUT_GEN4_3D: > > @@ -527,8 +526,8 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev, > >case ISL_DIM_LAYOUT_GEN9_1D: > >case ISL_DIM_LAYOUT_GEN4_2D: > > *phys_level0_sa = (struct isl_extent4d) { > > -.w = info->width, > > -.h = 1, > > +.w = isl_align_npot(info->width, fmtl->bw), > > +.h = fmtl->bh, > > .d = 1, > > .a = info->array_len, > > }; > > @@ -757,7 +756,7 @@ isl_calc_phys_slice0_extent_sa_gen9_1d( > > { > > MAYBE_UNUSED const struct isl_format_layout *fmtl = isl_format_get_layout(info->format); > > > > - assert(phys_level0_sa->height == 1); > > + assert(phys_level0_sa->height == fmtl->bh); > > assert(phys_level0_sa->depth == 1); > > assert(info->samples == 1); > > assert(image_align_sa->w >= fmtl->bw); > > @@ -1567,9 +1566,12 @@ get_image_offset_sa_gen9_1d(const struct isl_surf *surf, > > uint32_t *x_offset_sa, > > uint32_t *y_offset_sa) > > { > > + MAYBE_UNUSED const struct isl_format_layout *fmtl = > > + isl_format_get_layout(surf->format); > > + > > assert(level < surf->levels); > > assert(layer < surf->phys_level0_sa.array_len); > > - assert(surf->phys_level0_sa.height == 1); > > + assert(surf->phys_level0_sa.height == fmtl->bh); > > assert(surf->phys_level0_sa.depth == 1); > > assert(surf->samples == 1); > > > > -- > > 2.5.0.400.gff86faf > > > > ___ > > 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 v2 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
Quoting Ilia Mirkin (2016-09-22 13:21:04) > On Thu, Sep 22, 2016 at 4:17 PM, Dylan Bakerwrote: > > Quoting Ilia Mirkin (2016-09-22 12:59:49) > >> On Thu, Sep 22, 2016 at 3:56 PM, Dylan Baker wrote: > >> > @@ -1305,6 +1318,7 @@ functions = [ > >> > "SamplerParameterfv", > >> > "SamplerParameteri", > >> > "SamplerParameteriv", > >> > +"SamplerParameterIiv", > >> > "Scaled", > >> > "Scalef", > >> > "Scalex", > >> > >> This is the case for a couple of these... how is this happening? In > >> the current file, I see: > >> > >>"SamplerParameterf", > >>"SamplerParameterfv", > >>"SamplerParameteri", > >>"SamplerParameterIiv", > >>"SamplerParameterIuiv", > >>"SamplerParameteriv", > >> > >> Did you accidentally drop it? Where is the Iuiv version? [Same for a > >> couple other ones.] > > > > It was in there before I wrote this patch > > But then again, so was SamplerParameterIiv and yet you appear to be > adding it... what happened? You're right. What the heck? 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 v2 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
On Thu, Sep 22, 2016 at 4:17 PM, Dylan Bakerwrote: > Quoting Ilia Mirkin (2016-09-22 12:59:49) >> On Thu, Sep 22, 2016 at 3:56 PM, Dylan Baker wrote: >> > @@ -1305,6 +1318,7 @@ functions = [ >> > "SamplerParameterfv", >> > "SamplerParameteri", >> > "SamplerParameteriv", >> > +"SamplerParameterIiv", >> > "Scaled", >> > "Scalef", >> > "Scalex", >> >> This is the case for a couple of these... how is this happening? In >> the current file, I see: >> >>"SamplerParameterf", >>"SamplerParameterfv", >>"SamplerParameteri", >>"SamplerParameterIiv", >>"SamplerParameterIuiv", >>"SamplerParameteriv", >> >> Did you accidentally drop it? Where is the Iuiv version? [Same for a >> couple other ones.] > > It was in there before I wrote this patch But then again, so was SamplerParameterIiv and yet you appear to be adding it... what happened? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [AppVeyor] mesa master #2239 completed
Build mesa 2239 completed Commit 36f0f03182 by Eric Anholt on 9/7/2016 2:45 AM: nir: Allow opt_peephole_sel to be more aggressive in flattening IFs.\n\nVC4 was running into a major performance regression from enabling control\nflow in the glmark2 conditionals test, because of short if statements\ncontaining an ffract.\n\nThis pass seems like it was was trying to ensure that we only flattened\nIFs that should be entirely a win by guaranteeing that there would be\nfewer bcsels than there were MOVs otherwise. However, if the number of\nALU ops is small, we can avoid the overhead of branching (which itself\ncosts cycles) and still get a win, even if it means moving real\ninstructions out of the THEN/ELSE blocks.\n\nFor now, just turn on aggressive flattening on vc4. i965 will need some\ntuning to avoid regressions. It does looks like this may be useful to\nreplace freedreno code.\n\nImproves glmark2 -b conditionals:fragment-steps=5:vertex-steps=0 from 47\nfps to 95 fps on vc4.\n\nvc4 shader-db:\ntotal instructions in shared programs: 101282 -> 99543 (-1.72%)\ninstructions in affected programs: 17365 -> 15626 (-10.01%)\ntotal uniforms in shared programs: 31295 -> 31172 (-0.39%)\nuniforms in affected programs: 3580 -> 3457 (-3.44%)\ntotal estimated cycles in shared programs: 225182 -> 223746 (-0.64%)\nestimated cycles in affected programs: 26085 -> 24649 (-5.51%)\n\nv2: Update shader-db output.\n\nReviewed-by: Ian Romanick(v1) Configure your notification preferences ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
Quoting Ilia Mirkin (2016-09-22 12:59:49) > On Thu, Sep 22, 2016 at 3:56 PM, Dylan Bakerwrote: > > @@ -1305,6 +1318,7 @@ functions = [ > > "SamplerParameterfv", > > "SamplerParameteri", > > "SamplerParameteriv", > > +"SamplerParameterIiv", > > "Scaled", > > "Scalef", > > "Scalex", > > This is the case for a couple of these... how is this happening? In > the current file, I see: > >"SamplerParameterf", >"SamplerParameterfv", >"SamplerParameteri", >"SamplerParameterIiv", >"SamplerParameterIuiv", >"SamplerParameteriv", > > Did you accidentally drop it? Where is the Iuiv version? [Same for a > couple other ones.] It was in there before I wrote this patch I generated the list of extensions by greping for 'es2="3.2"' in src/mapi/glapi/gen, and then checking that against the extension specs listed on mesamatrix. When I generated that I came up with 44 new functions, but the majority of them were already in that list. It looks like that one in particular was added in d9be1db4b69a04f58a951351051ef9798d55da98, I suspect we'll find most of them were added in that commit. 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 v3 3/7] intel/isl: Add support for 1-D compressed textures
On Wed, Sep 14, 2016 at 01:28:23PM -0700, Jason Ekstrand wrote: > Compressed 1-D textures are a well-defined thing in both GL and Vulkan. Could you provide a reference? I could not find any documentation on 1D compressed textures. Instead I found that OpenGL disallows them and Vulkan does not explicitly mention them. In OpenGL CompressedTexImage1D returns INVALID_ENUM for ASTC, LATC, S3TC, RGTC, BPTC, and FXT1. The same return value is implied for ASTC. In Vulkan, drivers are required to support one of the following: BPTC for 2D and 3D images, ASTC LDR for 2D images, or ETC2 and EAC for 2D images. Our HW also doesn't support this. RENDER_SURFACE_STATE says: * This field cannot be a compressed (BC*, DXT*, FXT*, ETC*, EAC*) format if the Surface Type is SURFTYPE_1D. * This field cannot be ASTC format if the Surface Type is SURFTYPE_1D. I retract my earlier review feedback - the isl_*_gen9_1d functions should not be updated because ISL_DIM_LAYOUT_GEN9_1D compressed textures cannot exist. > > v2: Fix some asserts (Nanley) > > Signed-off-by: Jason Ekstrand> --- > src/intel/isl/isl.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > index a75fddf..710c990 100644 > --- a/src/intel/isl/isl.c > +++ b/src/intel/isl/isl.c > @@ -518,7 +518,6 @@ isl_calc_phys_level0_extent_sa(const struct isl_device > *dev, >assert(info->height == 1); >assert(info->depth == 1); >assert(info->samples == 1); > - assert(!isl_format_is_compressed(info->format)); If you'd like to make this change for HiZ, I think we should keep this assert and OR in a requirement that the format or tiling is HiZ. -Nanley > >switch (dim_layout) { >case ISL_DIM_LAYOUT_GEN4_3D: > @@ -527,8 +526,8 @@ isl_calc_phys_level0_extent_sa(const struct isl_device > *dev, >case ISL_DIM_LAYOUT_GEN9_1D: >case ISL_DIM_LAYOUT_GEN4_2D: > *phys_level0_sa = (struct isl_extent4d) { > -.w = info->width, > -.h = 1, > +.w = isl_align_npot(info->width, fmtl->bw), > +.h = fmtl->bh, > .d = 1, > .a = info->array_len, > }; > @@ -757,7 +756,7 @@ isl_calc_phys_slice0_extent_sa_gen9_1d( > { > MAYBE_UNUSED const struct isl_format_layout *fmtl = > isl_format_get_layout(info->format); > > - assert(phys_level0_sa->height == 1); > + assert(phys_level0_sa->height == fmtl->bh); > assert(phys_level0_sa->depth == 1); > assert(info->samples == 1); > assert(image_align_sa->w >= fmtl->bw); > @@ -1567,9 +1566,12 @@ get_image_offset_sa_gen9_1d(const struct isl_surf > *surf, > uint32_t *x_offset_sa, > uint32_t *y_offset_sa) > { > + MAYBE_UNUSED const struct isl_format_layout *fmtl = > + isl_format_get_layout(surf->format); > + > assert(level < surf->levels); > assert(layer < surf->phys_level0_sa.array_len); > - assert(surf->phys_level0_sa.height == 1); > + assert(surf->phys_level0_sa.height == fmtl->bh); > assert(surf->phys_level0_sa.depth == 1); > assert(surf->samples == 1); > > -- > 2.5.0.400.gff86faf > > ___ > 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 v2 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
On Thu, Sep 22, 2016 at 3:56 PM, Dylan Bakerwrote: > @@ -1305,6 +1318,7 @@ functions = [ > "SamplerParameterfv", > "SamplerParameteri", > "SamplerParameteriv", > +"SamplerParameterIiv", > "Scaled", > "Scalef", > "Scalex", This is the case for a couple of these... how is this happening? In the current file, I see: "SamplerParameterf", "SamplerParameterfv", "SamplerParameteri", "SamplerParameterIiv", "SamplerParameterIuiv", "SamplerParameteriv", Did you accidentally drop it? Where is the Iuiv version? [Same for a couple other ones.] ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v2 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
See commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of this commit. Signed-off-by: Dylan Baker--- v2: - fix TexBufferRange typo (Ilia) - Remove duplicate TexParameterIuiv src/mapi/glapi/gen/static_data.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index bb11c1d..e355a95 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -484,17 +484,22 @@ functions = [ "BindVertexBuffer", "BindVertexBuffers", "Bitmap", +"BlendBarrier", "BlendColor", "BlendColorEXT", "BlendEquation", "BlendEquationEXT", "BlendEquationSeparate", +"BlendEquationSeparatei", "BlendEquationSeparateiARB", +"BlendEquationi", "BlendEquationiARB", "BlendFunc", "BlendFuncSeparate", "BlendFuncSeparateEXT", +"BlendFuncSeparatei", "BlendFuncSeparateiARB", +"BlendFunci", "BlendFunciARB", "BlitFramebuffer", "BufferData", @@ -825,6 +830,7 @@ functions = [ "GetFramebufferAttachmentParameteriv", "GetFramebufferAttachmentParameterivEXT", "GetFramebufferParameteriv", +"GetGraphicsResetStatus", "GetGraphicsResetStatusARB", "GetHandleARB", "GetHistogram", @@ -887,6 +893,7 @@ functions = [ "GetSamplerParameterIiv", "GetSamplerParameterIuiv", "GetSamplerParameterfv", +"GetSamplerParameteri", "GetSamplerParameteriv", "GetSeparableFilter", "GetShaderInfoLog", @@ -951,8 +958,11 @@ functions = [ "GetnSeparableFilterARB", "GetnTexImageARB", "GetnUniformdvARB", +"GetnUniformfv", "GetnUniformfvARB", +"GetnUniformiv", "GetnUniformivARB", +"GetnUniformuiv", "GetnUniformuivARB", "Hint", "Histogram", @@ -1160,6 +1170,7 @@ functions = [ "Orthof", "Orthox", "PassThrough", +"PatchParameteri" "PauseTransformFeedback", "PixelMapfv", "PixelMapuiv", @@ -1191,6 +1202,7 @@ functions = [ "PopDebugGroup", "PopMatrix", "PopName", +"PrimitiveBoundingBox", "PrimitiveRestartIndex", "PrimitiveRestartIndexNV", "PrimitiveRestartNV", @@ -1274,6 +1286,7 @@ functions = [ "RasterPos4sv", "ReadBuffer", "ReadPixels", +"ReadnPixels", "ReadnPixelsARB", "Rectd", "Rectdv", @@ -1305,6 +1318,7 @@ functions = [ "SamplerParameterfv", "SamplerParameteri", "SamplerParameteriv", +"SamplerParameterIiv", "Scaled", "Scalef", "Scalex", @@ -1442,6 +1456,7 @@ functions = [ "TexSubImage2D", "TexSubImage3D", "TexSubImage3DEXT", +"TexBufferRange", "TextureBarrierNV", "TextureStorage1DEXT", "TextureStorage2DEXT", -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v2 2/3] mapi: sort static_data.py functions
Signed-off-by: Dylan Baker--- src/mapi/glapi/gen/static_data.py | 164 +++--- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index 396f941..bb11c1d 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -488,14 +488,14 @@ functions = [ "BlendColorEXT", "BlendEquation", "BlendEquationEXT", -"BlendEquationiARB", "BlendEquationSeparate", "BlendEquationSeparateiARB", +"BlendEquationiARB", "BlendFunc", -"BlendFunciARB", "BlendFuncSeparate", "BlendFuncSeparateEXT", "BlendFuncSeparateiARB", +"BlendFunciARB", "BlitFramebuffer", "BufferData", "BufferDataARB", @@ -511,10 +511,10 @@ functions = [ "Clear", "ClearAccum", "ClearBufferData", +"ClearBufferSubData", "ClearBufferfi", "ClearBufferfv", "ClearBufferiv", -"ClearBufferSubData", "ClearBufferuiv", "ClearColor", "ClearColorIiEXT", @@ -567,8 +567,8 @@ functions = [ "Color4usv", "Color4x", "ColorMask", -"ColorMaski", "ColorMaskIndexedEXT", +"ColorMaski", "ColorMaterial", "ColorP3ui", "ColorP3uiv", @@ -649,17 +649,17 @@ functions = [ "DepthMask", "DepthRange", "DepthRangeArrayv", -"DepthRangef", "DepthRangeIndexed", +"DepthRangef", "DepthRangex", "DetachObjectARB", "DetachShader", "Disable", "DisableClientState", -"Disablei", "DisableIndexedEXT", "DisableVertexAttribArray", "DisableVertexAttribArrayARB", +"Disablei", "DispatchCompute", "DispatchComputeIndirect", "DrawArrays", @@ -696,10 +696,10 @@ functions = [ "EdgeFlagv", "Enable", "EnableClientState", -"Enablei", "EnableIndexedEXT", "EnableVertexAttribArray", "EnableVertexAttribArrayARB", +"Enablei", "End", "EndConditionalRender", "EndConditionalRenderNV", @@ -725,6 +725,8 @@ functions = [ "Finish", "Flush", "FlushMappedBufferRange", +"FogCoordPointer", +"FogCoordPointerEXT", "FogCoordd", "FogCoorddEXT", "FogCoorddv", @@ -733,8 +735,6 @@ functions = [ "FogCoordfEXT", "FogCoordfv", "FogCoordfvEXT", -"FogCoordPointer", -"FogCoordPointerEXT", "Fogf", "Fogfv", "Fogi", @@ -761,8 +761,6 @@ functions = [ "Frustumx", "GenBuffers", "GenBuffersARB", -"GenerateMipmap", -"GenerateMipmapEXT", "GenFramebuffers", "GenFramebuffersEXT", "GenLists", @@ -777,13 +775,15 @@ functions = [ "GenTexturesEXT", "GenTransformFeedbacks", "GenVertexArrays", +"GenerateMipmap", +"GenerateMipmapEXT", "GetActiveAtomicCounterBufferiv", "GetActiveAttrib", "GetActiveAttribARB", "GetActiveUniform", "GetActiveUniformARB", -"GetActiveUniformBlockiv", "GetActiveUniformBlockName", +"GetActiveUniformBlockiv", "GetActiveUniformName", "GetActiveUniformsiv", "GetAttachedObjectsARB", @@ -849,24 +849,6 @@ functions = [ "GetMinmaxParameterfv", "GetMinmaxParameteriv", "GetMultisamplefv", -"GetnColorTableARB", -"GetnCompressedTexImageARB", -"GetnConvolutionFilterARB", -"GetnHistogramARB", -"GetnMapdvARB", -"GetnMapfvARB", -"GetnMapivARB", -"GetnMinmaxARB", -"GetnPixelMapfvARB", -"GetnPixelMapuivARB", -"GetnPixelMapusvARB", -"GetnPolygonStippleARB", -"GetnSeparableFilterARB", -"GetnTexImageARB", -"GetnUniformdvARB", -"GetnUniformfvARB", -"GetnUniformivARB", -"GetnUniformuivARB", "GetObjectLabel", "GetObjectParameterfvARB", "GetObjectParameterivARB", @@ -882,36 +864,36 @@ functions = [ "GetProgramEnvParameterfvARB", "GetProgramInfoLog", "GetProgramInterfaceiv", -"GetProgramiv", -"GetProgramivARB", "GetProgramLocalParameterdvARB", "GetProgramLocalParameterfvARB", "GetProgramPipelineInfoLog", "GetProgramPipelineiv", "GetProgramResourceIndex", -"GetProgramResourceiv", "GetProgramResourceLocation", "GetProgramResourceName", +"GetProgramResourceiv", "GetProgramStringARB", +"GetProgramiv", +"GetProgramivARB", "GetQueryIndexediv", -"GetQueryiv", -"GetQueryivARB", "GetQueryObjectiv", "GetQueryObjectivARB", "GetQueryObjectuiv", "GetQueryObjectuivARB", +"GetQueryiv", +"GetQueryivARB", "GetRenderbufferParameteriv", "GetRenderbufferParameterivEXT", -"GetSamplerParameterfv", "GetSamplerParameterIiv", "GetSamplerParameterIuiv", +"GetSamplerParameterfv", "GetSamplerParameteriv", "GetSeparableFilter", "GetShaderInfoLog", -"GetShaderiv", "GetShaderPrecisionFormat", "GetShaderSource", "GetShaderSourceARB", +"GetShaderiv",
[Mesa-dev] [PATCH v2 1/3] mapi: retab static_data.py to be consistent
This file currently uses a mixture of 3 and 4 space indent. I have changed it all to 4 space indent, matching the settings in $ROOT/.editorconfig. Signed-off-by: Dylan Baker--- src/mapi/glapi/gen/static_data.py | 2570 ++--- 1 file changed, 1285 insertions(+), 1285 deletions(-) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index b25dab1..396f941 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -436,1291 +436,1291 @@ offsets = { } functions = [ - "Accum", - "ActiveShaderProgram", - "ActiveTexture", - "ActiveTextureARB", - "AlphaFunc", - "AlphaFuncx", - "AreTexturesResident", - "AreTexturesResidentEXT", - "ArrayElement", - "ArrayElementEXT", - "AttachObjectARB", - "AttachShader", - "Begin", - "BeginConditionalRender", - "BeginConditionalRenderNV", - "BeginQuery", - "BeginQueryARB", - "BeginQueryIndexed", - "BeginTransformFeedback", - "BindAttribLocation", - "BindAttribLocationARB", - "BindBuffer", - "BindBufferARB", - "BindBufferBase", - "BindBufferRange", - "BindBuffersBase", - "BindBuffersRange", - "BindFragDataLocation", - "BindFragDataLocationEXT", - "BindFragDataLocationIndexed", - "BindFramebuffer", - "BindFramebufferEXT", - "BindImageTexture", - "BindImageTextures", - "BindProgramARB", - "BindProgramPipeline", - "BindRenderbuffer", - "BindRenderbufferEXT", - "BindSampler", - "BindSamplers", - "BindTexture", - "BindTextureEXT", - "BindTextures", - "BindTransformFeedback", - "BindVertexArray", - "BindVertexBuffer", - "BindVertexBuffers", - "Bitmap", - "BlendColor", - "BlendColorEXT", - "BlendEquation", - "BlendEquationEXT", - "BlendEquationiARB", - "BlendEquationSeparate", - "BlendEquationSeparateiARB", - "BlendFunc", - "BlendFunciARB", - "BlendFuncSeparate", - "BlendFuncSeparateEXT", - "BlendFuncSeparateiARB", - "BlitFramebuffer", - "BufferData", - "BufferDataARB", - "BufferStorage", - "BufferSubData", - "BufferSubDataARB", - "CallList", - "CallLists", - "CheckFramebufferStatus", - "CheckFramebufferStatusEXT", - "ClampColor", - "ClampColorARB", - "Clear", - "ClearAccum", - "ClearBufferData", - "ClearBufferfi", - "ClearBufferfv", - "ClearBufferiv", - "ClearBufferSubData", - "ClearBufferuiv", - "ClearColor", - "ClearColorIiEXT", - "ClearColorIuiEXT", - "ClearColorx", - "ClearDepth", - "ClearDepthf", - "ClearDepthx", - "ClearIndex", - "ClearStencil", - "ClearTexImage", - "ClearTexSubImage", - "ClientActiveTexture", - "ClientActiveTextureARB", - "ClientWaitSync", - "ClipPlane", - "ClipPlanef", - "ClipPlanex", - "Color3b", - "Color3bv", - "Color3d", - "Color3dv", - "Color3f", - "Color3fv", - "Color3i", - "Color3iv", - "Color3s", - "Color3sv", - "Color3ub", - "Color3ubv", - "Color3ui", - "Color3uiv", - "Color3us", - "Color3usv", - "Color4b", - "Color4bv", - "Color4d", - "Color4dv", - "Color4f", - "Color4fv", - "Color4i", - "Color4iv", - "Color4s", - "Color4sv", - "Color4ub", - "Color4ubv", - "Color4ui", - "Color4uiv", - "Color4us", - "Color4usv", - "Color4x", - "ColorMask", - "ColorMaski", - "ColorMaskIndexedEXT", - "ColorMaterial", - "ColorP3ui", - "ColorP3uiv", - "ColorP4ui", - "ColorP4uiv", - "ColorPointer", - "ColorPointerEXT", - "ColorSubTable", - "ColorTable", - "ColorTableParameterfv", - "ColorTableParameteriv", - "CompileShader", - "CompileShaderARB", - "CompressedTexImage1D", - "CompressedTexImage1DARB", - "CompressedTexImage2D", - "CompressedTexImage2DARB", - "CompressedTexImage3D", - "CompressedTexImage3DARB", - "CompressedTexSubImage1D", - "CompressedTexSubImage1DARB", - "CompressedTexSubImage2D", - "CompressedTexSubImage2DARB", - "CompressedTexSubImage3D", - "CompressedTexSubImage3DARB", - "ConvolutionFilter1D", - "ConvolutionFilter2D", - "ConvolutionParameterf", - "ConvolutionParameterfv", - "ConvolutionParameteri", - "ConvolutionParameteriv", - "CopyBufferSubData", - "CopyColorSubTable", - "CopyColorTable", - "CopyConvolutionFilter1D", - "CopyConvolutionFilter2D", - "CopyImageSubData", - "CopyPixels", - "CopyTexImage1D", - "CopyTexImage2D", - "CopyTexSubImage1D", - "CopyTexSubImage2D", - "CopyTexSubImage3D", - "CopyTexSubImage3DEXT", - "CreateProgram", - "CreateProgramObjectARB", - "CreateShader", - "CreateShaderObjectARB", - "CreateShaderProgramv", - "CullFace", - "DebugMessageCallback", - "DebugMessageCallbackARB", - "DebugMessageControl", - "DebugMessageControlARB", - "DebugMessageInsert", - "DebugMessageInsertARB", - "DeleteBuffers", - "DeleteBuffersARB", - "DeleteFramebuffers", - "DeleteFramebuffersEXT", - "DeleteLists", - "DeleteObjectARB", - "DeleteProgram",
Re: [Mesa-dev] [PATCH 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
Quoting Ilia Mirkin (2016-09-22 11:57:14) > 2016-09-22 14:53 GMT-04:00 Dylan Baker: > > See commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of > > this commit. > > > > Signed-off-by: Dylan Baker > > --- > > src/mapi/glapi/gen/static_data.py | 16 > > 1 file changed, 16 insertions(+) > > > > diff --git a/src/mapi/glapi/gen/static_data.py > > b/src/mapi/glapi/gen/static_data.py > > index bb11c1d..fa63ab5 100644 > > --- a/src/mapi/glapi/gen/static_data.py > > +++ b/src/mapi/glapi/gen/static_data.py > > @@ -484,17 +484,22 @@ functions = [ > > "BindVertexBuffer", > > "BindVertexBuffers", > > "Bitmap", > > +"BlendBarrier", > > "BlendColor", > > "BlendColorEXT", > > "BlendEquation", > > "BlendEquationEXT", > > "BlendEquationSeparate", > > +"BlendEquationSeparatei", > > "BlendEquationSeparateiARB", > > +"BlendEquationi", > > "BlendEquationiARB", > > "BlendFunc", > > "BlendFuncSeparate", > > "BlendFuncSeparateEXT", > > +"BlendFuncSeparatei", > > "BlendFuncSeparateiARB", > > +"BlendFunci", > > "BlendFunciARB", > > "BlitFramebuffer", > > "BufferData", > > @@ -825,6 +830,7 @@ functions = [ > > "GetFramebufferAttachmentParameteriv", > > "GetFramebufferAttachmentParameterivEXT", > > "GetFramebufferParameteriv", > > +"GetGraphicsResetStatus", > > "GetGraphicsResetStatusARB", > > "GetHandleARB", > > "GetHistogram", > > @@ -887,6 +893,7 @@ functions = [ > > "GetSamplerParameterIiv", > > "GetSamplerParameterIuiv", > > "GetSamplerParameterfv", > > +"GetSamplerParameteri", > > "GetSamplerParameteriv", > > "GetSeparableFilter", > > "GetShaderInfoLog", > > @@ -951,8 +958,11 @@ functions = [ > > "GetnSeparableFilterARB", > > "GetnTexImageARB", > > "GetnUniformdvARB", > > +"GetnUniformfv", > > "GetnUniformfvARB", > > +"GetnUniformiv", > > "GetnUniformivARB", > > +"GetnUniformuiv", > > "GetnUniformuivARB", > > "Hint", > > "Histogram", > > @@ -1160,6 +1170,7 @@ functions = [ > > "Orthof", > > "Orthox", > > "PassThrough", > > +"PatchParameteri" > > "PauseTransformFeedback", > > "PixelMapfv", > > "PixelMapuiv", > > @@ -1191,6 +1202,7 @@ functions = [ > > "PopDebugGroup", > > "PopMatrix", > > "PopName", > > +"PrimitiveBoundingBox", > > "PrimitiveRestartIndex", > > "PrimitiveRestartIndexNV", > > "PrimitiveRestartNV", > > @@ -1274,6 +1286,7 @@ functions = [ > > "RasterPos4sv", > > "ReadBuffer", > > "ReadPixels", > > +"ReadnPixels", > > "ReadnPixelsARB", > > "Rectd", > > "Rectdv", > > @@ -1305,6 +1318,7 @@ functions = [ > > "SamplerParameterfv", > > "SamplerParameteri", > > "SamplerParameteriv", > > +"SamplerParameterIiv", > > "Scaled", > > "Scalef", > > "Scalex", > > @@ -1426,6 +1440,7 @@ functions = [ > > "TexParameterIiv", > > "TexParameterIivEXT", > > "TexParameterIuiv", > > +"TexParameterIuiv", > > "TexParameterIuivEXT", > > "TexParameterf", > > "TexParameterfv", > > @@ -1442,6 +1457,7 @@ functions = [ > > "TexSubImage2D", > > "TexSubImage3D", > > "TexSubImage3DEXT", > > +"TexbufferRange", > > TexBufferRange > > [would probably be good to change whatever processes this array to > warn about typos like this...] That would be a good call. I'll see how hard it is to do. > > > "TextureBarrierNV", > > "TextureStorage1DEXT", > > "TextureStorage2DEXT", > > -- > > 2.10.0 > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev 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 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
2016-09-22 14:53 GMT-04:00 Dylan Baker: > See commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of > this commit. > > Signed-off-by: Dylan Baker > --- > src/mapi/glapi/gen/static_data.py | 16 > 1 file changed, 16 insertions(+) > > diff --git a/src/mapi/glapi/gen/static_data.py > b/src/mapi/glapi/gen/static_data.py > index bb11c1d..fa63ab5 100644 > --- a/src/mapi/glapi/gen/static_data.py > +++ b/src/mapi/glapi/gen/static_data.py > @@ -484,17 +484,22 @@ functions = [ > "BindVertexBuffer", > "BindVertexBuffers", > "Bitmap", > +"BlendBarrier", > "BlendColor", > "BlendColorEXT", > "BlendEquation", > "BlendEquationEXT", > "BlendEquationSeparate", > +"BlendEquationSeparatei", > "BlendEquationSeparateiARB", > +"BlendEquationi", > "BlendEquationiARB", > "BlendFunc", > "BlendFuncSeparate", > "BlendFuncSeparateEXT", > +"BlendFuncSeparatei", > "BlendFuncSeparateiARB", > +"BlendFunci", > "BlendFunciARB", > "BlitFramebuffer", > "BufferData", > @@ -825,6 +830,7 @@ functions = [ > "GetFramebufferAttachmentParameteriv", > "GetFramebufferAttachmentParameterivEXT", > "GetFramebufferParameteriv", > +"GetGraphicsResetStatus", > "GetGraphicsResetStatusARB", > "GetHandleARB", > "GetHistogram", > @@ -887,6 +893,7 @@ functions = [ > "GetSamplerParameterIiv", > "GetSamplerParameterIuiv", > "GetSamplerParameterfv", > +"GetSamplerParameteri", > "GetSamplerParameteriv", > "GetSeparableFilter", > "GetShaderInfoLog", > @@ -951,8 +958,11 @@ functions = [ > "GetnSeparableFilterARB", > "GetnTexImageARB", > "GetnUniformdvARB", > +"GetnUniformfv", > "GetnUniformfvARB", > +"GetnUniformiv", > "GetnUniformivARB", > +"GetnUniformuiv", > "GetnUniformuivARB", > "Hint", > "Histogram", > @@ -1160,6 +1170,7 @@ functions = [ > "Orthof", > "Orthox", > "PassThrough", > +"PatchParameteri" > "PauseTransformFeedback", > "PixelMapfv", > "PixelMapuiv", > @@ -1191,6 +1202,7 @@ functions = [ > "PopDebugGroup", > "PopMatrix", > "PopName", > +"PrimitiveBoundingBox", > "PrimitiveRestartIndex", > "PrimitiveRestartIndexNV", > "PrimitiveRestartNV", > @@ -1274,6 +1286,7 @@ functions = [ > "RasterPos4sv", > "ReadBuffer", > "ReadPixels", > +"ReadnPixels", > "ReadnPixelsARB", > "Rectd", > "Rectdv", > @@ -1305,6 +1318,7 @@ functions = [ > "SamplerParameterfv", > "SamplerParameteri", > "SamplerParameteriv", > +"SamplerParameterIiv", > "Scaled", > "Scalef", > "Scalex", > @@ -1426,6 +1440,7 @@ functions = [ > "TexParameterIiv", > "TexParameterIivEXT", > "TexParameterIuiv", > +"TexParameterIuiv", > "TexParameterIuivEXT", > "TexParameterf", > "TexParameterfv", > @@ -1442,6 +1457,7 @@ functions = [ > "TexSubImage2D", > "TexSubImage3D", > "TexSubImage3DEXT", > +"TexbufferRange", TexBufferRange [would probably be good to change whatever processes this array to warn about typos like this...] > "TextureBarrierNV", > "TextureStorage1DEXT", > "TextureStorage2DEXT", > -- > 2.10.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
[Mesa-dev] [PATCH 1/3] mapi: retab static_data.py to be consistent
This file currently uses a mixture of 3 and 4 space indent. I have changed it all to 4 space indent, matching the settings in $ROOT/.editorconfig. Signed-off-by: Dylan Baker--- src/mapi/glapi/gen/static_data.py | 2570 ++--- 1 file changed, 1285 insertions(+), 1285 deletions(-) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index b25dab1..396f941 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -436,1291 +436,1291 @@ offsets = { } functions = [ - "Accum", - "ActiveShaderProgram", - "ActiveTexture", - "ActiveTextureARB", - "AlphaFunc", - "AlphaFuncx", - "AreTexturesResident", - "AreTexturesResidentEXT", - "ArrayElement", - "ArrayElementEXT", - "AttachObjectARB", - "AttachShader", - "Begin", - "BeginConditionalRender", - "BeginConditionalRenderNV", - "BeginQuery", - "BeginQueryARB", - "BeginQueryIndexed", - "BeginTransformFeedback", - "BindAttribLocation", - "BindAttribLocationARB", - "BindBuffer", - "BindBufferARB", - "BindBufferBase", - "BindBufferRange", - "BindBuffersBase", - "BindBuffersRange", - "BindFragDataLocation", - "BindFragDataLocationEXT", - "BindFragDataLocationIndexed", - "BindFramebuffer", - "BindFramebufferEXT", - "BindImageTexture", - "BindImageTextures", - "BindProgramARB", - "BindProgramPipeline", - "BindRenderbuffer", - "BindRenderbufferEXT", - "BindSampler", - "BindSamplers", - "BindTexture", - "BindTextureEXT", - "BindTextures", - "BindTransformFeedback", - "BindVertexArray", - "BindVertexBuffer", - "BindVertexBuffers", - "Bitmap", - "BlendColor", - "BlendColorEXT", - "BlendEquation", - "BlendEquationEXT", - "BlendEquationiARB", - "BlendEquationSeparate", - "BlendEquationSeparateiARB", - "BlendFunc", - "BlendFunciARB", - "BlendFuncSeparate", - "BlendFuncSeparateEXT", - "BlendFuncSeparateiARB", - "BlitFramebuffer", - "BufferData", - "BufferDataARB", - "BufferStorage", - "BufferSubData", - "BufferSubDataARB", - "CallList", - "CallLists", - "CheckFramebufferStatus", - "CheckFramebufferStatusEXT", - "ClampColor", - "ClampColorARB", - "Clear", - "ClearAccum", - "ClearBufferData", - "ClearBufferfi", - "ClearBufferfv", - "ClearBufferiv", - "ClearBufferSubData", - "ClearBufferuiv", - "ClearColor", - "ClearColorIiEXT", - "ClearColorIuiEXT", - "ClearColorx", - "ClearDepth", - "ClearDepthf", - "ClearDepthx", - "ClearIndex", - "ClearStencil", - "ClearTexImage", - "ClearTexSubImage", - "ClientActiveTexture", - "ClientActiveTextureARB", - "ClientWaitSync", - "ClipPlane", - "ClipPlanef", - "ClipPlanex", - "Color3b", - "Color3bv", - "Color3d", - "Color3dv", - "Color3f", - "Color3fv", - "Color3i", - "Color3iv", - "Color3s", - "Color3sv", - "Color3ub", - "Color3ubv", - "Color3ui", - "Color3uiv", - "Color3us", - "Color3usv", - "Color4b", - "Color4bv", - "Color4d", - "Color4dv", - "Color4f", - "Color4fv", - "Color4i", - "Color4iv", - "Color4s", - "Color4sv", - "Color4ub", - "Color4ubv", - "Color4ui", - "Color4uiv", - "Color4us", - "Color4usv", - "Color4x", - "ColorMask", - "ColorMaski", - "ColorMaskIndexedEXT", - "ColorMaterial", - "ColorP3ui", - "ColorP3uiv", - "ColorP4ui", - "ColorP4uiv", - "ColorPointer", - "ColorPointerEXT", - "ColorSubTable", - "ColorTable", - "ColorTableParameterfv", - "ColorTableParameteriv", - "CompileShader", - "CompileShaderARB", - "CompressedTexImage1D", - "CompressedTexImage1DARB", - "CompressedTexImage2D", - "CompressedTexImage2DARB", - "CompressedTexImage3D", - "CompressedTexImage3DARB", - "CompressedTexSubImage1D", - "CompressedTexSubImage1DARB", - "CompressedTexSubImage2D", - "CompressedTexSubImage2DARB", - "CompressedTexSubImage3D", - "CompressedTexSubImage3DARB", - "ConvolutionFilter1D", - "ConvolutionFilter2D", - "ConvolutionParameterf", - "ConvolutionParameterfv", - "ConvolutionParameteri", - "ConvolutionParameteriv", - "CopyBufferSubData", - "CopyColorSubTable", - "CopyColorTable", - "CopyConvolutionFilter1D", - "CopyConvolutionFilter2D", - "CopyImageSubData", - "CopyPixels", - "CopyTexImage1D", - "CopyTexImage2D", - "CopyTexSubImage1D", - "CopyTexSubImage2D", - "CopyTexSubImage3D", - "CopyTexSubImage3DEXT", - "CreateProgram", - "CreateProgramObjectARB", - "CreateShader", - "CreateShaderObjectARB", - "CreateShaderProgramv", - "CullFace", - "DebugMessageCallback", - "DebugMessageCallbackARB", - "DebugMessageControl", - "DebugMessageControlARB", - "DebugMessageInsert", - "DebugMessageInsertARB", - "DeleteBuffers", - "DeleteBuffersARB", - "DeleteFramebuffers", - "DeleteFramebuffersEXT", - "DeleteLists", - "DeleteObjectARB", - "DeleteProgram",
[Mesa-dev] [PATCH 2/3] mapi: sort static_data.py functions
Signed-off-by: Dylan Baker--- src/mapi/glapi/gen/static_data.py | 164 +++--- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index 396f941..bb11c1d 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -488,14 +488,14 @@ functions = [ "BlendColorEXT", "BlendEquation", "BlendEquationEXT", -"BlendEquationiARB", "BlendEquationSeparate", "BlendEquationSeparateiARB", +"BlendEquationiARB", "BlendFunc", -"BlendFunciARB", "BlendFuncSeparate", "BlendFuncSeparateEXT", "BlendFuncSeparateiARB", +"BlendFunciARB", "BlitFramebuffer", "BufferData", "BufferDataARB", @@ -511,10 +511,10 @@ functions = [ "Clear", "ClearAccum", "ClearBufferData", +"ClearBufferSubData", "ClearBufferfi", "ClearBufferfv", "ClearBufferiv", -"ClearBufferSubData", "ClearBufferuiv", "ClearColor", "ClearColorIiEXT", @@ -567,8 +567,8 @@ functions = [ "Color4usv", "Color4x", "ColorMask", -"ColorMaski", "ColorMaskIndexedEXT", +"ColorMaski", "ColorMaterial", "ColorP3ui", "ColorP3uiv", @@ -649,17 +649,17 @@ functions = [ "DepthMask", "DepthRange", "DepthRangeArrayv", -"DepthRangef", "DepthRangeIndexed", +"DepthRangef", "DepthRangex", "DetachObjectARB", "DetachShader", "Disable", "DisableClientState", -"Disablei", "DisableIndexedEXT", "DisableVertexAttribArray", "DisableVertexAttribArrayARB", +"Disablei", "DispatchCompute", "DispatchComputeIndirect", "DrawArrays", @@ -696,10 +696,10 @@ functions = [ "EdgeFlagv", "Enable", "EnableClientState", -"Enablei", "EnableIndexedEXT", "EnableVertexAttribArray", "EnableVertexAttribArrayARB", +"Enablei", "End", "EndConditionalRender", "EndConditionalRenderNV", @@ -725,6 +725,8 @@ functions = [ "Finish", "Flush", "FlushMappedBufferRange", +"FogCoordPointer", +"FogCoordPointerEXT", "FogCoordd", "FogCoorddEXT", "FogCoorddv", @@ -733,8 +735,6 @@ functions = [ "FogCoordfEXT", "FogCoordfv", "FogCoordfvEXT", -"FogCoordPointer", -"FogCoordPointerEXT", "Fogf", "Fogfv", "Fogi", @@ -761,8 +761,6 @@ functions = [ "Frustumx", "GenBuffers", "GenBuffersARB", -"GenerateMipmap", -"GenerateMipmapEXT", "GenFramebuffers", "GenFramebuffersEXT", "GenLists", @@ -777,13 +775,15 @@ functions = [ "GenTexturesEXT", "GenTransformFeedbacks", "GenVertexArrays", +"GenerateMipmap", +"GenerateMipmapEXT", "GetActiveAtomicCounterBufferiv", "GetActiveAttrib", "GetActiveAttribARB", "GetActiveUniform", "GetActiveUniformARB", -"GetActiveUniformBlockiv", "GetActiveUniformBlockName", +"GetActiveUniformBlockiv", "GetActiveUniformName", "GetActiveUniformsiv", "GetAttachedObjectsARB", @@ -849,24 +849,6 @@ functions = [ "GetMinmaxParameterfv", "GetMinmaxParameteriv", "GetMultisamplefv", -"GetnColorTableARB", -"GetnCompressedTexImageARB", -"GetnConvolutionFilterARB", -"GetnHistogramARB", -"GetnMapdvARB", -"GetnMapfvARB", -"GetnMapivARB", -"GetnMinmaxARB", -"GetnPixelMapfvARB", -"GetnPixelMapuivARB", -"GetnPixelMapusvARB", -"GetnPolygonStippleARB", -"GetnSeparableFilterARB", -"GetnTexImageARB", -"GetnUniformdvARB", -"GetnUniformfvARB", -"GetnUniformivARB", -"GetnUniformuivARB", "GetObjectLabel", "GetObjectParameterfvARB", "GetObjectParameterivARB", @@ -882,36 +864,36 @@ functions = [ "GetProgramEnvParameterfvARB", "GetProgramInfoLog", "GetProgramInterfaceiv", -"GetProgramiv", -"GetProgramivARB", "GetProgramLocalParameterdvARB", "GetProgramLocalParameterfvARB", "GetProgramPipelineInfoLog", "GetProgramPipelineiv", "GetProgramResourceIndex", -"GetProgramResourceiv", "GetProgramResourceLocation", "GetProgramResourceName", +"GetProgramResourceiv", "GetProgramStringARB", +"GetProgramiv", +"GetProgramivARB", "GetQueryIndexediv", -"GetQueryiv", -"GetQueryivARB", "GetQueryObjectiv", "GetQueryObjectivARB", "GetQueryObjectuiv", "GetQueryObjectuivARB", +"GetQueryiv", +"GetQueryivARB", "GetRenderbufferParameteriv", "GetRenderbufferParameterivEXT", -"GetSamplerParameterfv", "GetSamplerParameterIiv", "GetSamplerParameterIuiv", +"GetSamplerParameterfv", "GetSamplerParameteriv", "GetSeparableFilter", "GetShaderInfoLog", -"GetShaderiv", "GetShaderPrecisionFormat", "GetShaderSource", "GetShaderSourceARB", +"GetShaderiv",
[Mesa-dev] [PATCH 3/3] mapi: export all GLES 3.2 functions in libGLESv2.so
See commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of this commit. Signed-off-by: Dylan Baker--- src/mapi/glapi/gen/static_data.py | 16 1 file changed, 16 insertions(+) diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index bb11c1d..fa63ab5 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -484,17 +484,22 @@ functions = [ "BindVertexBuffer", "BindVertexBuffers", "Bitmap", +"BlendBarrier", "BlendColor", "BlendColorEXT", "BlendEquation", "BlendEquationEXT", "BlendEquationSeparate", +"BlendEquationSeparatei", "BlendEquationSeparateiARB", +"BlendEquationi", "BlendEquationiARB", "BlendFunc", "BlendFuncSeparate", "BlendFuncSeparateEXT", +"BlendFuncSeparatei", "BlendFuncSeparateiARB", +"BlendFunci", "BlendFunciARB", "BlitFramebuffer", "BufferData", @@ -825,6 +830,7 @@ functions = [ "GetFramebufferAttachmentParameteriv", "GetFramebufferAttachmentParameterivEXT", "GetFramebufferParameteriv", +"GetGraphicsResetStatus", "GetGraphicsResetStatusARB", "GetHandleARB", "GetHistogram", @@ -887,6 +893,7 @@ functions = [ "GetSamplerParameterIiv", "GetSamplerParameterIuiv", "GetSamplerParameterfv", +"GetSamplerParameteri", "GetSamplerParameteriv", "GetSeparableFilter", "GetShaderInfoLog", @@ -951,8 +958,11 @@ functions = [ "GetnSeparableFilterARB", "GetnTexImageARB", "GetnUniformdvARB", +"GetnUniformfv", "GetnUniformfvARB", +"GetnUniformiv", "GetnUniformivARB", +"GetnUniformuiv", "GetnUniformuivARB", "Hint", "Histogram", @@ -1160,6 +1170,7 @@ functions = [ "Orthof", "Orthox", "PassThrough", +"PatchParameteri" "PauseTransformFeedback", "PixelMapfv", "PixelMapuiv", @@ -1191,6 +1202,7 @@ functions = [ "PopDebugGroup", "PopMatrix", "PopName", +"PrimitiveBoundingBox", "PrimitiveRestartIndex", "PrimitiveRestartIndexNV", "PrimitiveRestartNV", @@ -1274,6 +1286,7 @@ functions = [ "RasterPos4sv", "ReadBuffer", "ReadPixels", +"ReadnPixels", "ReadnPixelsARB", "Rectd", "Rectdv", @@ -1305,6 +1318,7 @@ functions = [ "SamplerParameterfv", "SamplerParameteri", "SamplerParameteriv", +"SamplerParameterIiv", "Scaled", "Scalef", "Scalex", @@ -1426,6 +1440,7 @@ functions = [ "TexParameterIiv", "TexParameterIivEXT", "TexParameterIuiv", +"TexParameterIuiv", "TexParameterIuivEXT", "TexParameterf", "TexParameterfv", @@ -1442,6 +1457,7 @@ functions = [ "TexSubImage2D", "TexSubImage3D", "TexSubImage3DEXT", +"TexbufferRange", "TextureBarrierNV", "TextureStorage1DEXT", "TextureStorage2DEXT", -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 0/3] Update libGLESv2.so to expose GLES 3.2 symbols
This adds the GLES 3.2 symbols to libGLESv2.so. The first two patches (which have all of the changes in them), do some basic cleanup. The first makes tabs consistent (this is the giant patch), and the second sorts the list alphabetically. Dylan Baker (3): mapi: retab static_data.py to be consistent mapi: sort static_data.py functions mapi: export all GLES 3.2 functions in libGLESv2.so src/mapi/glapi/gen/static_data.py | 2586 +++-- 1 file changed, 1301 insertions(+), 1285 deletions(-) -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 8/8] i965: Drop pointless stage == MESA_SHADER_FRAGMENT checks.
Heh... Rb On Sep 22, 2016 4:46 PM, "Kenneth Graunke"wrote: > There's an assert right above this. > > Signed-off-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index 1483f41..dc000d9 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > @@ -5434,10 +5434,6 @@ fs_visitor::setup_fs_payload_gen6() > assert(stage == MESA_SHADER_FRAGMENT); > brw_wm_prog_data *prog_data = (brw_wm_prog_data*) this->prog_data; > > - unsigned barycentric_interp_modes = > - (stage == MESA_SHADER_FRAGMENT) ? > - ((brw_wm_prog_data*) this->prog_data)->barycentric_interp_modes : > 0; > - > assert(devinfo->gen >= 6); > > /* R0-1: masks, pixel X/Y coordinates. */ > @@ -5452,7 +5448,7 @@ fs_visitor::setup_fs_payload_gen6() > * Mode" bits in WM_STATE. > */ > for (int i = 0; i < BRW_BARYCENTRIC_MODE_COUNT; ++i) { > - if (barycentric_interp_modes & (1 << i)) { > + if (prog_data->barycentric_interp_modes & (1 << i)) { > payload.barycentric_coord_reg[i] = payload.num_regs; > payload.num_regs += 2; > if (dispatch_width == 16) { > -- > 2.10.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] [PATCH] isl/surface_state: Fix typo in alignment comment
Rb On Sep 22, 2016 5:28 PM, "Nanley Chery"wrote: > Change SUFFACE to SURFACE. > > Signed-off-by: Nanley Chery > --- > src/intel/isl/isl_surface_state.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/intel/isl/isl_surface_state.c > b/src/intel/isl/isl_surface_state.c > index e18fa50..4ed177a 100644 > --- a/src/intel/isl/isl_surface_state.c > +++ b/src/intel/isl/isl_surface_state.c > @@ -144,7 +144,7 @@ get_image_alignment(const struct isl_surf *surf) >*/ > return isl_extent3d(4, 4, 1); >} else { > - /* In Skylake, RENDER_SUFFACE_STATE.SurfaceVerticalAlignment is > in units > + /* In Skylake, RENDER_SURFACE_STATE.SurfaceVerticalAlignment is > in units >* of surface elements (not pixels nor samples). For compressed > formats, >* a "surface element" is defined as a compression block. For > example, >* if SurfaceVerticalAlignment is VALIGN_4 and SurfaceFormat is > an ETC2 > -- > 2.10.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] [PATCH 1/8] i965: Fix missing _NEW_TRANSFORM in Gen8+ 3DSTATE_DS atom.
On Wed, Sep 21, 2016 at 10:31:05PM -0700, Kenneth Graunke wrote: > Needed for user clip plane enables. Brkoen since this code was ^^ Broken -Nanley > introduced. > > Cc: mesa-sta...@lists.freedesktop.org > Signed-off-by: Kenneth Graunke> --- > src/mesa/drivers/dri/i965/gen8_ds_state.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/gen8_ds_state.c > b/src/mesa/drivers/dri/i965/gen8_ds_state.c > index 6f01abb..3b79b55 100644 > --- a/src/mesa/drivers/dri/i965/gen8_ds_state.c > +++ b/src/mesa/drivers/dri/i965/gen8_ds_state.c > @@ -69,6 +69,7 @@ gen8_upload_ds_state(struct brw_context *brw) > GEN7_DS_SIMD8_DISPATCH_ENABLE : 0) | > (tes_prog_data->domain == BRW_TESS_DOMAIN_TRI ? > GEN7_DS_COMPUTE_W_COORDINATE_ENABLE : 0)); > + /* _NEW_TRANSFORM */ >OUT_BATCH(SET_FIELD(ctx->Transform.ClipPlanesEnabled, >GEN8_DS_USER_CLIP_DISTANCE) | > SET_FIELD(vue_prog_data->cull_distance_mask, > @@ -106,7 +107,7 @@ gen8_upload_ds_state(struct brw_context *brw) > > const struct brw_tracked_state gen8_ds_state = { > .dirty = { > - .mesa = 0, > + .mesa = _NEW_TRANSFORM, >.brw = BRW_NEW_BATCH | > BRW_NEW_BLORP | > BRW_NEW_TESS_PROGRAMS | > -- > 2.10.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
[Mesa-dev] [Bug 97879] [amdgpu] Rocket League: long hangs (several seconds) when loading assets (models/textures/shaders?)
https://bugs.freedesktop.org/show_bug.cgi?id=97879 --- Comment #11 from Gregor Münch--- Experiencing same problem with Radeon HD 7970 Mesa Git radeonsi, LLVM Git, Linux 4.8 rc6. The Hangs are always there when: -start of the match 5-7sec -multiple times within the 1st minute of the game, up to 10sec per stall -upon the first explosion -upon a new player, with a new car spawns -opening option menu -end of the game, where the results are displayed Especially in the begin, you see a lot of blurrish textures. Ground textures, decals of the car, blurry "psyonix" advertisements. The grass looks like in a cell shading game, (wrong shader applied?) -- 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] i915g: fix incorrect gl_FragCoord value
Am 22.09.2016 um 17:40 schrieb Emil Velikov: > Hi Nicholas, > > On 26 August 2016 at 00:31, Nicholas Bishopwrote: >> From: Nicholas Bishop >> >> On Intel Pineview M hardware, the i915 gallium driver doesn't output >> the correct gl_FragCoord. It seems to always have an X coord of 0.0 >> and a Y coord of the window's height in pixels, e.g. 600.0f or such. >> >> I believe this is a regression caused in part by this commit: >> afa035031ff9e0c07a2297d864e46c76f7bfff58 >> >> The old behavior used the output at index zero, while the new behavior >> uses actual zeroes. In the case of gl_FragCoord the output at index >> zero happened to be the correct one, so the behavior appeared correct >> although the code already had a bug. >> >> Fixed by checking for I915_SEMANTIC_POS when setting up texCoords. If >> the generic_mapping is I915_SEMANTIC_POS, look for the >> TGSI_SEMANTIC_POSITION instead of a TGSI_SEMANTIC_GENERIC output. >> >> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D97477=CwIFaQ=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I=Mt7V3FvGsInekgNmMd2jOoCYRJDl4If-uvNtbOhGkRQ=JlfHHRDgBQvDfacPpT-qFUmY4drEprImNSdf1L6ch3c= >> >> --- >> src/gallium/drivers/i915/i915_state_derived.c | 7 ++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/src/gallium/drivers/i915/i915_state_derived.c >> b/src/gallium/drivers/i915/i915_state_derived.c >> index 177b854..dbfbc84 100644 >> --- a/src/gallium/drivers/i915/i915_state_derived.c >> +++ b/src/gallium/drivers/i915/i915_state_derived.c >> @@ -145,7 +145,12 @@ static void calculate_vertex_layout(struct i915_context >> *i915) >>uint hwtc; >>if (texCoords[i]) { >> hwtc = TEXCOORDFMT_4D; >> - src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_GENERIC, >> fs->generic_mapping[i]); >> + if (fs->generic_mapping[i] == I915_SEMANTIC_POS) { >> +src = draw_find_shader_output(i915->draw, >> TGSI_SEMANTIC_POSITION, 0); >> + } >> + else { >> +src = draw_find_shader_output(i915->draw, >> TGSI_SEMANTIC_GENERIC, fs->generic_mapping[i]); >> + } > > Personally I'm unfamiliar with the i915g driver, so I've Cc'd Roland > (the author of the commit 'breaking' this) and Stéphane (the author of > this driver). > > Gents, any input on the above ? Oh, I wasn't aware I broke this... This looks to me like before my patch there i915g was indeed just relying on draw code redirecting undefined inputs to 0, which near certainly was unspecified behavior. I don't really know i915g, but this looks like it should be correct. Reviewed-by: Roland Scheidegger > > That said, please drop the unneeded brackets and add the following > line in the commit message for v2. > Cc: mesa-sta...@lists.freedesktop.org > > Thanks, > Emil > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] swr: replace mesa->swr format enum conversion
Reviewed-by: Bruce Cherniak> On Sep 20, 2016, at 2:24 PM, Tim Rowley wrote: > > Replace old string comparison with a mapping table. > --- > src/gallium/drivers/swr/swr_screen.cpp | 344 - > 1 file changed, 293 insertions(+), 51 deletions(-) > > diff --git a/src/gallium/drivers/swr/swr_screen.cpp > b/src/gallium/drivers/swr/swr_screen.cpp > index 2ffb3a7..90fc77e 100644 > --- a/src/gallium/drivers/swr/swr_screen.cpp > +++ b/src/gallium/drivers/swr/swr_screen.cpp > @@ -45,6 +45,7 @@ extern "C" { > #include "jit_api.h" > > #include > +#include > > /* MSVC case instensitive compare */ > #if defined(PIPE_CC_MSVC) > @@ -415,60 +416,301 @@ swr_get_paramf(struct pipe_screen *screen, enum > pipe_capf param) > SWR_FORMAT > mesa_to_swr_format(enum pipe_format format) > { > - const struct util_format_description *format_desc = > - util_format_description(format); > - if (!format_desc) > - return (SWR_FORMAT)-1; > - > - // more robust check would be comparing all attributes of the formats > - // luckily format names are mostly standardized > - for (int i = 0; i < NUM_SWR_FORMATS; i++) { > - const SWR_FORMAT_INFO _desc = GetFormatInfo((SWR_FORMAT)i); > - > - if (!strcasecmp(format_desc->short_name, swr_desc.name)) > - return (SWR_FORMAT)i; > + static const std::map mesa2swr = { > + {PIPE_FORMAT_NONE, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_B8G8R8A8_UNORM, B8G8R8A8_UNORM}, > + {PIPE_FORMAT_B8G8R8X8_UNORM, B8G8R8X8_UNORM}, > + {PIPE_FORMAT_A8R8G8B8_UNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_X8R8G8B8_UNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_B5G5R5A1_UNORM, B5G5R5A1_UNORM}, > + {PIPE_FORMAT_B4G4R4A4_UNORM, B4G4R4A4_UNORM}, > + {PIPE_FORMAT_B5G6R5_UNORM, B5G6R5_UNORM}, > + {PIPE_FORMAT_R10G10B10A2_UNORM, R10G10B10A2_UNORM}, > + {PIPE_FORMAT_L8_UNORM, L8_UNORM}, > + {PIPE_FORMAT_A8_UNORM, A8_UNORM}, > + {PIPE_FORMAT_I8_UNORM, I8_UNORM}, > + {PIPE_FORMAT_L8A8_UNORM, L8A8_UNORM}, > + {PIPE_FORMAT_L16_UNORM, L16_UNORM}, > + {PIPE_FORMAT_UYVY, YCRCB_SWAPUVY}, > + {PIPE_FORMAT_YUYV, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_Z16_UNORM, R16_UNORM}, // z > + {PIPE_FORMAT_Z32_UNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_Z32_FLOAT, R32_FLOAT}, // z > + {PIPE_FORMAT_Z24_UNORM_S8_UINT, R24_UNORM_X8_TYPELESS}, // z > + {PIPE_FORMAT_S8_UINT_Z24_UNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_Z24X8_UNORM,R24_UNORM_X8_TYPELESS}, // z > + {PIPE_FORMAT_X8Z24_UNORM,(SWR_FORMAT)-1}, > + {PIPE_FORMAT_S8_UINT,(SWR_FORMAT)-1}, > + {PIPE_FORMAT_R64_FLOAT, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R64G64_FLOAT, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R64G64B64_FLOAT,(SWR_FORMAT)-1}, > + {PIPE_FORMAT_R64G64B64A64_FLOAT, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32_FLOAT, R32_FLOAT}, > + {PIPE_FORMAT_R32G32_FLOAT, R32G32_FLOAT}, > + {PIPE_FORMAT_R32G32B32_FLOAT,R32G32B32_FLOAT}, > + {PIPE_FORMAT_R32G32B32A32_FLOAT, R32G32B32A32_FLOAT}, > + {PIPE_FORMAT_R32_UNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32G32_UNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32G32B32_UNORM,(SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32G32B32A32_UNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32_USCALED,R32_USCALED}, > + {PIPE_FORMAT_R32G32_USCALED, R32G32_USCALED}, > + {PIPE_FORMAT_R32G32B32_USCALED, R32G32B32_USCALED}, > + {PIPE_FORMAT_R32G32B32A32_USCALED, R32G32B32A32_USCALED}, > + {PIPE_FORMAT_R32_SNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32G32_SNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32G32B32_SNORM,(SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32G32B32A32_SNORM, (SWR_FORMAT)-1}, > + {PIPE_FORMAT_R32_SSCALED,R32_SSCALED}, > + {PIPE_FORMAT_R32G32_SSCALED, R32G32_SSCALED}, > + {PIPE_FORMAT_R32G32B32_SSCALED, R32G32B32_SSCALED}, > + {PIPE_FORMAT_R32G32B32A32_SSCALED, R32G32B32A32_SSCALED}, > + {PIPE_FORMAT_R16_UNORM, R16_UNORM}, > + {PIPE_FORMAT_R16G16_UNORM, R16G16_UNORM}, > + {PIPE_FORMAT_R16G16B16_UNORM,R16G16B16_UNORM}, > + {PIPE_FORMAT_R16G16B16A16_UNORM, R16G16B16A16_UNORM}, > + {PIPE_FORMAT_R16_USCALED,R16_USCALED}, > + {PIPE_FORMAT_R16G16_USCALED, R16G16_USCALED}, > + {PIPE_FORMAT_R16G16B16_USCALED, R16G16B16_USCALED}, > + {PIPE_FORMAT_R16G16B16A16_USCALED, R16G16B16A16_USCALED}, > +
Re: [Mesa-dev] [PATCH] i915g: fix incorrect gl_FragCoord value
On Thu, Sep 22, 2016 at 8:40 AM, Emil Velikovwrote: > Hi Nicholas, > > On 26 August 2016 at 00:31, Nicholas Bishop wrote: > > From: Nicholas Bishop > > > > On Intel Pineview M hardware, the i915 gallium driver doesn't output > > the correct gl_FragCoord. It seems to always have an X coord of 0.0 > > and a Y coord of the window's height in pixels, e.g. 600.0f or such. > > > > I believe this is a regression caused in part by this commit: > > afa035031ff9e0c07a2297d864e46c76f7bfff58 > > > > The old behavior used the output at index zero, while the new behavior > > uses actual zeroes. In the case of gl_FragCoord the output at index > > zero happened to be the correct one, so the behavior appeared correct > > although the code already had a bug. > > > > Fixed by checking for I915_SEMANTIC_POS when setting up texCoords. If > > the generic_mapping is I915_SEMANTIC_POS, look for the > > TGSI_SEMANTIC_POSITION instead of a TGSI_SEMANTIC_GENERIC output. > > > > https://bugs.freedesktop.org/show_bug.cgi?id=97477 > > --- > > src/gallium/drivers/i915/i915_state_derived.c | 7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/src/gallium/drivers/i915/i915_state_derived.c > b/src/gallium/drivers/i915/i915_state_derived.c > > index 177b854..dbfbc84 100644 > > --- a/src/gallium/drivers/i915/i915_state_derived.c > > +++ b/src/gallium/drivers/i915/i915_state_derived.c > > @@ -145,7 +145,12 @@ static void calculate_vertex_layout(struct > i915_context *i915) > >uint hwtc; > >if (texCoords[i]) { > > hwtc = TEXCOORDFMT_4D; > > - src = draw_find_shader_output(i915->draw, > TGSI_SEMANTIC_GENERIC, fs->generic_mapping[i]); > > + if (fs->generic_mapping[i] == I915_SEMANTIC_POS) { > > +src = draw_find_shader_output(i915->draw, > TGSI_SEMANTIC_POSITION, 0); > > + } > > + else { > > +src = draw_find_shader_output(i915->draw, > TGSI_SEMANTIC_GENERIC, fs->generic_mapping[i]); > > + } > > Personally I'm unfamiliar with the i915g driver, so I've Cc'd Roland > (the author of the commit 'breaking' this) and Stéphane (the author of > this driver). > > Gents, any input on the above ? > It seems correct at a quick glance, but I'd like to investigate more. I will do so when I'm back from vacation next week :) Stéphane > That said, please drop the unneeded brackets and add the following > line in the commit message for v2. > Cc: mesa-sta...@lists.freedesktop.org > > Thanks, > Emil > ___ > 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] Expose ES 3.2 symbols in libGLESv2.so?
On Thu, Sep 22, 2016 at 5:45 PM, Emil Velikovwrote: > On 22 September 2016 at 08:10, Erik Faye-Lund wrote: >> On Wed, Sep 21, 2016 at 8:57 PM, Kenneth Graunke >> wrote: >>> Commit 5921f372c89a68fac6ddefc009442721d9df4db2 exposed GLES 3.1 symbols >>> in libGLESv2.so. Are we supposed to do the same thing for GLES 3.2? >>> >>> I imagine we're supposed to, but I'm not certain what spec actually >>> defines the ABI or where to look. >> >> This is the kind of stuff that is usually defined in the Khronos API >> Implementers Guide: >> https://www.khronos.org/registry/implementers_guide.html >> >> And it seems these should be exposed, as section 2.1.2.1 ("Packaging") says: >> >> "Except in cases where macros are allowed or versioned symbol naming >> is recommended (e.g., OpenCL symbol naming), ensure the API function >> names exported by your lib & dll files match the function names >> specified by the Khronos standard for the API you are implementing." >> >> I interpret this as there being an expectancy that the core API >> functions are actually exported. The same section also says >> >> "The entry points for each API must be packaged in separate libraries. >> Recommended library names are given in Table 2, “Recommended Library >> Names”." >> >> In section 2.1.2.2 ("Naming") table 2 lists the library base-name for >> OpenGL ES 3.x as "GLESv2", and even clarifies with a footnote that >> this is not a typo. >> >> All together, this tells me that libGLESv2.so should include all core >> symbols of the OpenGL 2.x *and* OpenGL 3.x API. > s|3.x|3.[012]|g but I totally agree. > > Since we've decided to let the "cat out of the bag" sort of speak, > with and ensure that all GLES 3.1 API is exported we might as well do > the same for GLES 3.2. > > It's a bit shame on the (broken?) ABI side of things, but well we > cannot do much at this point. I'm still finding my way around in > Khronos, but I have a few ideas how one can update things going > forward (GLES 3.3 anyone?). I meant to say "OpenGL ES 2.x *and* OpenGL ES 3.x", not OpenGL. The 3.x is Khronos' phrasing, not mine. So I think also a hypothetical OpenGL ES 3.3 (and up) would be covered, unless they decide to change the Implementers Guide. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/4] glsl: Immediately inline built-ins rather than generating calls.
On Thursday, September 22, 2016 1:54:44 PM PDT Ian Romanick wrote: > On 09/21/2016 10:20 PM, Kenneth Graunke wrote: > > In the past, we imported the prototypes of built-in functions, generated > > calls to those, and waited until link time to resolve the calls and > > import the actual code for the built-in functions. > > I thought part of the reason we did this was to account for some of the > weird desktop GLSL rules about overriding and overloading built-in > functions. Does this still handle that nonsense correctly? I remember > you spent a lot of time rewritting this code to get all that right. Yeah, that all works fine. I thought it'd be a problem at first too. The rules about function matching remain the same. So, we'll find the same function we found before. Before this patch, we'd import a prototype and tag it as "this is a built-in" or not. The linker would use that to link against the built-in or the user function. Now, instead of emitting a tagged-prototype, we generate the built-in inline. That means that all prototypes are user functions. The linker doesn't need to think about built-ins anymore. Works out surprisingly well. Passes all the tests. > There's one additional question below. > > > This severely limited our compile-time optimization opportunities: even > > trivial functions like dot() were represented as function calls. We > > also had no way of reasoning about those calls; they could have been > > 1,000 line functions with side-effects for all we knew. > > > > Practically all built-in functions are trivial translations to > > ir_expression opcodes, so it makes sense to just generate those inline. > > Since we eventually inline all functions anyway, we may as well just do > > it for all built-in functions. > > > > There's only one snag: built-in functions that refer to built-in global > > variables need those remapped to the variables in the shader being > > compiled, rather than the ones in the built-in shader. Currently, > > ftransform() is the only function matching those criteria, so it seemed > > easier to just make it a special case. > > > > On Skylake: > > > > total instructions in shared programs: 12023491 -> 12024010 (0.00%) > > instructions in affected programs: 77595 -> 78114 (0.67%) > > helped: 97 > > HURT: 309 > > > > total cycles in shared programs: 137239044 -> 137295498 (0.04%) > > cycles in affected programs: 16714026 -> 16770480 (0.34%) > > helped: 4663 > > HURT: 4923 > > > > while these statistics are in the wrong direction, the number of > > hurt programs is small (309 / 41282 = 0.75%), and I don't think > > anything can be done about it. A change like this significantly > > alters the order in which optimizations are performed. > > > > Signed-off-by: Kenneth Graunke> > --- > > src/compiler/glsl/ast_function.cpp | 46 > > ++ > > 1 file changed, 22 insertions(+), 24 deletions(-) > > > > diff --git a/src/compiler/glsl/ast_function.cpp > > b/src/compiler/glsl/ast_function.cpp > > index 7e62ab7..ac3b52d 100644 > > --- a/src/compiler/glsl/ast_function.cpp > > +++ b/src/compiler/glsl/ast_function.cpp > > @@ -430,7 +430,8 @@ generate_call(exec_list *instructions, > > ir_function_signature *sig, > >exec_list *actual_parameters, > >ir_variable *sub_var, > >ir_rvalue *array_idx, > > - struct _mesa_glsl_parse_state *state) > > + struct _mesa_glsl_parse_state *state, > > + bool inline_immediately) > > The caller just passes sig->is_builtin() for this parameter. We already > pass sig into this function. Do we need this new parameter? I suppose not. I thought "inline immediately" might be a reasonable option for generate_call(), in case we wanted to use it in other cases. Then again, I can't think of another case where we'd want it. I'm happy to drop it. What do you prefer? 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] Expose ES 3.2 symbols in libGLESv2.so?
On 22 September 2016 at 08:10, Erik Faye-Lundwrote: > On Wed, Sep 21, 2016 at 8:57 PM, Kenneth Graunke > wrote: >> Commit 5921f372c89a68fac6ddefc009442721d9df4db2 exposed GLES 3.1 symbols >> in libGLESv2.so. Are we supposed to do the same thing for GLES 3.2? >> >> I imagine we're supposed to, but I'm not certain what spec actually >> defines the ABI or where to look. > > This is the kind of stuff that is usually defined in the Khronos API > Implementers Guide: > https://www.khronos.org/registry/implementers_guide.html > > And it seems these should be exposed, as section 2.1.2.1 ("Packaging") says: > > "Except in cases where macros are allowed or versioned symbol naming > is recommended (e.g., OpenCL symbol naming), ensure the API function > names exported by your lib & dll files match the function names > specified by the Khronos standard for the API you are implementing." > > I interpret this as there being an expectancy that the core API > functions are actually exported. The same section also says > > "The entry points for each API must be packaged in separate libraries. > Recommended library names are given in Table 2, “Recommended Library > Names”." > > In section 2.1.2.2 ("Naming") table 2 lists the library base-name for > OpenGL ES 3.x as "GLESv2", and even clarifies with a footnote that > this is not a typo. > > All together, this tells me that libGLESv2.so should include all core > symbols of the OpenGL 2.x *and* OpenGL 3.x API. s|3.x|3.[012]|g but I totally agree. Since we've decided to let the "cat out of the bag" sort of speak, with and ensure that all GLES 3.1 API is exported we might as well do the same for GLES 3.2. It's a bit shame on the (broken?) ABI side of things, but well we cannot do much at this point. I'm still finding my way around in Khronos, but I have a few ideas how one can update things going forward (GLES 3.3 anyone?). Regards, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i915g: fix incorrect gl_FragCoord value
Hi Nicholas, On 26 August 2016 at 00:31, Nicholas Bishopwrote: > From: Nicholas Bishop > > On Intel Pineview M hardware, the i915 gallium driver doesn't output > the correct gl_FragCoord. It seems to always have an X coord of 0.0 > and a Y coord of the window's height in pixels, e.g. 600.0f or such. > > I believe this is a regression caused in part by this commit: > afa035031ff9e0c07a2297d864e46c76f7bfff58 > > The old behavior used the output at index zero, while the new behavior > uses actual zeroes. In the case of gl_FragCoord the output at index > zero happened to be the correct one, so the behavior appeared correct > although the code already had a bug. > > Fixed by checking for I915_SEMANTIC_POS when setting up texCoords. If > the generic_mapping is I915_SEMANTIC_POS, look for the > TGSI_SEMANTIC_POSITION instead of a TGSI_SEMANTIC_GENERIC output. > > https://bugs.freedesktop.org/show_bug.cgi?id=97477 > --- > src/gallium/drivers/i915/i915_state_derived.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/i915/i915_state_derived.c > b/src/gallium/drivers/i915/i915_state_derived.c > index 177b854..dbfbc84 100644 > --- a/src/gallium/drivers/i915/i915_state_derived.c > +++ b/src/gallium/drivers/i915/i915_state_derived.c > @@ -145,7 +145,12 @@ static void calculate_vertex_layout(struct i915_context > *i915) >uint hwtc; >if (texCoords[i]) { > hwtc = TEXCOORDFMT_4D; > - src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_GENERIC, > fs->generic_mapping[i]); > + if (fs->generic_mapping[i] == I915_SEMANTIC_POS) { > +src = draw_find_shader_output(i915->draw, > TGSI_SEMANTIC_POSITION, 0); > + } > + else { > +src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_GENERIC, > fs->generic_mapping[i]); > + } Personally I'm unfamiliar with the i915g driver, so I've Cc'd Roland (the author of the commit 'breaking' this) and Stéphane (the author of this driver). Gents, any input on the above ? That said, please drop the unneeded brackets and add the following line in the commit message for v2. Cc: mesa-sta...@lists.freedesktop.org Thanks, Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] gbm/dri2: propagate errors when creating a DMA-BUF fd
Hi Nicholas, On 8 September 2016 at 20:55, Nicholas Bishopwrote: > Changed dri2_query_image to check the return value of > resource_get_handle and return GL_FALSE if an error occurs. Similarly > changed gbm_dri_bo_get_fd to check the return value of queryImage and > return -1 (an invalid file descriptor) if an error occurs. > > Updated the comment for gbm_bo_get_fd to say that -1 is returned if > an error occurs. > > For reference this is an example callstack that should propagate the > error back to the user: > > i915_drm_buffer_get_handle > i915_texture_get_handle > u_resource_get_handle_vtbl > dri2_query_image > gbm_dri_bo_get_fd > gbm_bo_get_fd > > Signed-off-by: Nicholas Bishop > --- > src/gallium/state_trackers/dri/dri2.c | 11 +++ > src/gbm/backends/dri/gbm_dri.c| 8 +--- > src/gbm/main/gbm.c| 3 ++- Thanks for the patches. I've split this into two (loader src/gbm and "driver" src/gallium...) fixes, tagged for stable, applied some coding style polish and pushed the series to master. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/2] Implement lanczos interpolation filter
Nayan Deshmukh wrote: Hi Andy, On Wed, Sep 21, 2016 at 9:30 PM, Andy Furnisswrote: Andy Furniss wrote: Andy Furniss wrote: Andy Furniss wrote: Andy Furniss wrote: bz2 compressed vid showing the issue - https://drive.google.com/open?id=0BxP5-S1t9VEEUE5sbUFBV20zSms To be clear this is just the test rez vid I used so you can possibly recreate the issue your self. Hmm, interesting, with bicubic, hqscaling=1 this vid behaves differently with mplayer compared to mpv, the latter looks like it's scaling a bit, maybe there's an off by one somewhere in mpv code. I don't know if it's the cause, but looking for differences between mplayer and mpv it seems that mpv sets video mixer height so it's divisible by 32 but mplayer doesn't. For this 720p sample it uses 736 and mplayer uses 720. vdp_video_mixer_create(1, 1, {11}, 3, {0, 1, 2}, {1280, 736, 0}, -) for output surfaces and render calls it uses 720. So does the bicubic code see/use this 736 somewhere? To answer my own question - it does. Putting a printf in vl_bicubic.c create_frag_shader video_height = 736 We intialize the filters with height of video mixer, So that explains the difference. Yea, is there a way around it though? I assume what mpv does is legal. I was not able to make any progress with offsets nor the artifacts. Can you try testing the lanczos filter by removing this line form create_frag_shader :- ureg_SUB(shader, ureg_writemask(t_array[1], TGSI_WRITEMASK_XY), ureg_src(t_array[1]), half_pixel); This causes a shift in the opposite direction. Maybe offset is the wrong way to describe it as there are no lost pixels at the edges - they are just blended a bit and the whole image appears to move slightly when overlaid with one made with other scaling methods. Up and left with the above removed, down and right with above in place. This happens even on an un-scaled image but is more obvious on one scaled up. IIRC bicubic used to do this at one stage but doesn't now at all for un-scaled, maybe a tiny bit for scaled up. The above change makes no difference to artifacts. I also managed to get 2 to artifact and of course 2 and 4 still have white line artifacts sometimes, which I thought may be to do with the offset - but they are still there (same place) with the above removed, so I guess not. There is still the issue with all levels eating the 1:1 pix detail on the vertrez720 vid I uploaded when unscaled. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC 0/7] eglplatform.h: removing local hacks and improving robustness
Hi all, This series aims to make platform detection/selection easier, explicit and less fragile. To do that I've introduced Vulkan inspired EGL_USE_PLATFORM_*_KHR macro guards. The user _really_ wants to select the on they use, yet things should continue to compile (albeit there can be ABI issues in corner cases**) if they haven't provided any. Why fragile - current approach depends on the include order, as such platforms like GBM, Wayland and/or others need to have the respective header included _before_ anything that would pull eglplatform.h - egl.h eglext.h and/or others. Furthermore alongside the GBM and Wayland platform others tend to be done in a ad-hoc manner. For example, the upstream Apple code is analogous to the Symbian, yet for platforms such as Darwin one can/does use the XLIB code. The series represents what IMHO is the "should happen in a perfect world" solution, admittedly with the last 1-3 being rather debatable. Any and all input would be greatly appreciated ! Thanks Emil ** If we agree that we can remove the detection heuristics Emil Velikov (7): eglplatform.h: introduce and use EGL_USE_PLATFORM_*_KHR eglplatform.h: introduce EGL_USE_PLATFORM_XCB_KHR eglplatform.h: Introduce EGL_USE_PLATFORM_APPLE_KHR eglplatform.h: warn when the user hasn't provided a known platform eglplatform.h: remove local mesa hacks/workarounds from eglplatform.h Revert "build: fix EGL build when no X11 headers are present" eglplatform.h: remove buggy/fragile autodetection configure.ac | 7 - include/EGL/eglplatform.h | 79 +-- 2 files changed, 42 insertions(+), 44 deletions(-) -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Expose ES 3.2 symbols in libGLESv2.so?
On Wed, Sep 21, 2016 at 8:57 PM, Kenneth Graunkewrote: > Commit 5921f372c89a68fac6ddefc009442721d9df4db2 exposed GLES 3.1 symbols > in libGLESv2.so. Are we supposed to do the same thing for GLES 3.2? > > I imagine we're supposed to, but I'm not certain what spec actually > defines the ABI or where to look. This is the kind of stuff that is usually defined in the Khronos API Implementers Guide: https://www.khronos.org/registry/implementers_guide.html And it seems these should be exposed, as section 2.1.2.1 ("Packaging") says: "Except in cases where macros are allowed or versioned symbol naming is recommended (e.g., OpenCL symbol naming), ensure the API function names exported by your lib & dll files match the function names specified by the Khronos standard for the API you are implementing." I interpret this as there being an expectancy that the core API functions are actually exported. The same section also says "The entry points for each API must be packaged in separate libraries. Recommended library names are given in Table 2, “Recommended Library Names”." In section 2.1.2.2 ("Naming") table 2 lists the library base-name for OpenGL ES 3.x as "GLESv2", and even clarifies with a footnote that this is not a typo. All together, this tells me that libGLESv2.so should include all core symbols of the OpenGL 2.x *and* OpenGL 3.x API. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC 5/7] eglplatform.h: remove local mesa hacks/workarounds from eglplatform.h
From: Emil VelikovThis commit effectively reverts the following: 7d642442d9339e5b65c30802c44091816cdf18be 400b833592d9aad7b2c4627a897380642d52189f 2c6186390c48e0d1f2b4d4136c11eb0bedfd1aec eddcecbf74da26716509c047b95e85b00c12bab4 c0f8c9911c82c576cdd82dabad4a2370ac53565c 04c5cc5b8bec1f34f2405b08fd0d9ed6bd70ea61 985c2fca10b9338ef894cf8d34877dfbe7468e6e Any user should effectively set the respective macro/define in order to use the appropriate native types. --- IMHO this is something we want in the long term. Not sure how applicable/possible it would be to achieve w/o breaking the build for existing apps. --- include/EGL/eglplatform.h | 32 ++-- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index dc4a3e2..9ad874b 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -147,24 +147,12 @@ typedef HDC EGLNativeDisplayType; typedef HBITMAP EGLNativePixmapType; typedef HWNDEGLNativeWindowType; -#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ +#elif defined(__APPLE__) || defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ typedef int EGLNativeDisplayType; typedef void *EGLNativeWindowType; typedef void *EGLNativePixmapType; -#elif defined(WL_EGL_PLATFORM) - -typedef struct wl_display *EGLNativeDisplayType; -typedef struct wl_egl_pixmap *EGLNativePixmapType; -typedef struct wl_egl_window *EGLNativeWindowType; - -#elif defined(__GBM__) - -typedef struct gbm_device *EGLNativeDisplayType; -typedef struct gbm_bo *EGLNativePixmapType; -typedef void *EGLNativeWindowType; - #elif defined(__ANDROID__) || defined(ANDROID) #include @@ -175,15 +163,7 @@ typedef struct ANativeWindow* EGLNativeWindowType; typedef struct egl_native_pixmap_t* EGLNativePixmapType; typedef void* EGLNativeDisplayType; -#elif defined(__unix__) || defined(__APPLE__) - -#if defined(MESA_EGL_NO_X11_HEADERS) - -typedef void*EGLNativeDisplayType; -typedef khronos_uintptr_t EGLNativePixmapType; -typedef khronos_uintptr_t EGLNativeWindowType; - -#else +#elif defined(__unix__) /* X11 (tentative) */ #include @@ -193,14 +173,6 @@ typedef Display *EGLNativeDisplayType; typedef Pixmap EGLNativePixmapType; typedef Window EGLNativeWindowType; -#endif /* MESA_EGL_NO_X11_HEADERS */ - -#elif __HAIKU__ -#include -typedef void *EGLNativeDisplayType; -typedef khronos_uintptr_t EGLNativePixmapType; -typedef khronos_uintptr_t EGLNativeWindowType; - #else #error "Platform not recognized" #endif -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] isl/surface_state: Fix typo in alignment comment
Change SUFFACE to SURFACE. Signed-off-by: Nanley Chery--- src/intel/isl/isl_surface_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index e18fa50..4ed177a 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -144,7 +144,7 @@ get_image_alignment(const struct isl_surf *surf) */ return isl_extent3d(4, 4, 1); } else { - /* In Skylake, RENDER_SUFFACE_STATE.SurfaceVerticalAlignment is in units + /* In Skylake, RENDER_SURFACE_STATE.SurfaceVerticalAlignment is in units * of surface elements (not pixels nor samples). For compressed formats, * a "surface element" is defined as a compression block. For example, * if SurfaceVerticalAlignment is VALIGN_4 and SurfaceFormat is an ETC2 -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/2] Implement lanczos interpolation filter
Christian König wrote: Am 21.09.2016 um 16:38 schrieb Andy Furniss: Andy Furniss wrote: Andy Furniss wrote: Andy Furniss wrote: bz2 compressed vid showing the issue - https://drive.google.com/open?id=0BxP5-S1t9VEEUE5sbUFBV20zSms To be clear this is just the test rez vid I used so you can possibly recreate the issue your self. Hmm, interesting, with bicubic, hqscaling=1 this vid behaves differently with mplayer compared to mpv, the latter looks like it's scaling a bit, maybe there's an off by one somewhere in mpv code. I don't know if it's the cause, but looking for differences between mplayer and mpv it seems that mpv sets video mixer height so it's divisible by 32 but mplayer doesn't. For this 720p sample it uses 736 and mplayer uses 720. vdp_video_mixer_create(1, 1, {11}, 3, {0, 1, 2}, {1280, 736, 0}, -) for output surfaces and render calls it uses 720. So does the bicubic code see/use this 736 somewhere? Well that would clearly explain some differences. Are the video input buffers rounded up to 32 as well? It would seem so VDPAU_TRACE=1 shows mpv asks for (with lots snipped) - vdp_output_surface_create(1, 0, 1280, 720, -) vdp_video_surface_create(1, 0, 1280, 720, -) then later does vdp_video_surface_get_parameters(9, -, -, -) -> 0, 0, 1280, 736 and next creates the mixer - vdp_video_mixer_create(1, 0, {}, 3, {0, 1, 2}, {1280, 736, 0}, -) -> 0, 10 vdp_video_mixer_set_attribute_values(10, 1, {1}, {{{1.164384, 0.00, 1.792741, -0.972945}, {1.164384, -0.213249, -0.532909, 0.301483}, {1.164384, 2.112402, 0.00, -1.133402}}}) -> 0 vdp_video_mixer_render(10, 4294967295, NULL, 2, 2, {4294967295, 4294967295}, 9, 2, {4294967295, 4294967295}, {0, 0, 1280, 720}, 6, NULL, {0, 0, 1280, 720}, 0, NULL) If not then mpv is clearly not using the interface correctly here: #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT The exact height of input video surfaces. Hmm, so maybe it is right? Seems it's not mpv that rounds up the surface size. This parameter's type is uint32_t. This parameter defaults to 0 if not specified, which entails that it must be specified. The application may query this parameter's supported range. #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH The exact width of input video surfaces. This parameter's type is uint32_t. This parameter defaults to 0 if not specified, which entails that it must be specified. The application may query this parameter's supported range. Maybe we should make the checks done during rending more strict? Regards, Christian. ___ 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] [RFC 2/7] eglplatform.h: introduce EGL_USE_PLATFORM_XCB_KHR
From: Emil VelikovThere is no concept of display on XCB thus the connection is used instead. --- XXX: Pure XCB/Xlib-free implementation anyone ? --- include/EGL/eglplatform.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index 923b5f6..bb8bb95 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -111,6 +111,13 @@ typedef HDC EGLNativeDisplayType; typedef HBITMAP EGLNativePixmapType; typedef HWNDEGLNativeWindowType; +#elif defined(EGL_USE_PLATFORM_XCB_KHR) +#include + +typedef xcb_connection_t *EGLNativeDisplayType; +typedef xcb_pixmap_t EGLNativePixmapType; +typedef xcb_window_t EGLNativeWindowType; + #elif defined(EGL_USE_PLATFORM_XLIB_KHR) #include #include -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/4] glsl: Check TCS barrier restrictions at ast_to_hir time, not link time.
This is much simpler. This patch is Reviewed-by: Ian RomanickOn 09/21/2016 10:20 PM, Kenneth Graunke wrote: > We want to check prior to optimization - otherwise we might fail to > detect cases where barrier() is in control flow which is always taken > (and therefore gets optimized away). > > We don't currently loop unroll if there are function calls inside; > otherwise we might have a problem detecting barrier() in loops that > get unrolled as well. > > Tapani's switch handling code adds a loop around switch statements, so > even with the mess of if ladders, we'll properly reject it. > > Enforcing these rules at compile time makes more sense more sense than > link time. Doing it at ast-to-hir time (rather than as an IR pass) > allows us to emit an error message with proper line numbers. > (Otherwise, I would have preferred the IR pass...) > > Fixes spec/arb_tessellation_shader/compiler/barrier-switch-always.tesc. > > Signed-off-by: Kenneth Graunke > --- > src/compiler/glsl/ast_function.cpp | 19 > src/compiler/glsl/linker.cpp | 99 > -- > 2 files changed, 19 insertions(+), 99 deletions(-) > > diff --git a/src/compiler/glsl/ast_function.cpp > b/src/compiler/glsl/ast_function.cpp > index ea3ac87..7e62ab7 100644 > --- a/src/compiler/glsl/ast_function.cpp > +++ b/src/compiler/glsl/ast_function.cpp > @@ -2143,6 +2143,25 @@ ast_function_expression::hir(exec_list *instructions, > /* an error has already been emitted */ > value = ir_rvalue::error_value(ctx); >} else { > + if (state->stage == MESA_SHADER_TESS_CTRL && > + sig->is_builtin() && strcmp(func_name, "barrier") == 0) { > +if (state->current_function == NULL || > +strcmp(state->current_function->function_name(), "main") != > 0) { > + _mesa_glsl_error(, state, > +"barrier() may only be used in main()"); > +} > + > +if (state->found_return) { > + _mesa_glsl_error(, state, > +"barrier() may not be used after return"); > +} > + > +if (instructions != >current_function->body) { > + _mesa_glsl_error(, state, > +"barrier() may not be used in control flow"); > +} > + } > + > value = generate_call(instructions, sig, > _parameters, sub_var, array_idx, > state); > if (!value) { > diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp > index f3eece2..606d006 100644 > --- a/src/compiler/glsl/linker.cpp > +++ b/src/compiler/glsl/linker.cpp > @@ -260,97 +260,6 @@ public: > } > }; > > -class barrier_use_visitor : public ir_hierarchical_visitor { > -public: > - barrier_use_visitor(gl_shader_program *prog) > - : prog(prog), in_main(false), after_return(false), control_flow(0) > - { > - } > - > - virtual ~barrier_use_visitor() > - { > - /* empty */ > - } > - > - virtual ir_visitor_status visit_enter(ir_function *ir) > - { > - if (strcmp(ir->name, "main") == 0) > - in_main = true; > - > - return visit_continue; > - } > - > - virtual ir_visitor_status visit_leave(ir_function *) > - { > - in_main = false; > - after_return = false; > - return visit_continue; > - } > - > - virtual ir_visitor_status visit_leave(ir_return *) > - { > - after_return = true; > - return visit_continue; > - } > - > - virtual ir_visitor_status visit_enter(ir_if *) > - { > - ++control_flow; > - return visit_continue; > - } > - > - virtual ir_visitor_status visit_leave(ir_if *) > - { > - --control_flow; > - return visit_continue; > - } > - > - virtual ir_visitor_status visit_enter(ir_loop *) > - { > - ++control_flow; > - return visit_continue; > - } > - > - virtual ir_visitor_status visit_leave(ir_loop *) > - { > - --control_flow; > - return visit_continue; > - } > - > - /* FINISHME: `switch` is not expressed at the IR level -- it's already > -* been lowered to a mess of `if`s. We'll correctly disallow any use of > -* barrier() in a conditional path within the switch, but not in a path > -* which is always hit. > -*/ > - > - virtual ir_visitor_status visit_enter(ir_call *ir) > - { > - if (ir->use_builtin && strcmp(ir->callee_name(), "barrier") == 0) { > - /* Use of barrier(); determine if it is legal: */ > - if (!in_main) { > -linker_error(prog, "Builtin barrier() may only be used in main"); > -return visit_stop; > - } > - > - if (after_return) { > -linker_error(prog, "Builtin barrier() may not be used after > return"); > -return visit_stop; > - } > - > - if (control_flow
Re: [Mesa-dev] [PATCH 0/4] glsl: Builtins, now!
Kenneth Graunkewrites: > Hello, > > This series reworks the GLSL compiler to inline built-in functions > immediately, at compile time, rather than importing prototypes and > linking against an extra shader later on. > > Without this, compile time optimizations are nearly useless. For example, > trying to use a dot product would generate: > >(call dot ...) > > which would not be turned into > >(expression dot ...) > > until link time, when we actually import the functions, and finally inline. > > Function calls are opaque, and most optimization passes freak out and bail > when they see them. For example, loop unrolling wouldn't happen at compile > time at all if a loop contains a built-in function call. This is pretty bad. > > Most built-in functions turn into opcodes, or tiny expression trees. > It makes sense to simply inline them immediately. Some are larger > (such as atan). But we eventually inline them all today anyway, so > I don't see any downside to doing it sooner rather than later. > > Ian recently sent out a patch series that adds a lot of flags for > "do this optimization anyway, but only for built-ins", in an attempt > to clean up this (call ...) mess. I think this series should also > solve those problems, but it deletes a bunch of code, rather than > adding more code. > > The downside is that the shader-db statistics aren't great today, > but I don't think there's a lot we can do about that. This changes > the optimization order significantly. Overall, the difference was > pretty small, so I think I'm OK with it. FWIW, I like this series a lot. 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] [PATCH 0/2] intel: Enable EGL_KHR_gl_texture_3D_image
Adam Jacksonwrites: > This extension is a prerequisite for EGL 1.5, but the Intel drivers don't > report support for it, and I'm not really sure why, the driver code certainly > looks prepared for it. That said, I haven't tested either of these patches, > and > I'm not aware of any apps using the feature (certainly nothing in piglit). Looks like everything's there. 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
Re: [Mesa-dev] [PATCH] anv: Check for VK_WHOLE_SIZE in anv_CmdFillBuffer
On Wed, Sep 21, 2016 at 3:40 PM, Nicolas Kochwrote: > Hey Jason, thanks for reviewing. > > This is my first mesa contribution, and I'm not really familiar with > the mailing-list workflow. > Thanks for the contribution and welcome to mesa! > Is there anything else I need to do to get this merged? Or will > someone just do it in the near future? > Other than bugging one of the reviewers to push it for you, no. Seeing as you've already done that... I'll push it some time today. :-) > On Tue, Sep 20, 2016 at 7:09 PM, Jason Ekstrand > wrote: > > Seems reasonable > > > > Reviewed-by: Jason Ekstrand > > > > This reminds me that we really need to convert CmdFillBuffer over to > using > > blorp... > > > > > > On Sep 20, 2016 6:37 PM, "Nicolas Koch" wrote: > >> > >> Vulkan spec: > >> Size is the number of bytes to fill, and must be either a multiple of 4, > >> or VK_WHOLE_SIZE to fill the range from offset to the end of the buffer. > >> If VK_WHOLE_SIZE is used and the remaining size of the buffer is not a > >> multiple of 4, then the nearest smaller multiple is used. > >> --- > >> src/intel/vulkan/anv_meta_clear.c | 6 ++ > >> 1 file changed, 6 insertions(+) > >> > >> diff --git a/src/intel/vulkan/anv_meta_clear.c > >> b/src/intel/vulkan/anv_meta_clear.c > >> index ed4d1db..fd0797f 100644 > >> --- a/src/intel/vulkan/anv_meta_clear.c > >> +++ b/src/intel/vulkan/anv_meta_clear.c > >> @@ -1012,6 +1012,12 @@ void anv_CmdFillBuffer( > >> > >> meta_clear_begin(_state, cmd_buffer); > >> > >> + if (fillSize == VK_WHOLE_SIZE) { > >> + fillSize = dst_buffer->size - dstOffset; > >> + /* Make sure fillSize is a multiple of 4 */ > >> + fillSize -= fillSize & 3; > >> + } > >> + > >> VkFormat format; > >> int bs; > >> if ((fillSize & 15) == 0 && (dstOffset & 15) == 0) { > >> -- > >> 2.10.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
[Mesa-dev] [RFC 1/7] eglplatform.h: introduce and use EGL_USE_PLATFORM_*_KHR
From: Emil VelikovIn order to avoid the current, somewhat fragile detection in eglplatform.h introduce explicit platform selection. The approach is based on the one used in Vulkan and allows one to explicitly "request" the platform they will be using without the need of local hacks. --- XXX: Strictly speaking the default/else case would be the None/native one, but since we still have the "autodetection" heuristics... Admittedly some of the names can be improved, plus there's a limited about of Symbian users still in the wild. The latter kept for compatibility reasons. --- include/EGL/eglplatform.h | 56 +++ 1 file changed, 56 insertions(+) diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index b376e64..923b5f6 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -67,6 +67,62 @@ * implementations. */ +#if defined(EGL_USE_PLATFORM_ANDROID_KHR) +#include + +struct egl_native_pixmap_t; + +typedef struct ANativeWindow* EGLNativeWindowType; +typedef struct egl_native_pixmap_t* EGLNativePixmapType; +typedef void* EGLNativeDisplayType; + +#elif defined(EGL_USE_PLATFORM_GBM_KHR) // XXX: Name GBM vs DRM vs other + +typedef struct gbm_device *EGLNativeDisplayType; +typedef struct gbm_bo *EGLNativePixmapType; +typedef void *EGLNativeWindowType; + +#elif defined(EGL_USE_PLATFORM_NONE_KHR) // XXX: Name NONE vs Native vs other + +typedef void*EGLNativeDisplayType; +typedef khronos_uintptr_t EGLNativePixmapType; +typedef khronos_uintptr_t EGLNativeWindowType; + +#elif defined(EGL_USE_PLATFORM_SYMBIAN_KHR) + +typedef int EGLNativeDisplayType; +typedef void *EGLNativeWindowType; +typedef void *EGLNativePixmapType; + +#elif defined(EGL_USE_PLATFORM_WAYLAND_KHR) + +typedef struct wl_display *EGLNativeDisplayType; +typedef struct wl_egl_pixmap *EGLNativePixmapType; +typedef struct wl_egl_window *EGLNativeWindowType; + +#elif defined(EGL_USE_PLATFORM_WIN32_KHR) + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include + +typedef HDC EGLNativeDisplayType; +typedef HBITMAP EGLNativePixmapType; +typedef HWNDEGLNativeWindowType; + +#elif defined(EGL_USE_PLATFORM_XLIB_KHR) +#include +#include + +typedef Display *EGLNativeDisplayType; +typedef Pixmap EGLNativePixmapType; +typedef Window EGLNativeWindowType; + +#else + +/* Fallback to autodetection of the current platform */ + #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC 7/7] eglplatform.h: remove buggy/fragile autodetection
From: Emil VelikovWith the previous EGL_USE_PLATFORM_*_KHR in place one no longer needs any of this fragile and somewhat buggy heuristics. Users are responsible for requesting their preferred platform, with adding a default to none/native types. --- XXX: Similar to previous patch - something we want in the long term, although I'm not sure if at all/when it will be possible. --- include/EGL/eglplatform.h | 43 +++ 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index 9ad874b..ba95184 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -133,48 +133,11 @@ typedef Pixmap EGLNativePixmapType; typedef Window EGLNativeWindowType; #else -#warning "No known EGL_USE_PLATFORM_*_KHR is provided." -/* Fallback to autodetection of the current platform */ - -#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -#include - -typedef HDC EGLNativeDisplayType; -typedef HBITMAP EGLNativePixmapType; -typedef HWNDEGLNativeWindowType; - -#elif defined(__APPLE__) || defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ - -typedef int EGLNativeDisplayType; -typedef void *EGLNativeWindowType; -typedef void *EGLNativePixmapType; - -#elif defined(__ANDROID__) || defined(ANDROID) - -#include - -struct egl_native_pixmap_t; - -typedef struct ANativeWindow* EGLNativeWindowType; -typedef struct egl_native_pixmap_t* EGLNativePixmapType; -typedef void* EGLNativeDisplayType; - -#elif defined(__unix__) - -/* X11 (tentative) */ -#include -#include - -typedef Display *EGLNativeDisplayType; -typedef Pixmap EGLNativePixmapType; -typedef Window EGLNativeWindowType; +typedef void*EGLNativeDisplayType; +typedef khronos_uintptr_t EGLNativePixmapType; +typedef khronos_uintptr_t EGLNativeWindowType; -#else -#error "Platform not recognized" #endif /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC 6/7] Revert "build: fix EGL build when no X11 headers are present"
This reverts commit 1a7275de9a0088cedab17131eec82bd2cada26c3. No longer required/needed as-of last commit. Conflicts: configure.ac --- configure.ac | 7 --- 1 file changed, 7 deletions(-) diff --git a/configure.ac b/configure.ac index 0604ad9..d16447f 100644 --- a/configure.ac +++ b/configure.ac @@ -2083,13 +2083,6 @@ AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x") AC_SUBST([EGL_NATIVE_PLATFORM]) AC_SUBST([EGL_CFLAGS]) -# If we don't have the X11 platform, set this define so we don't try to include -# the X11 headers. -if ! echo "$egl_platforms" | grep -q 'x11'; then -DEFINES="$DEFINES -DMESA_EGL_NO_X11_HEADERS" -GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS" -fi - dnl dnl Gallium LLVM dnl -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] gbm/dri2: propagate errors when creating a DMA-BUF fd
Bump, could someone push this? Thanks, -Nicholas On Wed, Sep 14, 2016 at 1:06 PM, Nicholas Bishopwrote: > Thanks for review. Could someone with commit access push this for me? > > On Wed, Sep 14, 2016 at 8:48 AM, Eric Engestrom > wrote: >> On Thu, Sep 08, 2016 at 03:55:02PM -0400, Nicholas Bishop wrote: >>> Changed dri2_query_image to check the return value of >>> resource_get_handle and return GL_FALSE if an error occurs. Similarly >>> changed gbm_dri_bo_get_fd to check the return value of queryImage and >>> return -1 (an invalid file descriptor) if an error occurs. >>> >>> Updated the comment for gbm_bo_get_fd to say that -1 is returned if >>> an error occurs. >>> >>> For reference this is an example callstack that should propagate the >>> error back to the user: >>> >>> i915_drm_buffer_get_handle >>> i915_texture_get_handle >>> u_resource_get_handle_vtbl >>> dri2_query_image >>> gbm_dri_bo_get_fd >>> gbm_bo_get_fd >>> >>> Signed-off-by: Nicholas Bishop >> >> Looks good to me >> Reviewed-by: Eric Engestrom >> >>> --- >>> src/gallium/state_trackers/dri/dri2.c | 11 +++ >>> src/gbm/backends/dri/gbm_dri.c| 8 +--- >>> src/gbm/main/gbm.c| 3 ++- >>> 3 files changed, 14 insertions(+), 8 deletions(-) >>> >>> diff --git a/src/gallium/state_trackers/dri/dri2.c >>> b/src/gallium/state_trackers/dri/dri2.c >>> index 28f8078..c6260ba 100644 >>> --- a/src/gallium/state_trackers/dri/dri2.c >>> +++ b/src/gallium/state_trackers/dri/dri2.c >>> @@ -979,10 +979,13 @@ dri2_query_image(__DRIimage *image, int attrib, int >>> *value) >>>return GL_TRUE; >>> case __DRI_IMAGE_ATTRIB_FD: >>>whandle.type= DRM_API_HANDLE_TYPE_FD; >>> - image->texture->screen->resource_get_handle(image->texture->screen, >>> - image->texture, , usage); >>> - *value = whandle.handle; >>> - return GL_TRUE; >>> + if >>> (image->texture->screen->resource_get_handle(image->texture->screen, >>> + image->texture, , usage)) { >>> + *value = whandle.handle; >>> + return GL_TRUE; >>> + } else { >>> + return GL_FALSE; >>> + } >>> case __DRI_IMAGE_ATTRIB_FORMAT: >>>*value = image->dri_format; >>>return GL_TRUE; >>> diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c >>> index c3626e3..54b293a 100644 >>> --- a/src/gbm/backends/dri/gbm_dri.c >>> +++ b/src/gbm/backends/dri/gbm_dri.c >>> @@ -589,9 +589,11 @@ gbm_dri_bo_get_fd(struct gbm_bo *_bo) >>> if (bo->image == NULL) >>>return -1; >>> >>> - dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_FD, ); >>> - >>> - return fd; >>> + if (dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_FD, )) { >>> + return fd; >>> + } else { >>> + return -1; >>> + } >>> } >>> >>> static void >>> diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c >>> index 95b4c2c..c3a2ec33 100644 >>> --- a/src/gbm/main/gbm.c >>> +++ b/src/gbm/main/gbm.c >>> @@ -242,7 +242,8 @@ gbm_bo_get_handle(struct gbm_bo *bo) >>> * descriptor. >>> >>> * \param bo The buffer object >>> - * \return Returns a file descriptor referring to the underlying buffer >>> + * \return Returns a file descriptor referring to the underlying buffer or >>> -1 >>> + * if an error occurs. >>> */ >>> GBM_EXPORT int >>> gbm_bo_get_fd(struct gbm_bo *bo) >>> -- >>> 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] mesa/extensions: expose EXT_texture_compression_s3tc for ES2
Are there tests anywhere for either of these extensions? If not, can you send some patches to piglit which either add tests or, preferably, take tests for the existing desktop functionality and make them ES-friendly (e.g. https://cgit.freedesktop.org/piglit/commit/?id=d1bb73c483aa93e083ed251e0458d03ce5b0f552 ) On Wed, Sep 21, 2016 at 7:32 PM, Kevin Strasserwrote: > The extension spec has been revised to include dependencies for OpenGL ES 2 > and 3. > > Signed-off-by: Kevin Strasser > --- > src/mesa/main/extensions_table.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/main/extensions_table.h > b/src/mesa/main/extensions_table.h > index c40dd79..977897e 100644 > --- a/src/mesa/main/extensions_table.h > +++ b/src/mesa/main/extensions_table.h > @@ -251,7 +251,7 @@ EXT(EXT_texture_buffer , > OES_texture_buffer > EXT(EXT_texture_compression_dxt1, ANGLE_texture_compression_dxt > , GLL, GLC, ES1, ES2, 2004) > EXT(EXT_texture_compression_latc, EXT_texture_compression_latc > , GLL, x , x , x , 2006) > EXT(EXT_texture_compression_rgtc, ARB_texture_compression_rgtc > , GLL, GLC, x , x , 2004) > -EXT(EXT_texture_compression_s3tc, EXT_texture_compression_s3tc > , GLL, GLC, x , x , 2000) > +EXT(EXT_texture_compression_s3tc, EXT_texture_compression_s3tc > , GLL, GLC, x , ES2, 2000) > EXT(EXT_texture_cube_map, ARB_texture_cube_map > , GLL, x , x , x , 2001) > EXT(EXT_texture_cube_map_array , OES_texture_cube_map_array > , x , x , x , 31, 2014) > EXT(EXT_texture_edge_clamp , dummy_true > , GLL, x , x , x , 1997) > -- > 2.7.4 > > ___ > 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] [RFC 3/7] eglplatform.h: Introduce EGL_USE_PLATFORM_APPLE_KHR
From: Emil Velikov--- XXX: This is the upstream/Khronos definition of it, although I'm not perfectly sure if/how many users depend on it. XXX: Worth folding with the original commit which introduces the EGL_USE PLATFORM... lot ? --- include/EGL/eglplatform.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index bb8bb95..16765fb 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -76,6 +76,12 @@ typedef struct ANativeWindow* EGLNativeWindowType; typedef struct egl_native_pixmap_t* EGLNativePixmapType; typedef void* EGLNativeDisplayType; +#elif defined(EGL_USE_PLATFORM_APPLE_KHR) + +typedef int EGLNativeDisplayType; +typedef void *EGLNativeWindowType; +typedef void *EGLNativePixmapType; + #elif defined(EGL_USE_PLATFORM_GBM_KHR) // XXX: Name GBM vs DRM vs other typedef struct gbm_device *EGLNativeDisplayType; -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] intel/blorp: Use documented RECTLIST vertex positions
Use the vertex positions described in the PRMs. This has no effect on rendering but quiets the simulator warnings seen when the vertices appear out of order. Signed-off-by: Nanley CheryCc: Jason Ekstrand Cc: Marek Olšák --- src/intel/blorp/blorp_genX_exec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index eb4a5b9..62f16a3 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -171,8 +171,8 @@ blorp_emit_vertex_data(struct blorp_batch *batch, uint32_t *size) { const float vertices[] = { - /* v0 */ (float)params->x0, (float)params->y1, - /* v1 */ (float)params->x1, (float)params->y1, + /* v0 */ (float)params->x1, (float)params->y1, + /* v1 */ (float)params->x0, (float)params->y1, /* v2 */ (float)params->x0, (float)params->y0, }; @@ -287,7 +287,7 @@ blorp_emit_vertex_elements(struct blorp_batch *batch, * v2 -- implied *|| *|| -* v0 - v1 +* v1 - v0 * * Since the VS is disabled, the clipper loads each VUE directly from * the URB. This is controlled by the 3DSTATE_VERTEX_BUFFERS and -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv/blorp: Handle zero width/height copying in copy_buffer_to_image
On Wed, Sep 21, 2016 at 2:38 PM, Nanley Cherywrote: > Is this to avoid needless computation? Yes it is. > If an app copies such an image, that's likely an app bug right? Yes it is. But I think keeping such simple checks in the driver saves a lot of app debugging time sometime later. > > On Wed, Sep 21, 2016 at 11:17:08AM -0700, Anuj Phogat wrote: >> Signed-off-by: Anuj Phogat >> --- >> src/intel/vulkan/anv_blorp.c | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c >> index cb61070..de33dce 100644 >> --- a/src/intel/vulkan/anv_blorp.c >> +++ b/src/intel/vulkan/anv_blorp.c >> @@ -273,6 +273,10 @@ copy_buffer_to_image(struct anv_cmd_buffer *cmd_buffer, >> >>VkExtent3D extent = >> anv_sanitize_image_extent(anv_image->type, >> pRegions[r].imageExtent); >> + >> + if (extent.width == 0 || extent.height == 0) >> + return; >> + > > This seems like something we'd want put in blorp_copy(). That way we'd > also handle CopyImage. Yes, blorp_copy() looks like a better place. > >>if (anv_image->type != VK_IMAGE_TYPE_3D) { >> image.offset.z = pRegions[r].imageSubresource.baseArrayLayer; >> extent.depth = pRegions[r].imageSubresource.layerCount; >> -- >> 2.5.5 >> >> ___ >> 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] [PATCH 2/2] mesa/extensions: expose OES_vertex_half_float for ES2
Half float support already exists for desktop GL. Reuse the ARB_half_float_vertex enable bit and account for the different enum to enable the extension for ES2. Signed-off-by: Kevin Strasser--- src/mesa/main/extensions_table.h | 1 + src/mesa/main/varray.c | 7 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index 977897e..b086fe2 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -390,6 +390,7 @@ EXT(OES_texture_npot, ARB_texture_non_power_of_two EXT(OES_texture_stencil8, ARB_texture_stencil8 , x , x , x , 30, 2014) EXT(OES_texture_storage_multisample_2d_array, ARB_texture_multisample , x , x , x , 31, 2014) EXT(OES_vertex_array_object , dummy_true , x , x , ES1, ES2, 2010) +EXT(OES_vertex_half_float , ARB_half_float_vertex , x , x , x , ES2, 2005) EXT(S3_s3tc , ANGLE_texture_compression_dxt , GLL, GLC, x , x , 1999) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 027ae7c..d04fd0b 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -102,6 +102,7 @@ type_to_bit(const struct gl_context *ctx, GLenum type) case GL_UNSIGNED_INT: return UNSIGNED_INT_BIT; case GL_HALF_FLOAT: + case GL_HALF_FLOAT_OES: if (ctx->Extensions.ARB_half_float_vertex) return HALF_BIT; else @@ -235,8 +236,10 @@ get_legal_types_mask(const struct gl_context *ctx) legalTypesMask &= ~(UNSIGNED_INT_BIT | INT_BIT | UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT | - HALF_BIT); + INT_2_10_10_10_REV_BIT); + + if (!_mesa_has_OES_vertex_half_float(ctx)) +legalTypesMask &= ~HALF_BIT; } } else { -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] mesa/extensions: expose EXT_texture_compression_s3tc for ES2
The extension spec has been revised to include dependencies for OpenGL ES 2 and 3. Signed-off-by: Kevin Strasser--- src/mesa/main/extensions_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index c40dd79..977897e 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -251,7 +251,7 @@ EXT(EXT_texture_buffer , OES_texture_buffer EXT(EXT_texture_compression_dxt1, ANGLE_texture_compression_dxt , GLL, GLC, ES1, ES2, 2004) EXT(EXT_texture_compression_latc, EXT_texture_compression_latc , GLL, x , x , x , 2006) EXT(EXT_texture_compression_rgtc, ARB_texture_compression_rgtc , GLL, GLC, x , x , 2004) -EXT(EXT_texture_compression_s3tc, EXT_texture_compression_s3tc , GLL, GLC, x , x , 2000) +EXT(EXT_texture_compression_s3tc, EXT_texture_compression_s3tc , GLL, GLC, x , ES2, 2000) EXT(EXT_texture_cube_map, ARB_texture_cube_map , GLL, x , x , x , 2001) EXT(EXT_texture_cube_map_array , OES_texture_cube_map_array , x , x , x , 31, 2014) EXT(EXT_texture_edge_clamp , dummy_true , GLL, x , x , x , 1997) -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC 4/7] eglplatform.h: warn when the user hasn't provided a known platform
From: Emil Velikov--- include/EGL/eglplatform.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index 16765fb..dc4a3e2 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -133,6 +133,7 @@ typedef Pixmap EGLNativePixmapType; typedef Window EGLNativeWindowType; #else +#warning "No known EGL_USE_PLATFORM_*_KHR is provided." /* Fallback to autodetection of the current platform */ -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 6/8] i965: Add missing BRW_CS_PROG_DATA to CS work group surface atom.
Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke--- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 7b5e380..834e8f2 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -1840,10 +1840,12 @@ brw_upload_cs_work_groups_surface(struct brw_context *brw) /* _NEW_PROGRAM */ struct gl_shader_program *prog = ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE]; + /* BRW_NEW_CS_PROG_DATA */ + const struct brw_cs_prog_data *cs_prog_data = brw->cs.prog_data; - if (prog && brw->cs.prog_data->uses_num_work_groups) { + if (prog && cs_prog_data->uses_num_work_groups) { const unsigned surf_idx = - brw->cs.prog_data->binding_table.work_groups_start; + cs_prog_data->binding_table.work_groups_start; uint32_t *surf_offset = >cs.base.surf_offset[surf_idx]; drm_intel_bo *bo; uint32_t bo_offset; @@ -1872,6 +1874,7 @@ brw_upload_cs_work_groups_surface(struct brw_context *brw) const struct brw_tracked_state brw_cs_work_groups_surface = { .dirty = { .brw = BRW_NEW_BLORP | + BRW_NEW_CS_PROG_DATA | BRW_NEW_CS_WORK_GROUPS }, .emit = brw_upload_cs_work_groups_surface, -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 8/8] i965: Drop pointless stage == MESA_SHADER_FRAGMENT checks.
There's an assert right above this. Signed-off-by: Kenneth Graunke--- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 1483f41..dc000d9 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -5434,10 +5434,6 @@ fs_visitor::setup_fs_payload_gen6() assert(stage == MESA_SHADER_FRAGMENT); brw_wm_prog_data *prog_data = (brw_wm_prog_data*) this->prog_data; - unsigned barycentric_interp_modes = - (stage == MESA_SHADER_FRAGMENT) ? - ((brw_wm_prog_data*) this->prog_data)->barycentric_interp_modes : 0; - assert(devinfo->gen >= 6); /* R0-1: masks, pixel X/Y coordinates. */ @@ -5452,7 +5448,7 @@ fs_visitor::setup_fs_payload_gen6() * Mode" bits in WM_STATE. */ for (int i = 0; i < BRW_BARYCENTRIC_MODE_COUNT; ++i) { - if (barycentric_interp_modes & (1 << i)) { + if (prog_data->barycentric_interp_modes & (1 << i)) { payload.barycentric_coord_reg[i] = payload.num_regs; payload.num_regs += 2; if (dispatch_width == 16) { -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/8] i965: Fix missing _NEW_TRANSFORM in Gen8+ 3DSTATE_DS atom.
Needed for user clip plane enables. Brkoen since this code was introduced. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke--- src/mesa/drivers/dri/i965/gen8_ds_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen8_ds_state.c b/src/mesa/drivers/dri/i965/gen8_ds_state.c index 6f01abb..3b79b55 100644 --- a/src/mesa/drivers/dri/i965/gen8_ds_state.c +++ b/src/mesa/drivers/dri/i965/gen8_ds_state.c @@ -69,6 +69,7 @@ gen8_upload_ds_state(struct brw_context *brw) GEN7_DS_SIMD8_DISPATCH_ENABLE : 0) | (tes_prog_data->domain == BRW_TESS_DOMAIN_TRI ? GEN7_DS_COMPUTE_W_COORDINATE_ENABLE : 0)); + /* _NEW_TRANSFORM */ OUT_BATCH(SET_FIELD(ctx->Transform.ClipPlanesEnabled, GEN8_DS_USER_CLIP_DISTANCE) | SET_FIELD(vue_prog_data->cull_distance_mask, @@ -106,7 +107,7 @@ gen8_upload_ds_state(struct brw_context *brw) const struct brw_tracked_state gen8_ds_state = { .dirty = { - .mesa = 0, + .mesa = _NEW_TRANSFORM, .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | BRW_NEW_TESS_PROGRAMS | -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 5/8] i965: Add missing BRW_NEW_CS_PROG_DATA to compute constant atom.
CACHE_NEW_CS_PROG hasn't existed in quite a long time...the old comment was there, but not the actual bit. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke--- src/mesa/drivers/dri/i965/gen7_cs_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen7_cs_state.c b/src/mesa/drivers/dri/i965/gen7_cs_state.c index 1aa4b2f..2e1e173 100644 --- a/src/mesa/drivers/dri/i965/gen7_cs_state.c +++ b/src/mesa/drivers/dri/i965/gen7_cs_state.c @@ -284,7 +284,7 @@ gen7_upload_cs_push_constants(struct brw_context *brw) (struct brw_compute_program *) brw->compute_program; if (cp) { - /* CACHE_NEW_CS_PROG */ + /* BRW_NEW_CS_PROG_DATA */ struct brw_cs_prog_data *cs_prog_data = brw->cs.prog_data; _mesa_shader_write_subroutine_indices(>ctx, MESA_SHADER_COMPUTE); @@ -299,6 +299,7 @@ const struct brw_tracked_state gen7_cs_push_constants = { .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | BRW_NEW_COMPUTE_PROGRAM | + BRW_NEW_CS_PROG_DATA | BRW_NEW_PUSH_CONSTANT_ALLOCATION, }, .emit = gen7_upload_cs_push_constants, -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/8] i965: Move BRW_NEW_FRAGMENT_PROGRAM from 3DSTATE_PS to PS_EXTRA.
3DSTATE_PS doesn't need this. 3DSTATE_PS_EXTRA however does, for brw_color_buffer_write_enabled(). Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke--- src/mesa/drivers/dri/i965/gen8_ps_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen8_ps_state.c b/src/mesa/drivers/dri/i965/gen8_ps_state.c index 0e7d258..03bac4a 100644 --- a/src/mesa/drivers/dri/i965/gen8_ps_state.c +++ b/src/mesa/drivers/dri/i965/gen8_ps_state.c @@ -123,6 +123,7 @@ const struct brw_tracked_state gen8_ps_extra = { .mesa = _NEW_BUFFERS | _NEW_COLOR, .brw = BRW_NEW_BLORP | BRW_NEW_CONTEXT | + BRW_NEW_FRAGMENT_PROGRAM | BRW_NEW_FS_PROG_DATA, }, .emit = upload_ps_extra, @@ -282,7 +283,6 @@ const struct brw_tracked_state gen8_ps_state = { .mesa = _NEW_MULTISAMPLE, .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | - BRW_NEW_FRAGMENT_PROGRAM | BRW_NEW_FS_PROG_DATA, }, .emit = upload_ps_state, -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 4/8] i965: Add missing BRW_NEW_FS_PROG_DATA to render target reads.
Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke--- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index ba6fa52..7b5e380 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -1143,6 +1143,7 @@ update_renderbuffer_read_surfaces(struct brw_context *brw) for (unsigned i = 0; i < fb->_NumColorDrawBuffers; i++) { struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[i]; const struct intel_renderbuffer *irb = intel_renderbuffer(rb); + /* BRW_NEW_FS_PROG_DATA */ const unsigned surf_index = brw->wm.prog_data->binding_table.render_target_read_start + i; uint32_t *surf_offset = >wm.base.surf_offset[surf_index]; @@ -1210,7 +1211,8 @@ const struct brw_tracked_state brw_renderbuffer_read_surfaces = { .dirty = { .mesa = _NEW_BUFFERS, .brw = BRW_NEW_BATCH | - BRW_NEW_FRAGMENT_PROGRAM, + BRW_NEW_FRAGMENT_PROGRAM | + BRW_NEW_FS_PROG_DATA, }, .emit = update_renderbuffer_read_surfaces, }; -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 7/8] i965: Drop _NEW_TRANSFORM from 3DSTATE_VS atom on Gen6-7.
commit e07457d0aec96970a39a2dd1cb4e46da6107eb77 removed the last use of ctx->Transform on Gen6. It looks like Gen7 never needed this, but I copied it over when I originally ported the driver to Ivybridge. Signed-off-by: Kenneth Graunke--- src/mesa/drivers/dri/i965/gen6_vs_state.c | 3 +-- src/mesa/drivers/dri/i965/gen7_vs_state.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c index 5446ef9..849fff9 100644 --- a/src/mesa/drivers/dri/i965/gen6_vs_state.c +++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c @@ -60,8 +60,7 @@ gen6_upload_vs_push_constants(struct brw_context *brw) const struct brw_tracked_state gen6_vs_push_constants = { .dirty = { - .mesa = _NEW_PROGRAM_CONSTANTS | - _NEW_TRANSFORM, + .mesa = _NEW_PROGRAM_CONSTANTS, .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | BRW_NEW_PUSH_CONSTANT_ALLOCATION | diff --git a/src/mesa/drivers/dri/i965/gen7_vs_state.c b/src/mesa/drivers/dri/i965/gen7_vs_state.c index 2715b37..7daa018 100644 --- a/src/mesa/drivers/dri/i965/gen7_vs_state.c +++ b/src/mesa/drivers/dri/i965/gen7_vs_state.c @@ -74,7 +74,7 @@ upload_vs_state(struct brw_context *brw) const struct brw_tracked_state gen7_vs_state = { .dirty = { - .mesa = _NEW_TRANSFORM, + .mesa = 0, .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | BRW_NEW_CONTEXT | -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 97879] [amdgpu] Rocket League: long hangs (several seconds) when loading assets (models/textures/shaders?)
https://bugs.freedesktop.org/show_bug.cgi?id=97879 --- Comment #10 from Silvan Jegen--- (In reply to Michel Dänzer from comment #3) > (In reply to Silvan Jegen from comment #2) > > Just to clarify: the trace also includes loading of the game itself (which > > takes a long time too) as well as in-game menu navigation. > > Right, replaying the trace crashes for me after the shader compilations on > startup, so my CPU profile only covered that. Maybe you can try getting a > CPU profile of one of the other stalls. I tried to replay the trace and it crashed on my machine as well... > Otherwise, maybe try setting the environment variable > GALLIUM_HUD=.dfps,requested-VRAM+VRAM-usage,requested-GTT+GTT-usage, > cpu+temperature+GPU-load,.dnum-bytes-moved,.dbuffer-wait-time,.dnum- > compilations+num-shaders-created for either running the game itself or > replaying the trace, and taking a screenshot within one minute after one of > the other stalls. That should allow at least confirming or ruling out that > the other stalls are due to shader compilation as well. Do you still need such a screenshot now that other people in the thread have posted a few? If so, I will upload one early next week (I will be away over the weekend). -- 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
[Mesa-dev] [PATCH] intel/blorp: Constify blorp[_batch]_init() arguments
Signed-off-by: Nanley Chery--- src/intel/blorp/blorp.c | 8 src/intel/blorp/blorp.h | 9 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c index 1c8fd55..e5dcf0a 100644 --- a/src/intel/blorp/blorp.c +++ b/src/intel/blorp/blorp.c @@ -30,8 +30,8 @@ #include "brw_nir.h" void -blorp_init(struct blorp_context *blorp, void *driver_ctx, - struct isl_device *isl_dev) +blorp_init(struct blorp_context *blorp, const void *driver_ctx, + const struct isl_device *isl_dev) { blorp->driver_ctx = driver_ctx; blorp->isl_dev = isl_dev; @@ -44,8 +44,8 @@ blorp_finish(struct blorp_context *blorp) } void -blorp_batch_init(struct blorp_context *blorp, - struct blorp_batch *batch, void *driver_batch) +blorp_batch_init(const struct blorp_context *blorp, + struct blorp_batch *batch, const void *driver_batch) { batch->blorp = blorp; batch->driver_batch = driver_batch; diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h index 480f1bb..2cbe719 100644 --- a/src/intel/blorp/blorp.h +++ b/src/intel/blorp/blorp.h @@ -62,8 +62,8 @@ struct blorp_context { void (*exec)(struct blorp_batch *batch, const struct blorp_params *params); }; -void blorp_init(struct blorp_context *blorp, void *driver_ctx, -struct isl_device *isl_dev); +void blorp_init(struct blorp_context *blorp, const void *driver_ctx, +const struct isl_device *isl_dev); void blorp_finish(struct blorp_context *blorp); struct blorp_batch { @@ -71,8 +71,9 @@ struct blorp_batch { void *driver_batch; }; -void blorp_batch_init(struct blorp_context *blorp, struct blorp_batch *batch, - void *driver_batch); +void blorp_batch_init(const struct blorp_context *blorp, + struct blorp_batch *batch, + const void *driver_batch); void blorp_batch_finish(struct blorp_batch *batch); struct blorp_address { -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/8] i965: Add missing BRW_NEW_VS_PROG_DATA to 3DSTATE_CLIP.
Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke--- src/mesa/drivers/dri/i965/gen6_clip_state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c index 7dc9740..c414a0f 100644 --- a/src/mesa/drivers/dri/i965/gen6_clip_state.c +++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c @@ -102,6 +102,7 @@ upload_clip_state(struct brw_context *brw) dw2 |= GEN6_CLIP_NON_PERSPECTIVE_BARYCENTRIC_ENABLE; } + /* BRW_NEW_VS_PROG_DATA */ dw1 |= brw->vs.prog_data->base.cull_distance_mask; if (brw->gen >= 7) @@ -264,6 +265,7 @@ const struct brw_tracked_state gen6_clip_state = { BRW_NEW_CONTEXT | BRW_NEW_FS_PROG_DATA | BRW_NEW_GS_PROG_DATA | + BRW_NEW_VS_PROG_DATA | BRW_NEW_META_IN_PROGRESS | BRW_NEW_PRIMITIVE | BRW_NEW_RASTERIZER_DISCARD | -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] anv/blorp: Handle zero width/height copying in copy_buffer_to_image
Is this to avoid needless computation? If an app copies such an image, that's likely an app bug right? On Wed, Sep 21, 2016 at 11:17:08AM -0700, Anuj Phogat wrote: > Signed-off-by: Anuj Phogat> --- > src/intel/vulkan/anv_blorp.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c > index cb61070..de33dce 100644 > --- a/src/intel/vulkan/anv_blorp.c > +++ b/src/intel/vulkan/anv_blorp.c > @@ -273,6 +273,10 @@ copy_buffer_to_image(struct anv_cmd_buffer *cmd_buffer, > >VkExtent3D extent = > anv_sanitize_image_extent(anv_image->type, pRegions[r].imageExtent); > + > + if (extent.width == 0 || extent.height == 0) > + return; > + This seems like something we'd want put in blorp_copy(). That way we'd also handle CopyImage. >if (anv_image->type != VK_IMAGE_TYPE_3D) { > image.offset.z = pRegions[r].imageSubresource.baseArrayLayer; > extent.depth = pRegions[r].imageSubresource.layerCount; > -- > 2.5.5 > > ___ > 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] [PATCH v2 5/9] gallium/radeon: add query fences and r600_get_hw_query_params
From: Nicolai HähnleWe will support the waiting option in ARB_query_buffer_object using WAIT_REG_MEM on an appropriate fence-like dword. Some queries conveniently write their results with the highest bit set, and we can just use that; for others, we have to write a fence explicitly. ZPASS_DONE for occlusion queries writes its results with the high bit set, but it writes up to 8 pairs of results (one for each DB). We have to wait for all of these results, so let's just add an explicit fence. The new function provides summary information to be used by subsequent patches. --- src/gallium/drivers/radeon/r600_query.c | 107 +++- 1 file changed, 91 insertions(+), 16 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 2c3d530..b9041eb 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -19,20 +19,28 @@ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS 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 "r600_query.h" #include "r600_cs.h" #include "util/u_memory.h" +struct r600_hw_query_params { + unsigned start_offset; + unsigned end_offset; + unsigned fence_offset; + unsigned pair_stride; + unsigned pair_count; +}; + /* Queries without buffer handling or suspend/resume. */ struct r600_query_sw { struct r600_query b; uint64_t begin_result; uint64_t end_result; /* Fence for GPU_FINISHED. */ struct pipe_fence_handle *fence; }; @@ -352,21 +360,21 @@ static bool r600_query_hw_prepare_buffer(struct r600_common_context *ctx, return false; memset(results, 0, buffer->b.b.width0); if (query->b.type == PIPE_QUERY_OCCLUSION_COUNTER || query->b.type == PIPE_QUERY_OCCLUSION_PREDICATE) { unsigned num_results; unsigned i, j; /* Set top bits for unused backends. */ - num_results = buffer->b.b.width0 / (16 * ctx->max_db); + num_results = buffer->b.b.width0 / query->result_size; for (j = 0; j < num_results; j++) { for (i = 0; i < ctx->max_db; i++) { if (!(ctx->backend_mask & (1<max_db; } } @@ -422,50 +430,52 @@ static struct pipe_query *r600_query_hw_create(struct r600_common_context *rctx, return NULL; query->b.type = query_type; query->b.ops = _hw_ops; query->ops = _hw_default_hw_ops; switch (query_type) { case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_OCCLUSION_PREDICATE: query->result_size = 16 * rctx->max_db; + query->result_size += 16; /* for the fence + alignment */ query->num_cs_dw_begin = 6; - query->num_cs_dw_end = 6; + query->num_cs_dw_end = 6 + r600_gfx_write_fence_dwords(rctx->screen); query->flags |= R600_QUERY_HW_FLAG_PREDICATE; break; case PIPE_QUERY_TIME_ELAPSED: - query->result_size = 16; + query->result_size = 24; query->num_cs_dw_begin = 8; - query->num_cs_dw_end = 8; + query->num_cs_dw_end = 8 + r600_gfx_write_fence_dwords(rctx->screen); break; case PIPE_QUERY_TIMESTAMP: - query->result_size = 8; - query->num_cs_dw_end = 8; + query->result_size = 16; + query->num_cs_dw_end = 8 + r600_gfx_write_fence_dwords(rctx->screen); query->flags = R600_QUERY_HW_FLAG_NO_START; break; case PIPE_QUERY_PRIMITIVES_EMITTED: case PIPE_QUERY_PRIMITIVES_GENERATED: case PIPE_QUERY_SO_STATISTICS: case PIPE_QUERY_SO_OVERFLOW_PREDICATE: /* NumPrimitivesWritten, PrimitiveStorageNeeded. */ query->result_size = 32; query->num_cs_dw_begin = 6; query->num_cs_dw_end = 6; query->stream = index; query->flags |= R600_QUERY_HW_FLAG_PREDICATE; break; case PIPE_QUERY_PIPELINE_STATISTICS: /* 11 values on EG, 8 on R600. */ query->result_size = (rctx->chip_class >= EVERGREEN ? 11 : 8) * 16; + query->result_size += 8; /* for the fence + alignment */ query->num_cs_dw_begin = 6; -
[Mesa-dev] [PATCH v2 9/9] radeonsi: enable ARB_query_buffer_object (v2)
From: Nicolai Hähnlev2: enable only when compute is available --- docs/features.txt | 2 +- docs/relnotes/12.1.0.html | 1 + src/gallium/drivers/radeonsi/si_pipe.c | 21 ++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/features.txt b/docs/features.txt index cb62286..3146ae8 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -194,21 +194,21 @@ GL 4.4, GLSL 4.40 -- all DONE: i965/gen8+ GL_ARB_buffer_storage DONE (i965, nv50, nvc0, r600, radeonsi) GL_ARB_clear_texture DONE (i965, nv50, nvc0, r600, radeonsi) GL_ARB_enhanced_layouts DONE (i965) - compile-time constant expressions DONE - explicit byte offsets for blocksDONE - forced alignment within blocks DONE - specified vec4-slot component numbers DONE (i965) - specified transform/feedback layout DONE - input/output block locationsDONE GL_ARB_multi_bind DONE (all drivers) - GL_ARB_query_buffer_objectDONE (i965/hsw+, nvc0) + GL_ARB_query_buffer_objectDONE (i965/hsw+, nvc0, radeonsi) GL_ARB_texture_mirror_clamp_to_edge DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr) GL_ARB_texture_stencil8 DONE (i965/hsw+, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr) GL_ARB_vertex_type_10f_11f_11f_revDONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr) GL 4.5, GLSL 4.50: GL_ARB_ES3_1_compatibilityDONE (i965/hsw+, nvc0, radeonsi) GL_ARB_clip_control DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr) GL_ARB_conditional_render_invertedDONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, swr) GL_ARB_cull_distance DONE (i965, nv50, nvc0, radeonsi, llvmpipe, softpipe, swr) diff --git a/docs/relnotes/12.1.0.html b/docs/relnotes/12.1.0.html index fb1d714..bcdc1da 100644 --- a/docs/relnotes/12.1.0.html +++ b/docs/relnotes/12.1.0.html @@ -45,20 +45,21 @@ Note: some of the new features are only available with certain drivers. OpenGL ES 3.1 on i965/hsw OpenGL ES 3.2 on i965/gen9+ (Skylake and later) GL_ARB_ES3_1_compatibility on i965 GL_ARB_ES3_2_compatibility on i965/gen8+ GL_ARB_clear_texture on r600, radeonsi GL_ARB_cull_distance on radeonsi GL_ARB_enhanced_layouts on i965 GL_ARB_indirect_parameters on radeonsi +GL_ARB_query_buffer_object on radeonsi GL_ARB_shader_draw_parameters on radeonsi GL_ARB_shader_group_vote on nvc0 GL_ARB_shader_viewport_layer_array on i965/gen6+ GL_ARB_stencil_texturing on i965/hsw GL_ARB_texture_stencil8 on i965/hsw GL_EXT_window_rectangles on nv50, nvc0 GL_KHR_blend_equation_advanced on i965 GL_KHR_texture_compression_astc_sliced_3d on i965 GL_OES_copy_image on nv50, nvc0, r600, radeonsi, softpipe, llvmpipe GL_OES_geometry_shader on i965/gen8+, nvc0, radeonsi diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 730be9d..60ef548 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -309,20 +309,30 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, return >b.b; fail: fprintf(stderr, "radeonsi: Failed to create a context.\n"); si_destroy_context(>b.b); return NULL; } /* * pipe_screen */ +static bool si_have_tgsi_compute(struct si_screen *sscreen) +{ + /* Old kernels disallowed some register writes for SI +* that are used for indirect dispatches. */ + return HAVE_LLVM >= 0x309 && + (sscreen->b.chip_class >= CIK || + sscreen->b.info.drm_major == 3 || + (sscreen->b.info.drm_major == 2 && +sscreen->b.info.drm_minor >= 45)); +} static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param) { struct si_screen *sscreen = (struct si_screen *)pscreen; switch (param) { /* Supported features (boolean caps). */ case PIPE_CAP_TWO_SIDED_STENCIL: case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: case PIPE_CAP_ANISOTROPIC_FILTER: @@ -441,26 +451,28 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param) case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY: return 0; /* Unsupported features. */ case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS: case PIPE_CAP_USER_VERTEX_BUFFERS: case PIPE_CAP_FAKE_SW_MSAA: case
[Mesa-dev] [PATCH v2 3/9] radeonsi: add si_get_shader_buffers/get_pipe_constant_buffers (v2)
From: Nicolai HähnleThese functions extract the pipe state structure from the current descriptors, for state saving. v2: correctly dereference *buf (Bas) --- src/gallium/drivers/radeonsi/si_descriptors.c | 46 +++ src/gallium/drivers/radeonsi/si_state.h | 5 +++ 2 files changed, 51 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index b1a8594..21dad3c 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -830,20 +830,41 @@ static void si_buffer_resources_begin_new_cs(struct si_context *sctx, /* Add buffers to the CS. */ while (mask) { int i = u_bit_scan(); radeon_add_to_buffer_list(>b, >b.gfx, (struct r600_resource*)buffers->buffers[i], buffers->shader_usage, buffers->priority); } } +static void si_get_buffer_from_descriptors(struct si_buffer_resources *buffers, + struct si_descriptors *descs, + unsigned idx, struct pipe_resource **buf, + unsigned *offset, unsigned *size) +{ + pipe_resource_reference(buf, buffers->buffers[idx]); + if (*buf) { + struct r600_resource *res = r600_resource(*buf); + const uint32_t *desc = descs->list + idx * 4; + uint64_t va; + + *size = desc[2]; + + assert(G_008F04_STRIDE(desc[1]) == 0); + va = ((uint64_t)desc[1] << 32) | desc[0]; + + assert(va >= res->gpu_address && va + *size <= res->gpu_address + res->bo_size); + *offset = va - res->gpu_address; + } +} + /* VERTEX BUFFERS */ static void si_vertex_buffers_begin_new_cs(struct si_context *sctx) { struct si_descriptors *desc = >vertex_buffers; int count = sctx->vertex_elements ? sctx->vertex_elements->count : 0; int i; for (i = 0; i < count; i++) { int vb = sctx->vertex_elements->elements[i].vertex_buffer_index; @@ -1055,20 +1076,30 @@ static void si_pipe_set_constant_buffer(struct pipe_context *ctx, struct si_context *sctx = (struct si_context *)ctx; if (shader >= SI_NUM_SHADERS) return; si_set_constant_buffer(sctx, >const_buffers[shader], si_const_buffer_descriptors_idx(shader), slot, input); } +void si_get_pipe_constant_buffer(struct si_context *sctx, uint shader, +uint slot, struct pipe_constant_buffer *cbuf) +{ + cbuf->user_buffer = NULL; + si_get_buffer_from_descriptors( + >const_buffers[shader], + si_const_buffer_descriptors(sctx, shader), + slot, >buffer, >buffer_offset, >buffer_size); +} + /* SHADER BUFFERS */ static unsigned si_shader_buffer_descriptors_idx(enum pipe_shader_type shader) { return SI_DESCS_FIRST_SHADER + shader * SI_NUM_SHADER_DESCS + SI_SHADER_DESCS_SHADER_BUFFERS; } static struct si_descriptors * @@ -1125,20 +1156,35 @@ static void si_set_shader_buffers(struct pipe_context *ctx, radeon_add_to_buffer_list_check_mem(>b, >b.gfx, buf, buffers->shader_usage, buffers->priority, true); buffers->enabled_mask |= 1u << slot; descs->dirty_mask |= 1u << slot; sctx->descriptors_dirty |= 1u << si_shader_buffer_descriptors_idx(shader); } } +void si_get_shader_buffers(struct si_context *sctx, uint shader, + uint start_slot, uint count, + struct pipe_shader_buffer *sbuf) +{ + struct si_buffer_resources *buffers = >shader_buffers[shader]; + struct si_descriptors *descs = si_shader_buffer_descriptors(sctx, shader); + + for (unsigned i = 0; i < count; ++i) { + si_get_buffer_from_descriptors( + buffers, descs, start_slot + i, + [i].buffer, [i].buffer_offset, + [i].buffer_size); + } +} + /* RING BUFFERS */ void si_set_ring_buffer(struct pipe_context *ctx, uint slot, struct pipe_resource *buffer, unsigned stride, unsigned num_records, bool add_tid, bool swizzle, unsigned element_size, unsigned index_stride, uint64_t offset) { struct si_context *sctx = (struct si_context *)ctx; struct si_buffer_resources *buffers = >rw_buffers; diff --git a/src/gallium/drivers/radeonsi/si_state.h
[Mesa-dev] [PATCH v2 7/9] gallium/radeon: zero all query buffers
From: Nicolai HähnleTo ensure that fences are properly initialized. --- src/gallium/drivers/radeon/r600_query.c | 26 ++ src/gallium/drivers/radeon/r600_query.h | 2 +- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index c1c3599..d96f9fc 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -331,25 +331,23 @@ static struct r600_resource *r600_new_query_buffer(struct r600_common_context *c /* Queries are normally read by the CPU after * being written by the gpu, hence staging is probably a good * usage pattern. */ struct r600_resource *buf = (struct r600_resource*) pipe_buffer_create(ctx->b.screen, PIPE_BIND_CUSTOM, PIPE_USAGE_STAGING, buf_size); if (!buf) return NULL; - if (query->flags & R600_QUERY_HW_FLAG_PREDICATE) { - if (!query->ops->prepare_buffer(ctx, query, buf)) { - r600_resource_reference(, NULL); - return NULL; - } + if (!query->ops->prepare_buffer(ctx, query, buf)) { + r600_resource_reference(, NULL); + return NULL; } return buf; } static bool r600_query_hw_prepare_buffer(struct r600_common_context *ctx, struct r600_query_hw *query, struct r600_resource *buffer) { /* Callers ensure that the buffer is currently unused by the GPU. */ @@ -433,42 +431,40 @@ static struct pipe_query *r600_query_hw_create(struct r600_common_context *rctx, query->b.ops = _hw_ops; query->ops = _hw_default_hw_ops; switch (query_type) { case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_OCCLUSION_PREDICATE: query->result_size = 16 * rctx->max_db; query->result_size += 16; /* for the fence + alignment */ query->num_cs_dw_begin = 6; query->num_cs_dw_end = 6 + r600_gfx_write_fence_dwords(rctx->screen); - query->flags |= R600_QUERY_HW_FLAG_PREDICATE; break; case PIPE_QUERY_TIME_ELAPSED: query->result_size = 24; query->num_cs_dw_begin = 8; query->num_cs_dw_end = 8 + r600_gfx_write_fence_dwords(rctx->screen); break; case PIPE_QUERY_TIMESTAMP: query->result_size = 16; query->num_cs_dw_end = 8 + r600_gfx_write_fence_dwords(rctx->screen); query->flags = R600_QUERY_HW_FLAG_NO_START; break; case PIPE_QUERY_PRIMITIVES_EMITTED: case PIPE_QUERY_PRIMITIVES_GENERATED: case PIPE_QUERY_SO_STATISTICS: case PIPE_QUERY_SO_OVERFLOW_PREDICATE: /* NumPrimitivesWritten, PrimitiveStorageNeeded. */ query->result_size = 32; query->num_cs_dw_begin = 6; query->num_cs_dw_end = 6; query->stream = index; - query->flags |= R600_QUERY_HW_FLAG_PREDICATE; break; case PIPE_QUERY_PIPELINE_STATISTICS: /* 11 values on EG, 8 on R600. */ query->result_size = (rctx->chip_class >= EVERGREEN ? 11 : 8) * 16; query->result_size += 8; /* for the fence + alignment */ query->num_cs_dw_begin = 6; query->num_cs_dw_end = 6 + r600_gfx_write_fence_dwords(rctx->screen); break; default: assert(0); @@ -786,30 +782,28 @@ void r600_query_hw_reset_buffers(struct r600_common_context *rctx, while (prev) { struct r600_query_buffer *qbuf = prev; prev = prev->previous; r600_resource_reference(>buf, NULL); FREE(qbuf); } query->buffer.results_end = 0; query->buffer.previous = NULL; - if (query->flags & R600_QUERY_HW_FLAG_PREDICATE) { - /* Obtain a new buffer if the current one can't be mapped without a stall. */ - if (r600_rings_is_buffer_referenced(rctx, query->buffer.buf->buf, RADEON_USAGE_READWRITE) || - !rctx->ws->buffer_wait(query->buffer.buf->buf, 0, RADEON_USAGE_READWRITE)) { + /* Obtain a new buffer if the current one can't be mapped without a stall. */ + if (r600_rings_is_buffer_referenced(rctx, query->buffer.buf->buf, RADEON_USAGE_READWRITE) || + !rctx->ws->buffer_wait(query->buffer.buf->buf, 0, RADEON_USAGE_READWRITE)) { + r600_resource_reference(>buffer.buf, NULL); + query->buffer.buf = r600_new_query_buffer(rctx, query); + } else { + if
[Mesa-dev] [PATCH v2 8/9] gallium/radeon: implement get_query_result_resource (v2)
From: Nicolai Hähnlev2: fix a comment (Gustaw Smolarczyk) --- src/gallium/drivers/radeon/r600_pipe_common.c | 3 + src/gallium/drivers/radeon/r600_pipe_common.h | 2 + src/gallium/drivers/radeon/r600_query.c | 391 +- src/gallium/drivers/radeon/r600_query.h | 7 + 4 files changed, 402 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index b681a94..5b1ce04 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -566,20 +566,23 @@ void r600_common_context_cleanup(struct r600_common_context *rctx) assert(!rctx->dcc_stats[i].query_active); for (j = 0; j < ARRAY_SIZE(rctx->dcc_stats[i].ps_stats); j++) if (rctx->dcc_stats[i].ps_stats[j]) rctx->b.destroy_query(>b, rctx->dcc_stats[i].ps_stats[j]); r600_texture_reference(>dcc_stats[i].tex, NULL); } + if (rctx->query_result_shader) + rctx->b.delete_compute_state(>b, rctx->query_result_shader); + if (rctx->gfx.cs) rctx->ws->cs_destroy(rctx->gfx.cs); if (rctx->dma.cs) rctx->ws->cs_destroy(rctx->dma.cs); if (rctx->ctx) rctx->ws->ctx_destroy(rctx->ctx); if (rctx->uploader) { u_upload_destroy(rctx->uploader); } diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 32acca5..f23f1c4 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -614,20 +614,22 @@ struct r600_common_context { boolquery_active; } dcc_stats[5]; /* The list of all texture buffer objects in this context. * This list is walked when a buffer is invalidated/reallocated and * the GPU addresses are updated. */ struct list_headtexture_buffers; struct pipe_debug_callback debug; + void*query_result_shader; + /* Copy one resource to another using async DMA. */ void (*dma_copy)(struct pipe_context *ctx, struct pipe_resource *dst, unsigned dst_level, unsigned dst_x, unsigned dst_y, unsigned dst_z, struct pipe_resource *src, unsigned src_level, const struct pipe_box *src_box); void (*clear_buffer)(struct pipe_context *ctx, struct pipe_resource *dst, diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index d96f9fc..958cef9 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -18,20 +18,23 @@ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL * THE AUTHOR(S) AND/OR THEIR SUPPLIERS 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 "r600_query.h" #include "r600_cs.h" #include "util/u_memory.h" +#include "util/u_upload_mgr.h" + +#include "tgsi/tgsi_text.h" struct r600_hw_query_params { unsigned start_offset; unsigned end_offset; unsigned fence_offset; unsigned pair_stride; unsigned pair_count; }; /* Queries without buffer handling or suspend/resume. */ @@ -275,25 +278,27 @@ static bool r600_query_sw_get_result(struct r600_common_context *rctx, break; case R600_QUERY_CURRENT_GPU_SCLK: case R600_QUERY_CURRENT_GPU_MCLK: result->u64 *= 100; break; } return true; } + static struct r600_query_ops sw_query_ops = { .destroy = r600_query_sw_destroy, .begin = r600_query_sw_begin, .end = r600_query_sw_end, - .get_result = r600_query_sw_get_result + .get_result = r600_query_sw_get_result, + .get_result_resource = NULL }; static struct pipe_query *r600_query_sw_create(struct pipe_context *ctx, unsigned query_type) { struct r600_query_sw *query; query = CALLOC_STRUCT(r600_query_sw); if (!query) return NULL; @@ -373,25 +378,34 @@ static bool r600_query_hw_prepare_buffer(struct r600_common_context *ctx, results[(i * 4)+3] = 0x8000; } } results += 4 * ctx->max_db; }
[Mesa-dev] [PATCH v2 1/9] gallium/radeon: add barrier_flags to r600_common_screen
From: Nicolai HähnleThere are driver-specific context flags for barriers that are not covered by the Gallium barrier interfaces. The R600 settings of these flags may not be optimal, but we're not going to use them yet anyway. --- src/gallium/drivers/r600/r600_pipe.c | 6 ++ src/gallium/drivers/radeon/r600_pipe_common.h | 12 src/gallium/drivers/radeonsi/si_pipe.c| 5 + 3 files changed, 23 insertions(+) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index c09821d..0799ba2 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -673,20 +673,26 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) rscreen->has_compressed_msaa_texturing = true; break; default: rscreen->has_msaa = FALSE; rscreen->has_compressed_msaa_texturing = false; } rscreen->b.has_cp_dma = rscreen->b.info.drm_minor >= 27 && !(rscreen->b.debug_flags & DBG_NO_CP_DMA); + rscreen->b.barrier_flags.cp_to_L2 = + R600_CONTEXT_INV_VERTEX_CACHE | + R600_CONTEXT_INV_TEX_CACHE | + R600_CONTEXT_INV_CONST_CACHE; + rscreen->b.barrier_flags.compute_to_L2 = R600_CONTEXT_PS_PARTIAL_FLUSH; + rscreen->global_pool = compute_memory_pool_new(rscreen); /* Create the auxiliary context. This must be done last. */ rscreen->b.aux_context = rscreen->b.b.context_create(>b.b, NULL, 0); #if 0 /* This is for testing whether aux_context and buffer clearing work correctly. */ struct pipe_resource templ = {}; templ.width0 = 4; templ.height0 = 2048; diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index d9f22e4..dd33eab 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -408,20 +408,32 @@ struct r600_common_screen { * contexts' compressed texture binding masks. */ unsignedcompressed_colortex_counter; /* Atomically increment this counter when an existing texture's * backing buffer or tile mode parameters have changed that requires * recomputation of shader descriptors. */ unsigneddirty_tex_descriptor_counter; + struct { + /* Context flags to set so that all writes from earlier jobs +* in the CP are seen by L2 clients. +*/ + unsigned cp_to_L2; + + /* Context flags to set so that all writes from earlier +* compute jobs are seen by L2 clients. +*/ + unsigned compute_to_L2; + } barrier_flags; + void (*query_opaque_metadata)(struct r600_common_screen *rscreen, struct r600_texture *rtex, struct radeon_bo_metadata *md); void (*apply_opaque_metadata)(struct r600_common_screen *rscreen, struct r600_texture *rtex, struct radeon_bo_metadata *md); }; /* This encapsulates a state or an operation which can emitted into the GPU diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 8f9e6f5..730be9d 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -811,20 +811,25 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) sscreen->b.info.pfp_fw_version >= 121 && sscreen->b.info.me_fw_version >= 87); sscreen->b.has_cp_dma = true; sscreen->b.has_streamout = true; pipe_mutex_init(sscreen->shader_parts_mutex); sscreen->use_monolithic_shaders = HAVE_LLVM < 0x0308 || (sscreen->b.debug_flags & DBG_MONOLITHIC_SHADERS) != 0; + sscreen->b.barrier_flags.cp_to_L2 = SI_CONTEXT_INV_SMEM_L1 | + SI_CONTEXT_INV_VMEM_L1 | + SI_CONTEXT_INV_GLOBAL_L2; + sscreen->b.barrier_flags.compute_to_L2 = SI_CONTEXT_CS_PARTIAL_FLUSH; + if (debug_get_bool_option("RADEON_DUMP_SHADERS", false)) sscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS; /* Only enable as many threads as we have target machines and CPUs. */ num_cpus = sysconf(_SC_NPROCESSORS_ONLN); num_compiler_threads = MIN2(num_cpus, ARRAY_SIZE(sscreen->tm)); for (i = 0; i < num_compiler_threads; i++) sscreen->tm[i] = si_create_llvm_target_machine(sscreen); -- 2.7.4 ___ mesa-dev mailing list
[Mesa-dev] [PATCH v2 2/9] gallium/radeon: add r600_gfx_{write, wait}_fence
From: Nicolai HähnleFor bottom-of-pipe fences inside the gfx command stream. --- src/gallium/drivers/radeon/r600_pipe_common.c | 52 +++ src/gallium/drivers/radeon/r600_pipe_common.h | 5 +++ src/gallium/drivers/radeonsi/si_perfcounter.c | 41 ++--- 3 files changed, 60 insertions(+), 38 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index b0d9813..b681a94 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -73,20 +73,72 @@ void radeon_shader_binary_clean(struct radeon_shader_binary *b) FREE(b->global_symbol_offsets); FREE(b->relocs); FREE(b->disasm_string); FREE(b->llvm_ir_string); } /* * pipe_context */ +void r600_gfx_write_fence(struct r600_common_context *ctx, + uint64_t va, uint32_t old_value, uint32_t new_value) +{ + struct radeon_winsys_cs *cs = ctx->gfx.cs; + + if (ctx->chip_class == CIK) { + /* Two EOP events are required to make all engines go idle +* (and optional cache flushes executed) before the timestamp +* is written. +*/ + radeon_emit(cs, PKT3(PKT3_EVENT_WRITE_EOP, 4, 0)); + radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_BOTTOM_OF_PIPE_TS) | + EVENT_INDEX(5)); + radeon_emit(cs, va); + radeon_emit(cs, (va >> 32) | EOP_DATA_SEL(1)); + radeon_emit(cs, old_value); /* immediate data */ + radeon_emit(cs, 0); /* unused */ + } + + radeon_emit(cs, PKT3(PKT3_EVENT_WRITE_EOP, 4, 0)); + radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_BOTTOM_OF_PIPE_TS) | + EVENT_INDEX(5)); + radeon_emit(cs, va); + radeon_emit(cs, (va >> 32) | EOP_DATA_SEL(1)); + radeon_emit(cs, new_value); /* immediate data */ + radeon_emit(cs, 0); /* unused */ +} + +unsigned r600_gfx_write_fence_dwords(struct r600_common_screen *screen) +{ + unsigned dwords = 6; + + if (screen->chip_class == CIK) + dwords *= 2; + + return dwords; +} + +void r600_gfx_wait_fence(struct r600_common_context *ctx, +uint64_t va, uint32_t ref, uint32_t mask) +{ + struct radeon_winsys_cs *cs = ctx->gfx.cs; + + radeon_emit(cs, PKT3(PKT3_WAIT_REG_MEM, 5, 0)); + radeon_emit(cs, WAIT_REG_MEM_EQUAL | WAIT_REG_MEM_MEM_SPACE(1)); + radeon_emit(cs, va); + radeon_emit(cs, va >> 32); + radeon_emit(cs, ref); /* reference value */ + radeon_emit(cs, mask); /* mask */ + radeon_emit(cs, 4); /* poll interval */ +} + void r600_draw_rectangle(struct blitter_context *blitter, int x1, int y1, int x2, int y2, float depth, enum blitter_attrib_type type, const union pipe_color_union *attrib) { struct r600_common_context *rctx = (struct r600_common_context*)util_blitter_get_pipe(blitter); struct pipe_viewport_state viewport; struct pipe_resource *buf = NULL; unsigned offset = 0; diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index dd33eab..96b23b2 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -688,20 +688,25 @@ struct pipe_resource * r600_aligned_buffer_create(struct pipe_screen *screen, unsigned alignment); struct pipe_resource * r600_buffer_from_user_memory(struct pipe_screen *screen, const struct pipe_resource *templ, void *user_memory); void r600_invalidate_resource(struct pipe_context *ctx, struct pipe_resource *resource); /* r600_common_pipe.c */ +void r600_gfx_write_fence(struct r600_common_context *ctx, + uint64_t va, uint32_t old_value, uint32_t new_value); +unsigned r600_gfx_write_fence_dwords(struct r600_common_screen *screen); +void r600_gfx_wait_fence(struct r600_common_context *ctx, +uint64_t va, uint32_t ref, uint32_t mask); void r600_draw_rectangle(struct blitter_context *blitter, int x1, int y1, int x2, int y2, float depth, enum blitter_attrib_type type, const union pipe_color_union *attrib); bool r600_common_screen_init(struct r600_common_screen *rscreen, struct radeon_winsys *ws); void r600_destroy_common_screen(struct r600_common_screen *rscreen); void r600_preflush_suspend_features(struct r600_common_context *ctx); void r600_postflush_resume_features(struct r600_common_context *ctx); bool r600_common_context_init(struct
Re: [Mesa-dev] [PATCH 2/4] glsl: Immediately inline built-ins rather than generating calls.
On 09/21/2016 10:20 PM, Kenneth Graunke wrote: > In the past, we imported the prototypes of built-in functions, generated > calls to those, and waited until link time to resolve the calls and > import the actual code for the built-in functions. I thought part of the reason we did this was to account for some of the weird desktop GLSL rules about overriding and overloading built-in functions. Does this still handle that nonsense correctly? I remember you spent a lot of time rewritting this code to get all that right. There's one additional question below. > This severely limited our compile-time optimization opportunities: even > trivial functions like dot() were represented as function calls. We > also had no way of reasoning about those calls; they could have been > 1,000 line functions with side-effects for all we knew. > > Practically all built-in functions are trivial translations to > ir_expression opcodes, so it makes sense to just generate those inline. > Since we eventually inline all functions anyway, we may as well just do > it for all built-in functions. > > There's only one snag: built-in functions that refer to built-in global > variables need those remapped to the variables in the shader being > compiled, rather than the ones in the built-in shader. Currently, > ftransform() is the only function matching those criteria, so it seemed > easier to just make it a special case. > > On Skylake: > > total instructions in shared programs: 12023491 -> 12024010 (0.00%) > instructions in affected programs: 77595 -> 78114 (0.67%) > helped: 97 > HURT: 309 > > total cycles in shared programs: 137239044 -> 137295498 (0.04%) > cycles in affected programs: 16714026 -> 16770480 (0.34%) > helped: 4663 > HURT: 4923 > > while these statistics are in the wrong direction, the number of > hurt programs is small (309 / 41282 = 0.75%), and I don't think > anything can be done about it. A change like this significantly > alters the order in which optimizations are performed. > > Signed-off-by: Kenneth Graunke> --- > src/compiler/glsl/ast_function.cpp | 46 > ++ > 1 file changed, 22 insertions(+), 24 deletions(-) > > diff --git a/src/compiler/glsl/ast_function.cpp > b/src/compiler/glsl/ast_function.cpp > index 7e62ab7..ac3b52d 100644 > --- a/src/compiler/glsl/ast_function.cpp > +++ b/src/compiler/glsl/ast_function.cpp > @@ -430,7 +430,8 @@ generate_call(exec_list *instructions, > ir_function_signature *sig, >exec_list *actual_parameters, >ir_variable *sub_var, >ir_rvalue *array_idx, > - struct _mesa_glsl_parse_state *state) > + struct _mesa_glsl_parse_state *state, > + bool inline_immediately) The caller just passes sig->is_builtin() for this parameter. We already pass sig into this function. Do we need this new parameter? > { > void *ctx = state; > exec_list post_call_conversions; > @@ -542,6 +543,10 @@ generate_call(exec_list *instructions, > ir_function_signature *sig, > ir_call *call = new(ctx) ir_call(sig, deref, > actual_parameters, sub_var, array_idx); > instructions->push_tail(call); > + if (inline_immediately) { > + call->generate_inline(call); > + call->remove(); > + } > > /* Also emit any necessary out-parameter conversions. */ > instructions->append_list(_call_conversions); > @@ -557,19 +562,18 @@ match_function_by_name(const char *name, > exec_list *actual_parameters, > struct _mesa_glsl_parse_state *state) > { > - void *ctx = state; > ir_function *f = state->symbols->get_function(name); > ir_function_signature *local_sig = NULL; > ir_function_signature *sig = NULL; > > /* Is the function hidden by a record type constructor? */ > if (state->symbols->get_type(name)) > - goto done; /* no match */ > + return sig; /* no match */ > > /* Is the function hidden by a variable (impossible in 1.10)? */ > if (!state->symbols->separate_function_namespace > && state->symbols->get_variable(name)) > - goto done; /* no match */ > + return sig; /* no match */ > > if (f != NULL) { >/* In desktop GL, the presence of a user-defined signature hides any > @@ -583,31 +587,15 @@ match_function_by_name(const char *name, >sig = local_sig = f->matching_signature(state, actual_parameters, >allow_builtins, _exact); >if (is_exact) > - goto done; > + return sig; > >if (!allow_builtins) > - goto done; > + return sig; > } > > /* Local shader has no exact candidates; check the built-ins. */ > _mesa_glsl_initialize_builtin_functions(); > sig = _mesa_glsl_find_builtin_function(state, name, actual_parameters); > - > - done: > - if (sig != NULL) { > -
Re: [Mesa-dev] [PATCH 00/15] Compile GLSL to ir_builder
On 09/21/2016 10:29 PM, Kenneth Graunke wrote: > Hi Ian, > > I just sent out a four patch series that I think will accomplish a lot > of what you were trying to do with the "do post-link optimizations, but > only for built-ins" patches. But it deletes code. > > https://lists.freedesktop.org/archives/mesa-dev/2016-September/129437.html > > I'd been playing with this on and off for a few years, but there were > a few functional regressions I hadn't solved, and I wasn't sure about > the minor shader-db regressions. Everything works now though. Yeah... I've observed some weirdness on Jenkins with the bits that you reviewed. I'm trying to assess that and get those landed. After that, I will try to rebase the rest of this series on your series. > --Ken signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/2] Implement lanczos interpolation filter
Am 21.09.2016 um 16:38 schrieb Andy Furniss: Andy Furniss wrote: Andy Furniss wrote: Andy Furniss wrote: bz2 compressed vid showing the issue - https://drive.google.com/open?id=0BxP5-S1t9VEEUE5sbUFBV20zSms To be clear this is just the test rez vid I used so you can possibly recreate the issue your self. Hmm, interesting, with bicubic, hqscaling=1 this vid behaves differently with mplayer compared to mpv, the latter looks like it's scaling a bit, maybe there's an off by one somewhere in mpv code. I don't know if it's the cause, but looking for differences between mplayer and mpv it seems that mpv sets video mixer height so it's divisible by 32 but mplayer doesn't. For this 720p sample it uses 736 and mplayer uses 720. vdp_video_mixer_create(1, 1, {11}, 3, {0, 1, 2}, {1280, 736, 0}, -) for output surfaces and render calls it uses 720. So does the bicubic code see/use this 736 somewhere? Well that would clearly explain some differences. Are the video input buffers rounded up to 32 as well? If not then mpv is clearly not using the interface correctly here: #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT The exact height of input video surfaces. This parameter's type is uint32_t. This parameter defaults to 0 if not specified, which entails that it must be specified. The application may query this parameter's supported range. #define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH The exact width of input video surfaces. This parameter's type is uint32_t. This parameter defaults to 0 if not specified, which entails that it must be specified. The application may query this parameter's supported range. Maybe we should make the checks done during rending more strict? Regards, Christian. ___ 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 3/4] glsl: Delete ftransform support from builtin_functions.cpp.
Pending patch 2, this patch is Reviewed-by: Ian RomanickOn 09/21/2016 10:20 PM, Kenneth Graunke wrote: > This is now handled directly by ast_function.cpp. > > Signed-off-by: Kenneth Graunke > --- > src/compiler/glsl/builtin_functions.cpp | 30 -- > 1 file changed, 4 insertions(+), 26 deletions(-) > > diff --git a/src/compiler/glsl/builtin_functions.cpp > b/src/compiler/glsl/builtin_functions.cpp > index 19ef99e..102c039 100644 > --- a/src/compiler/glsl/builtin_functions.cpp > +++ b/src/compiler/glsl/builtin_functions.cpp > @@ -585,10 +585,6 @@ public: > private: > void *mem_ctx; > > - /** Global variables used by built-in functions. */ > - ir_variable *gl_ModelViewProjectionMatrix; > - ir_variable *gl_Vertex; > - > void create_shader(); > void create_intrinsics(); > void create_builtins(); > @@ -905,9 +901,7 @@ enum image_function_flags { > * @{ > */ > builtin_builder::builtin_builder() > - : shader(NULL), > - gl_ModelViewProjectionMatrix(NULL), > - gl_Vertex(NULL) > + : shader(NULL) > { > mem_ctx = NULL; > } > @@ -974,16 +968,6 @@ builtin_builder::create_shader() > */ > shader = _mesa_new_shader(0, MESA_SHADER_VERTEX); > shader->symbols = new(mem_ctx) glsl_symbol_table; > - > - gl_ModelViewProjectionMatrix = > - new(mem_ctx) ir_variable(glsl_type::mat4_type, > - "gl_ModelViewProjectionMatrix", > - ir_var_uniform); > - > - shader->symbols->add_variable(gl_ModelViewProjectionMatrix); > - > - gl_Vertex = in_var(glsl_type::vec4_type, "gl_Vertex"); > - shader->symbols->add_variable(gl_Vertex); > } > > /** @} */ > @@ -3978,15 +3962,9 @@ builtin_builder::_ftransform() > { > MAKE_SIG(glsl_type::vec4_type, compatibility_vs_only, 0); > > - body.emit(ret(new(mem_ctx) ir_expression(ir_binop_mul, > - glsl_type::vec4_type, > - var_ref(gl_ModelViewProjectionMatrix), > - var_ref(gl_Vertex; > - > - /* FINISHME: Once the ir_expression() constructor handles type inference > -* for matrix operations, we can simplify this to: > -* > -*body.emit(ret(mul(gl_ModelViewProjectionMatrix, gl_Vertex))); > + /* ftransform() refers to global variables, and is always emitted > +* directly by ast_function.cpp. Just emit a prototype here so we > +* can recognize calls to it. > */ > return sig; > } > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/4] glsl: Delete linker stuff relating to built-in functions.
On 09/21/2016 10:20 PM, Kenneth Graunke wrote: > Now that we generate built-in functions inline, there's no need to link > against the built-in shader, and no built-in prototypes to consider. > > This lets us delete a bunch of code. Boy howdy. This simplifies things quite a bit. Pending patch 2, this patch is Reviewed-by: Ian Romanick> Signed-off-by: Kenneth Graunke > --- > src/compiler/glsl/link_functions.cpp | 32 +++ > src/compiler/glsl/linker.cpp | 42 > +++- > 2 files changed, 16 insertions(+), 58 deletions(-) > > diff --git a/src/compiler/glsl/link_functions.cpp > b/src/compiler/glsl/link_functions.cpp > index b4aae5e..e4f77be 100644 > --- a/src/compiler/glsl/link_functions.cpp > +++ b/src/compiler/glsl/link_functions.cpp > @@ -32,7 +32,7 @@ > > static ir_function_signature * > find_matching_signature(const char *name, const exec_list *actual_parameters, > -glsl_symbol_table *symbols, bool use_builtin); > +glsl_symbol_table *symbols); > > namespace { > > @@ -74,12 +74,15 @@ public: >assert(callee != NULL); >const char *const name = callee->function_name(); > > + /* We don't actually need to find intrinsics; they're not real */ > + if (callee->is_intrinsic) > + return visit_continue; > + >/* Determine if the requested function signature already exists in the > * final linked shader. If it does, use it as the target of the call. > */ >ir_function_signature *sig = > - find_matching_signature(name, >parameters, linked->symbols, > - ir->use_builtin); > + find_matching_signature(name, >parameters, linked->symbols); >if (sig != NULL) { >ir->callee = sig; >return visit_continue; > @@ -90,8 +93,7 @@ public: > */ >for (unsigned i = 0; i < num_shaders; i++) { > sig = find_matching_signature(name, >actual_parameters, > - shader_list[i]->symbols, > - ir->use_builtin); > + shader_list[i]->symbols); > if (sig) > break; >} > @@ -122,9 +124,7 @@ public: > >ir_function_signature *linked_sig = >f->exact_matching_signature(NULL, >parameters); > - if ((linked_sig == NULL) > - || ((linked_sig != NULL) > - && (linked_sig->is_builtin() != ir->use_builtin))) { > + if (linked_sig == NULL) { >linked_sig = new(linked) ir_function_signature(callee->return_type); >f->add_signature(linked_sig); >} > @@ -314,22 +314,16 @@ private: > */ > ir_function_signature * > find_matching_signature(const char *name, const exec_list *actual_parameters, > -glsl_symbol_table *symbols, bool use_builtin) > +glsl_symbol_table *symbols) > { > ir_function *const f = symbols->get_function(name); > > if (f) { >ir_function_signature *sig = > - f->matching_signature(NULL, actual_parameters, use_builtin); > - > - if (sig && (sig->is_defined || sig->is_intrinsic)) { > - /* If this function expects to bind to a built-in function and the > - * signature that we found isn't a built-in, keep looking. Also > keep > - * looking if we expect a non-built-in but found a built-in. > - */ > - if (use_builtin == sig->is_builtin()) > -return sig; > - } > + f->matching_signature(NULL, actual_parameters, false); > + > + if (sig && (sig->is_defined || sig->is_intrinsic)) > + return sig; > } > > return NULL; > diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp > index 606d006..929a653 100644 > --- a/src/compiler/glsl/linker.cpp > +++ b/src/compiler/glsl/linker.cpp > @@ -2098,14 +2098,13 @@ link_intrastage_shaders(void *mem_ctx, > continue; > > foreach_in_list(ir_function_signature, sig, >signatures) { > -if (!sig->is_defined || sig->is_builtin()) > +if (!sig->is_defined) > continue; > > ir_function_signature *other_sig = > other->exact_matching_signature(NULL, >parameters); > > -if ((other_sig != NULL) && other_sig->is_defined > -&& !other_sig->is_builtin()) { > +if (other_sig != NULL && other_sig->is_defined) { > linker_error(prog, "function `%s' is multiply defined\n", > f->name); > return NULL; > @@ -2171,42 +2170,7 @@ link_intrastage_shaders(void *mem_ctx, > insertion_point, true, linked); > } > > - /* Check if any shader needs built-in functions. */ > - bool need_builtins
[Mesa-dev] [PATCH v2 0/9] radeonsi: ARB_query_buffer_object implementation
Hi all, some fixes based on feedback from v1. In related news, https://reviews.llvm.org/D24822 improves the lowering of the division-by-constant for timestamp queries in LLVM, but is not required for this series to work. Please review! Nicolai ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v2 4/9] radeonsi: add save_qbo_state
From: Nicolai HähnleSave compute shader state that will be used for the ARB_query_buffer_object implementation. --- src/gallium/drivers/radeon/r600_pipe_common.h | 3 +++ src/gallium/drivers/radeon/r600_query.h | 7 +++ src/gallium/drivers/radeonsi/si_state.c | 12 3 files changed, 22 insertions(+) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 96b23b2..32acca5 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -113,20 +113,21 @@ enum r600_coherency { #ifdef PIPE_ARCH_BIG_ENDIAN #define R600_BIG_ENDIAN 1 #else #define R600_BIG_ENDIAN 0 #endif struct r600_common_context; struct r600_perfcounters; struct tgsi_shader_info; +struct r600_qbo_state; struct radeon_shader_reloc { char name[32]; uint64_t offset; }; struct radeon_shader_binary { /** Shader code */ unsigned char *code; unsigned code_size; @@ -643,20 +644,22 @@ struct r600_common_context { void (*decompress_dcc)(struct pipe_context *ctx, struct r600_texture *rtex); /* Reallocate the buffer and update all resource bindings where * the buffer is bound, including all resource descriptors. */ void (*invalidate_buffer)(struct pipe_context *ctx, struct pipe_resource *buf); /* Enable or disable occlusion queries. */ void (*set_occlusion_query_state)(struct pipe_context *ctx, bool enable); + void (*save_qbo_state)(struct pipe_context *ctx, struct r600_qbo_state *st); + /* This ensures there is enough space in the command stream. */ void (*need_gfx_cs_space)(struct pipe_context *ctx, unsigned num_dw, bool include_draw_vbo); void (*set_atom_dirty)(struct r600_common_context *ctx, struct r600_atom *atom, bool dirty); void (*check_vm_faults)(struct r600_common_context *ctx, struct radeon_saved_cs *saved, enum ring_type ring); diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index 0cd1a02..4f5aa3a 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -22,20 +22,21 @@ * * Authors: * Nicolai Hähnle * */ #ifndef R600_QUERY_H #define R600_QUERY_H #include "pipe/p_defines.h" +#include "pipe/p_state.h" #include "util/list.h" struct pipe_context; struct pipe_query; struct r600_common_context; struct r600_common_screen; struct r600_query; struct r600_query_hw; struct r600_resource; @@ -260,11 +261,17 @@ int r600_get_perfcounter_group_info(struct r600_common_screen *, bool r600_perfcounters_init(struct r600_perfcounters *, unsigned num_blocks); void r600_perfcounters_add_block(struct r600_common_screen *, struct r600_perfcounters *, const char *name, unsigned flags, unsigned counters, unsigned selectors, unsigned instances, void *data); void r600_perfcounters_do_destroy(struct r600_perfcounters *); void r600_query_hw_reset_buffers(struct r600_common_context *rctx, struct r600_query_hw *query); +struct r600_qbo_state { + void *saved_compute; + struct pipe_constant_buffer saved_const0; + struct pipe_shader_buffer saved_ssbo[3]; +}; + #endif /* R600_QUERY_H */ diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 1703e42..443dc37 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -21,20 +21,21 @@ * USE OR OTHER DEALINGS IN THE SOFTWARE. * * Authors: * Christian König */ #include "si_pipe.h" #include "si_shader.h" #include "sid.h" #include "radeon/r600_cs.h" +#include "radeon/r600_query.h" #include "util/u_dual_blend.h" #include "util/u_format.h" #include "util/u_format_s3tc.h" #include "util/u_memory.h" #include "util/u_pstipple.h" #include "util/u_resource.h" /* Initialize an external atom (owned by ../radeon). */ static void @@ -1067,20 +1068,30 @@ static void si_set_active_query_state(struct pipe_context *ctx, boolean enable) } } static void si_set_occlusion_query_state(struct pipe_context *ctx, bool enable) { struct si_context *sctx = (struct si_context*)ctx; si_mark_atom_dirty(sctx, >db_render_state); } +static void si_save_qbo_state(struct pipe_context *ctx, struct r600_qbo_state *st) +{ + struct si_context *sctx = (struct si_context*)ctx; + + st->saved_compute = sctx->cs_shader_state.program; + +
Re: [Mesa-dev] [PATCH 0/4] glsl: Builtins, now!
On 09/21/2016 10:20 PM, Kenneth Graunke wrote: > Hello, > > This series reworks the GLSL compiler to inline built-in functions > immediately, at compile time, rather than importing prototypes and > linking against an extra shader later on. > > Without this, compile time optimizations are nearly useless. For example, > trying to use a dot product would generate: > >(call dot ...) > > which would not be turned into > >(expression dot ...) > > until link time, when we actually import the functions, and finally inline. > > Function calls are opaque, and most optimization passes freak out and bail > when they see them. For example, loop unrolling wouldn't happen at compile > time at all if a loop contains a built-in function call. This is pretty bad. > > Most built-in functions turn into opcodes, or tiny expression trees. > It makes sense to simply inline them immediately. Some are larger > (such as atan). But we eventually inline them all today anyway, so > I don't see any downside to doing it sooner rather than later. > > Ian recently sent out a patch series that adds a lot of flags for > "do this optimization anyway, but only for built-ins", in an attempt > to clean up this (call ...) mess. I think this series should also > solve those problems, but it deletes a bunch of code, rather than > adding more code. That explains why you sent an R-b on a few patches and said nothing about the rest. I was wondering. :) > The downside is that the shader-db statistics aren't great today, > but I don't think there's a lot we can do about that. This changes > the optimization order significantly. Overall, the difference was > pretty small, so I think I'm OK with it. > > Thoughts? > > --Ken > > ___ > 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] [PATCH v2 6/9] gallium/radeon: cleanup getting PIPE_QUERY_TIMESTAMP result
From: Nicolai HähnleReviewed-by: Edward O'Callaghan --- src/gallium/drivers/radeon/r600_query.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index b9041eb..c1c3599 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -946,26 +946,22 @@ static void r600_query_hw_add_result(struct r600_common_context *ctx, unsigned results_base = i * 16; result->b = result->b || r600_query_read_result(buffer + results_base, 0, 2, true) != 0; } break; } case PIPE_QUERY_TIME_ELAPSED: result->u64 += r600_query_read_result(buffer, 0, 2, false); break; case PIPE_QUERY_TIMESTAMP: - { - uint32_t *current_result = (uint32_t*)buffer; - result->u64 = (uint64_t)current_result[0] | - (uint64_t)current_result[1] << 32; + result->u64 = *(uint64_t*)buffer; break; - } case PIPE_QUERY_PRIMITIVES_EMITTED: /* SAMPLE_STREAMOUTSTATS stores this structure: * { *u64 NumPrimitivesWritten; *u64 PrimitiveStorageNeeded; * } * We only need NumPrimitivesWritten here. */ result->u64 += r600_query_read_result(buffer, 2, 6, true); break; case PIPE_QUERY_PRIMITIVES_GENERATED: -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Was: Re: [PATCH] r600g: Add support for PK2H/UP2H
Ping. - Again. Ilia and Marek voted for it. Any progress? Anyone, Marek, Nicolai? Should I rebase? Dieter [Mesa-dev] [PATCH] r600g: Add support for PK2H/UP2H Glenn Kennard glenn.kennard at gmail.com Sun Jan 3 14:47:18 PST 2016 Previous message: [Mesa-dev] [PATCH 1/2] WIP gallivm: add support for PK2H/UP2H Next message: [Mesa-dev] [PATCH] mesa: use gl_shader_variable in program resource list Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Based off of Ilia's original patch, but with output values replicated so that it matches the TGSI semantics. Signed-off-by: Glenn Kennard --- src/gallium/drivers/r600/r600_pipe.c | 2 +- src/gallium/drivers/r600/r600_shader.c | 107 +++-- 2 files changed, 104 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index d71082f..3b5d26c 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -328,6 +328,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)> case PIPE_CAP_TEXTURE_QUERY_LOD: case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: case PIPE_CAP_SAMPLER_VIEW_TARGET: + case PIPE_CAP_TGSI_PACK_HALF_FLOAT: return family >= CHIP_CEDAR ? 1 : 0; case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: return family >= CHIP_CEDAR ? 4 : 0; @@ -349,7 +350,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)> case PIPE_CAP_SHAREABLE_SHADERS: case PIPE_CAP_CLEAR_TEXTURE: case PIPE_CAP_DRAW_PARAMETERS: - case PIPE_CAP_TGSI_PACK_HALF_FLOAT: return 0; case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS: diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 9c040ae..7b1eade 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -8960,6 +8960,105 @@ static int tgsi_umad(struct r600_shader_ctx *ctx) return 0; } +static int tgsi_pk2h(struct r600_shader_ctx *ctx) +{ + struct tgsi_full_instruction *inst = >parse.FullToken.FullInstruction; + struct r600_bytecode_alu alu; + int r, i; + int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask); + + /* temp.xy = f32_to_f16(src) */ + memset(, 0, sizeof(struct r600_bytecode_alu)); + alu.op = ALU_OP1_FLT32_TO_FLT16; + alu.dst.chan = 0; + alu.dst.sel = ctx->temp_reg; + alu.dst.write = 1; + r600_bytecode_src([0], >src[0], 0); + r = r600_bytecode_add_alu(ctx->bc, ); + if (r) + return r; + alu.dst.chan = 1; + r600_bytecode_src([0], >src[0], 1); + alu.last = 1; + r = r600_bytecode_add_alu(ctx->bc, ); + if (r) + return r; + + /* dst.x = temp.y * 0x1 + temp.x */ + for (i = 0; i < lasti + 1; i++) { + if (!(inst->Dst[0].Register.WriteMask & (1 << i))) + continue; + + memset(, 0, sizeof(struct r600_bytecode_alu)); + alu.op = ALU_OP3_MULADD_UINT24; + alu.is_op3 = 1; + tgsi_dst(ctx, >Dst[0], i, ); + alu.last = i == lasti; + alu.src[0].sel = ctx->temp_reg; + alu.src[0].chan = 1; + alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; + alu.src[1].value = 0x1; + alu.src[2].sel = ctx->temp_reg; + alu.src[2].chan = 0; + r = r600_bytecode_add_alu(ctx->bc, ); + if (r) + return r; + } + + return 0; +} + +static int tgsi_up2h(struct r600_shader_ctx *ctx) +{ + struct tgsi_full_instruction *inst = >parse.FullToken.FullInstruction; + struct r600_bytecode_alu alu; + int r, i; + int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask); + + /* temp.x = src.x */ + /* note: no need to mask out the high bits */ + memset(, 0, sizeof(struct r600_bytecode_alu)); + alu.op = ALU_OP1_MOV; + alu.dst.chan = 0; + alu.dst.sel = ctx->temp_reg; + alu.dst.write = 1; + r600_bytecode_src([0], >src[0], 0); + r = r600_bytecode_add_alu(ctx->bc, ); + if (r) + return r; + + /* temp.y = src.x >> 16 */ + memset(, 0, sizeof(struct r600_bytecode_alu)); + alu.op = ALU_OP2_LSHR_INT; + alu.dst.chan = 1; + alu.dst.sel = ctx->temp_reg; + alu.dst.write = 1; + r600_bytecode_src([0], >src[0], 0); + alu.src[1].sel = V_SQ_ALU_SRC_LITERAL; + alu.src[1].value = 16; + alu.last = 1; + r = r600_bytecode_add_alu(ctx->bc, ); + if (r) + return r; + + /* dst.wz = dst.xy = f16_to_f32(temp.xy) */ + for (i = 0; i < lasti + 1; i++) { + if (!(inst->Dst[0].Register.WriteMask & (1 << i))) +