[Mesa-dev] [PATCH] glsl: Fix broken LRP algebraic optimization.
opt_algebraic was translating lrp(x, 0, a) into add(x, -mul(x, a)). Unfortunately, this references "x" twice, which is invalid in the IR, leading to assertion failures in the validator. Normally, cloning IR solves this. However, "x" could actually be an arbitrary expression tree, so copying it could result in huge piles of wasted computation. This is why we avoid reusing subexpressions. Instead, transform it into mul(x, add(1.0, -a)), which is equivalent but doesn't need two references to "x". Fixes a regression since d5fa8a95621169, which isn't in any stable branches. Fixes 18 shaders in shader-db (bastion and yofrankie). Signed-off-by: Kenneth Graunke --- src/glsl/opt_algebraic.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Here's the shader-db output comparing master to this: GAINED: shaders/bastion/48.shader_test fs16 GAINED: shaders/bastion/48.shader_test fs8 GAINED: shaders/bastion/48.shader_test vs GAINED: shaders/yofrankie/27.shader_test fs16 GAINED: shaders/yofrankie/27.shader_test fs8 GAINED: shaders/yofrankie/27.shader_test vs GAINED: shaders/yofrankie/30.shader_test fs16 GAINED: shaders/yofrankie/30.shader_test fs8 GAINED: shaders/yofrankie/30.shader_test vs GAINED: shaders/yofrankie/48.shader_test fs16 GAINED: shaders/yofrankie/48.shader_test fs8 GAINED: shaders/yofrankie/48.shader_test vs GAINED: shaders/yofrankie/87.shader_test fs16 GAINED: shaders/yofrankie/87.shader_test fs8 GAINED: shaders/yofrankie/87.shader_test vs GAINED: shaders/yofrankie/9.shader_test fs16 GAINED: shaders/yofrankie/9.shader_test fs8 GAINED: shaders/yofrankie/9.shader_test vs total instructions in shared programs: 1726391 -> 1726391 (0.00%) instructions in affected programs: 0 -> 0 GAINED:18 LOST: diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp index 778638c..5c49a78 100644 --- a/src/glsl/opt_algebraic.cpp +++ b/src/glsl/opt_algebraic.cpp @@ -571,7 +571,9 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir) } else if (is_vec_zero(op_const[0])) { return mul(ir->operands[1], ir->operands[2]); } else if (is_vec_zero(op_const[1])) { - return add(ir->operands[0], neg(mul(ir->operands[0], ir->operands[2]))); + unsigned op2_components = ir->operands[2]->type->vector_elements; + ir_constant *one = new(mem_ctx) ir_constant(1.0f, op2_components); + return mul(ir->operands[0], add(one, neg(ir->operands[2]))); } break; -- 1.9.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] mesa: Move MESA_GLSL=dump output to stderr.
i965 recently moved debug printfs to use stderr, including ones which trigger on MESA_GLSL=dump. This resulted in scrambled output. For drivers using ir_to_mesa, print_program was already using stderr, yet all the code around it was using stdout. Signed-off-by: Kenneth Graunke --- src/mesa/main/shaderapi.c | 20 +++- src/mesa/program/ir_to_mesa.cpp | 23 --- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index cbf8390..e2f3462 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -838,9 +838,10 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) sh->CompileStatus = GL_FALSE; } else { if (ctx->Shader.Flags & GLSL_DUMP) { - printf("GLSL source for %s shader %d:\n", -_mesa_shader_stage_to_string(sh->Stage), sh->Name); - printf("%s\n", sh->Source); + fprintf(stderr, "GLSL source for %s shader %d:\n", + _mesa_shader_stage_to_string(sh->Stage), sh->Name); + fprintf(stderr, "%s\n", sh->Source); + fflush(stderr); } /* this call will set the shader->CompileStatus field to indicate if @@ -854,16 +855,17 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) if (ctx->Shader.Flags & GLSL_DUMP) { if (sh->CompileStatus) { -printf("GLSL IR for shader %d:\n", sh->Name); -_mesa_print_ir(stdout, sh->ir, NULL); -printf("\n\n"); +fprintf(stderr, "GLSL IR for shader %d:\n", sh->Name); +_mesa_print_ir(stderr, sh->ir, NULL); +fprintf(stderr, "\n\n"); } else { -printf("GLSL shader %d failed to compile.\n", sh->Name); +fprintf(stderr, "GLSL shader %d failed to compile.\n", sh->Name); } if (sh->InfoLog && sh->InfoLog[0] != 0) { -printf("GLSL shader %d info log:\n", sh->Name); -printf("%s\n", sh->InfoLog); +fprintf(stderr, "GLSL shader %d info log:\n", sh->Name); +fprintf(stderr, "%s\n", sh->InfoLog); } + fflush(stderr); } } diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 06df41f..9919874 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2918,16 +2918,17 @@ get_mesa_program(struct gl_context *ctx, set_branchtargets(&v, mesa_instructions, num_instructions); if (ctx->Shader.Flags & GLSL_DUMP) { - printf("\n"); - printf("GLSL IR for linked %s program %d:\n", target_string, -shader_program->Name); - _mesa_print_ir(stdout, shader->ir, NULL); - printf("\n"); - printf("\n"); - printf("Mesa IR for linked %s program %d:\n", target_string, -shader_program->Name); + fprintf(stderr, "\n"); + fprintf(stderr, "GLSL IR for linked %s program %d:\n", target_string, + shader_program->Name); + _mesa_print_ir(stderr, shader->ir, NULL); + fprintf(stderr, "\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "Mesa IR for linked %s program %d:\n", target_string, + shader_program->Name); print_program(mesa_instructions, mesa_instruction_annotation, num_instructions); + fflush(stderr); } prog->Instructions = mesa_instructions; @@ -3097,12 +3098,12 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) if (ctx->Shader.Flags & GLSL_DUMP) { if (!prog->LinkStatus) { -printf("GLSL shader program %d failed to link\n", prog->Name); +fprintf(stderr, "GLSL shader program %d failed to link\n", prog->Name); } if (prog->InfoLog && prog->InfoLog[0] != 0) { -printf("GLSL shader program %d info log:\n", prog->Name); -printf("%s\n", prog->InfoLog); +fprintf(stderr, "GLSL shader program %d info log:\n", prog->Name); +fprintf(stderr, "%s\n", prog->InfoLog); } } } -- 1.9.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] nouveau: add valid range tracking to nouveau_buffer
This logic is borrowed from the radeon code. The transfer logic will only get called for PIPE_BUFFER resources, so it shouldn't be necessary to worry about them becoming render targets. Signed-off-by: Ilia Mirkin --- A user reported a ~30% FPS improvement with an earlier version of this patch in TF2, and no visual regressions in CS, all on a nv50 card. (Source seems to like to do write/read/write/read to sequential portions of an index buffer, and later writes became staged, which in turn meant that we had to wait for them to complete before being able to stick the index buffer into the pushbuf. The lack of the wait had earlier caused visual glitches in Source games.) Untested on nvc0/nv30 cards. However the logic is roughly identical to radeon's use, so perhaps this is OK to check in without extensive testing and we can revert later if it should cause problems? It's unlikely to have a drastic effect there though, due to implementation differences. Testing would be very much appreciated. src/gallium/drivers/nouveau/nouveau_buffer.c | 29 src/gallium/drivers/nouveau/nouveau_buffer.h | 4 src/gallium/drivers/nouveau/nv50/nv50_resource.c | 2 ++ src/gallium/drivers/nouveau/nv50/nv50_state.c| 4 src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 2 ++ src/gallium/drivers/nouveau/nvc0/nvc0_state.c| 4 6 files changed, 45 insertions(+) diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c index 5b0b93b..46ab1a1 100644 --- a/src/gallium/drivers/nouveau/nouveau_buffer.c +++ b/src/gallium/drivers/nouveau/nouveau_buffer.c @@ -69,6 +69,8 @@ nouveau_buffer_allocate(struct nouveau_screen *screen, if (buf->bo) buf->address = buf->bo->offset + buf->offset; + util_range_set_empty(&buf->valid_buffer_range); + return TRUE; } @@ -124,6 +126,8 @@ nouveau_buffer_destroy(struct pipe_screen *pscreen, nouveau_fence_ref(NULL, &res->fence); nouveau_fence_ref(NULL, &res->fence_wr); + util_range_destroy(&res->valid_buffer_range); + FREE(res); NOUVEAU_DRV_STAT(nouveau_screen(pscreen), buf_obj_current_count, -1); @@ -387,6 +391,17 @@ nouveau_buffer_transfer_map(struct pipe_context *pipe, if (usage & PIPE_TRANSFER_WRITE) NOUVEAU_DRV_STAT(nv->screen, buf_transfers_wr, 1); + /* If we are trying to write to an uninitialized range, the user shouldn't +* care what was there before. So we can treat the write as if the target +* range were being discarded. Furthermore, since we know that even if this +* buffer is busy due to GPU activity, because the contents were +* uninitialized, the GPU can't care what was there, and so we can treat +* the write as being unsynchronized. +*/ + if ((usage & PIPE_TRANSFER_WRITE) && + !util_ranges_intersect(&buf->valid_buffer_range, box->x, box->x + box->width)) + usage |= PIPE_TRANSFER_DISCARD_RANGE | PIPE_TRANSFER_UNSYNCHRONIZED; + if (buf->domain == NOUVEAU_BO_VRAM) { if (usage & NOUVEAU_TRANSFER_DISCARD) { /* Set up a staging area for the user to write to. It will be copied @@ -492,8 +507,14 @@ nouveau_buffer_transfer_flush_region(struct pipe_context *pipe, const struct pipe_box *box) { struct nouveau_transfer *tx = nouveau_transfer(transfer); + struct nv04_resource *buf = nv04_resource(transfer->resource); + if (tx->map) nouveau_transfer_write(nouveau_context(pipe), tx, box->x, box->width); + + util_range_add(&buf->valid_buffer_range, + tx->base.box.x + box->x, + tx->base.box.x + box->x + box->width); } /* Unmap stage of the transfer. If it was a WRITE transfer and the map that @@ -522,6 +543,9 @@ nouveau_buffer_transfer_unmap(struct pipe_context *pipe, if (bind & (PIPE_BIND_CONSTANT_BUFFER)) nv->cb_dirty = TRUE; } + + util_range_add(&buf->valid_buffer_range, + tx->base.box.x, tx->base.box.x + tx->base.box.width); } if (!tx->bo && (tx->base.usage & PIPE_TRANSFER_WRITE)) @@ -659,6 +683,8 @@ nouveau_buffer_create(struct pipe_screen *pscreen, NOUVEAU_DRV_STAT(screen, buf_obj_current_count, 1); + util_range_init(&buffer->valid_buffer_range); + return &buffer->base; fail: @@ -690,6 +716,9 @@ nouveau_user_buffer_create(struct pipe_screen *pscreen, void *ptr, buffer->data = ptr; buffer->status = NOUVEAU_BUFFER_STATUS_USER_MEMORY; + util_range_init(&buffer->valid_buffer_range); + util_range_add(&buffer->valid_buffer_range, 0, bytes); + return &buffer->base; } diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.h b/src/gallium/drivers/nouveau/nouveau_buffer.h index aeb9b17..f881adc 100644 --- a/src/gallium/drivers/nouveau/nouveau_buffer.h +++ b/src/gallium/drivers/nouveau/nouveau_buffer.h @@ -1,6 +1,7 @@ #ifndef __NOUVEAU_BUFFER_H__ #define __NOUVEAU_BUFFER_H__ +#include "ut
[Mesa-dev] Build patches v2
Updated patches with the following changes: [PATCH 1/2] glx/dri2: fix build failure on HURD - improved commit message (thanks to Matt Turner and Ian Romanick) - added Cc: for 10.1 [PATCH 2/2] configure.ac: consolidate dependencies version check - added a missing $ (thanks to Matt Turner) - added Reviewed-by: ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] glx/dri2: fix build failure on HURD
From: Julien Cristau Patch from Debian package. Cc: "10.1" --- src/glx/dri2_query_renderer.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c index b50a202..95560cb 100644 --- a/src/glx/dri2_query_renderer.c +++ b/src/glx/dri2_query_renderer.c @@ -20,6 +20,9 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ + +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) + #include "glxclient.h" #include "glx_error.h" #include "xf86drm.h" @@ -95,3 +98,5 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute, return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value); } + +#endif /* GLX_DIRECT_RENDERING */ -- 1.8.3.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] configure.ac: consolidate dependencies version check
Reviewed-by: Matt Turner --- configure.ac | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 0e0fd18..5f6f4cd 100644 --- a/configure.ac +++ b/configure.ac @@ -38,6 +38,13 @@ DRI3PROTO_REQUIRED=1.0 PRESENTPROTO_REQUIRED=1.0 LIBUDEV_REQUIRED=151 GLPROTO_REQUIRED=1.4.14 +LIBOMXIL_BELLAGIO_REQUIRED=0.0 +VDPAU_REQUIRED=0.4.1 +WAYLAND_REQUIRED=1.2.0 +XCBDRI2_REQUIRED=1.8 +XCBGLX_REQUIRED=1.8.1 +XSHMFENCE_REQUIRED=1.1 +XVMC_REQUIRED=1.0.6 dnl Check for progs AC_PROG_CPP @@ -855,10 +862,10 @@ xyesno) fi # find the DRI deps for libGL -dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8" +dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= $XCBGLX_REQUIRED xcb-dri2 >= $XCBDRI2_REQUIRED" if test x"$enable_dri3" = xyes; then -dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= 1.1" +dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED" fi # add xf86vidmode if available @@ -1284,20 +1291,20 @@ if test -n "$with_gallium_drivers"; then fi if test "x$enable_xvmc" = xyes; then -PKG_CHECK_MODULES([XVMC], [xvmc >= 1.0.6 x11-xcb xcb-dri2 >= 1.8]) +PKG_CHECK_MODULES([XVMC], [xvmc >= $XVMC_REQUIRED x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED]) GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xvmc" fi AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes) if test "x$enable_vdpau" = xyes; then -PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.4.1 x11-xcb xcb-dri2 >= 1.8], +PKG_CHECK_MODULES([VDPAU], [vdpau >= $VDPAU_REQUIRED x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED], [VDPAU_LIBS="`$PKG_CONFIG --libs x11-xcb xcb-dri2`"]) GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau" fi AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes) if test "x$enable_omx" = xyes; then -PKG_CHECK_MODULES([OMX], [libomxil-bellagio >= 0.0 x11-xcb xcb-dri2 >= 1.8]) +PKG_CHECK_MODULES([OMX], [libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED]) GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS omx" fi AM_CONDITIONAL(HAVE_ST_OMX, test "x$enable_omx" = xyes) @@ -1410,7 +1417,7 @@ egl_platforms=`IFS=', '; echo $with_egl_platforms` for plat in $egl_platforms; do case "$plat" in wayland) - PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.2.0 wayland-server >= 1.2.0]) + PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED]) GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland" WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client` @@ -1419,7 +1426,7 @@ for plat in $egl_platforms; do ;; x11) - PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 >= 1.8 xcb-xfixes]) + PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes]) ;; drm) -- 1.8.3.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] st/omx: always advertise all components
From: Christian König omx_component_library_Setup should return all entrypoints the library implements, independent of what is available on the current hardware. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74944 Signed-off-by: Christian König --- src/gallium/state_trackers/omx/entrypoint.c | 15 ++- src/gallium/state_trackers/omx/vid_enc.c| 41 +++-- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c index 52b2495..d6f149e 100644 --- a/src/gallium/state_trackers/omx/entrypoint.c +++ b/src/gallium/state_trackers/omx/entrypoint.c @@ -51,21 +51,22 @@ static unsigned omx_usecount = 0; int omx_component_library_Setup(stLoaderComponentType **stComponents) { OMX_ERRORTYPE r; + unsigned i = 0; if (stComponents == NULL) return 2; /* component 0 - video decoder */ - r = vid_dec_LoaderComponent(stComponents[0]); - if (r != OMX_ErrorNone) - return r; + r = vid_dec_LoaderComponent(stComponents[i]); + if (r == OMX_ErrorNone) + ++i; /* component 1 - video encoder */ - r = vid_enc_LoaderComponent(stComponents[1]); - if (r != OMX_ErrorNone) - return r; + r = vid_enc_LoaderComponent(stComponents[i]); + if (r == OMX_ErrorNone) + ++i; - return 2; + return i; } struct vl_screen *omx_get_screen(void) diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c index 3f1d01c..993ff57 100644 --- a/src/gallium/state_trackers/omx/vid_enc.c +++ b/src/gallium/state_trackers/omx/vid_enc.c @@ -95,53 +95,38 @@ static void vid_enc_name_avc(char str[OMX_MAX_STRINGNAME_SIZE]) OMX_ERRORTYPE vid_enc_LoaderComponent(stLoaderComponentType *comp) { - struct vl_screen *vscreen = omx_get_screen(); - struct pipe_screen *screen = vscreen ? vscreen->pscreen : NULL; - - if (!screen) - return OMX_ErrorInsufficientResources; - comp->componentVersion.s.nVersionMajor = 0; comp->componentVersion.s.nVersionMinor = 0; comp->componentVersion.s.nRevision = 0; comp->componentVersion.s.nStep = 1; + comp->name_specific_length = 1; comp->constructor = vid_enc_Constructor; - if (screen->get_video_param(screen, PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH, - PIPE_VIDEO_ENTRYPOINT_ENCODE, PIPE_VIDEO_CAP_SUPPORTED)) - comp->name_specific_length = 1; - else - comp->name_specific_length = 0; - - omx_put_screen(); - comp->name = CALLOC(1, OMX_MAX_STRINGNAME_SIZE); if (!comp->name) return OMX_ErrorInsufficientResources; vid_enc_name(comp->name); - comp->name_specific = CALLOC(comp->name_specific_length, sizeof(char *)); + comp->name_specific = CALLOC(1, sizeof(char *)); if (!comp->name_specific) goto error_arrays; - comp->role_specific = CALLOC(comp->name_specific_length, sizeof(char *)); + comp->role_specific = CALLOC(1, sizeof(char *)); if (!comp->role_specific) goto error_arrays; - if (comp->name_specific_length) { - comp->name_specific[0] = CALLOC(1, OMX_MAX_STRINGNAME_SIZE); - if (!comp->name_specific[0]) - goto error_specific; + comp->name_specific[0] = CALLOC(1, OMX_MAX_STRINGNAME_SIZE); + if (!comp->name_specific[0]) + goto error_specific; - vid_enc_name_avc(comp->name_specific[0]); + vid_enc_name_avc(comp->name_specific[0]); - comp->role_specific[0] = CALLOC(1, OMX_MAX_STRINGNAME_SIZE); - if (!comp->role_specific[0]) - goto error_specific; + comp->role_specific[0] = CALLOC(1, OMX_MAX_STRINGNAME_SIZE); + if (!comp->role_specific[0]) + goto error_specific; - strcpy(comp->role_specific[0], OMX_VID_ENC_AVC_ROLE); - } + strcpy(comp->role_specific[0], OMX_VID_ENC_AVC_ROLE); return OMX_ErrorNone; @@ -189,6 +174,10 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam return OMX_ErrorInsufficientResources; screen = priv->screen->pscreen; + if (!screen->get_video_param(screen, PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH, +PIPE_VIDEO_ENTRYPOINT_ENCODE, PIPE_VIDEO_CAP_SUPPORTED)) + return OMX_ErrorBadParameter; + priv->s_pipe = screen->context_create(screen, priv->screen); if (!priv->s_pipe) return OMX_ErrorInsufficientResources; -- 1.8.3.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [Mesa-stable] [PATCH 12/25] dri/i9*5: correctly calculate the amount of system memory
On 02/28/2014 04:52 PM, Emil Velikov wrote: On 28/02/14 17:32, Ian Romanick wrote: On 02/21/2014 07:04 PM, Emil Velikov wrote: The variable name states megabytes, while we calculate the amount in kilobytes. Correct this by dividing with the correct amount. Cc: "10.0 10.1" Cc: Ian Romanick Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i915/intel_screen.c | 2 +- src/mesa/drivers/dri/i965/intel_screen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 296df16..884fdb5 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -744,7 +744,7 @@ i915_query_renderer_integer(__DRIscreen *psp, int param, unsigned int *value) * (uint64_t) system_page_size; const unsigned system_memory_megabytes = - (unsigned) (system_memory_bytes / 1024); + (unsigned) (system_memory_bytes / (1024 * 1024)); I don't think this is correct. When I run piglit's glx-query-renderer-coverage, it says glXQueryRendererIntegerMESA(GLX_RENDERER_VIDEO_MEMORY_MESA) values: 1534 That's 1.5GiB, and that's the value I expect. I guess the variable system_memory_bytes should be called system_memory_kbytes instead. I see you have similar code in other patches in the series. Does glx-query-renderer-coverage give sensible values in those drivers? I can only test swrast (both classic and gallium, patches 11 and 24) and gallium nouveau. The former gives a sensible result for my 4GiB machine. glXQueryRendererIntegerMESA(GLX_RENDERER_VIDEO_MEMORY_MESA) values: 3957 $ man sysconf PAGESIZE - _SC_PAGESIZE Size of a page in bytes. _SC_PHYS_PAGES The number of pages of physical memory. ... so I'm not sure how we get such a difference. Mind checking if the following gives reasonable result on your system ? printf("%ul\n", sysconf(_SC_PAGE_SIZE)*sysconf(_SC_PHYS_PAGES); Seems right: [idr@mumford-wire tmp]$ ./a.out ; head -1 /proc/meminfo 8085135360 MemTotal:7895640 kB But... your patch is correct. The reason I get 1.5GiB is the first line not shown in the diff: value[0] = MIN2(system_memory_megabytes, gpu_mappable_megabytes); Guess what gpu_mappable_megabytes is? :) This patch is Reviewed-by: Ian Romanick I'm going to push it now so that I can pick it to 10.1 for RC3. -Emil ___ mesa-stable mailing list mesa-sta...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-stable ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Mesa 10.1 release candidate 3
Mesa 10.1 release candidate 3 is now available for testing. The current plan of record is to have the 10.1 release one week from today on Tuesday, March 4th. The tag in the GIT repository for Mesa 10.1-rc3 is 'mesa-10.1-rc3'. Mesa 10.1 release candidate 1 is available for download at ftp://freedesktop.org/pub/mesa/10.1/ md5sums: 5a77486eec53c2e5796ed0a2c091ccb6 MesaLib-10.1.0-rc3.tar.gz 7bf41555b6c2387934754e379473f3e3 MesaLib-10.1.0-rc3.tar.bz2 b516a6586d00bde09523582be05c5651 MesaLib-10.1.0-rc3.zip I have verified building from the .tar.bz2 file by doing the following on a Fedora 18 system: tar -xjf Mesa-10.1.0-rc2.tar.bz3 cd Mesa-10.1.0-rc3 ./configure --enable-gallium-llvm --with-llvm-shared-libs make -j6 make install ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: Move MESA_GLSL=dump output to stderr.
On 03/01/2014 01:47 AM, Kenneth Graunke wrote: i965 recently moved debug printfs to use stderr, including ones which trigger on MESA_GLSL=dump. This resulted in scrambled output. For drivers using ir_to_mesa, print_program was already using stderr, yet all the code around it was using stdout. Signed-off-by: Kenneth Graunke --- src/mesa/main/shaderapi.c | 20 +++- src/mesa/program/ir_to_mesa.cpp | 23 --- 2 files changed, 23 insertions(+), 20 deletions(-) Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] glsl: Fix broken LRP algebraic optimization.
On 03/01/2014 12:18 AM, Kenneth Graunke wrote: opt_algebraic was translating lrp(x, 0, a) into add(x, -mul(x, a)). Unfortunately, this references "x" twice, which is invalid in the IR, leading to assertion failures in the validator. Right... and Matt probably didn't notice this because he tests release builds because they make piglit runs so much faster. Hmm... isn't -Og credible yet? :( Normally, cloning IR solves this. However, "x" could actually be an arbitrary expression tree, so copying it could result in huge piles of wasted computation. This is why we avoid reusing subexpressions. The other way to solve this is to assign x to a temporary. Isn't x-a*x slightly better because it can be implemented as MAD? I don't have a strong opinion... if you don't feel like doing a temp, Reviewed-by: Ian Romanick Instead, transform it into mul(x, add(1.0, -a)), which is equivalent but doesn't need two references to "x". Fixes a regression since d5fa8a95621169, which isn't in any stable branches. Fixes 18 shaders in shader-db (bastion and yofrankie). Signed-off-by: Kenneth Graunke --- src/glsl/opt_algebraic.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Here's the shader-db output comparing master to this: GAINED: shaders/bastion/48.shader_test fs16 GAINED: shaders/bastion/48.shader_test fs8 GAINED: shaders/bastion/48.shader_test vs GAINED: shaders/yofrankie/27.shader_test fs16 GAINED: shaders/yofrankie/27.shader_test fs8 GAINED: shaders/yofrankie/27.shader_test vs GAINED: shaders/yofrankie/30.shader_test fs16 GAINED: shaders/yofrankie/30.shader_test fs8 GAINED: shaders/yofrankie/30.shader_test vs GAINED: shaders/yofrankie/48.shader_test fs16 GAINED: shaders/yofrankie/48.shader_test fs8 GAINED: shaders/yofrankie/48.shader_test vs GAINED: shaders/yofrankie/87.shader_test fs16 GAINED: shaders/yofrankie/87.shader_test fs8 GAINED: shaders/yofrankie/87.shader_test vs GAINED: shaders/yofrankie/9.shader_test fs16 GAINED: shaders/yofrankie/9.shader_test fs8 GAINED: shaders/yofrankie/9.shader_test vs total instructions in shared programs: 1726391 -> 1726391 (0.00%) instructions in affected programs: 0 -> 0 GAINED:18 LOST: diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp index 778638c..5c49a78 100644 --- a/src/glsl/opt_algebraic.cpp +++ b/src/glsl/opt_algebraic.cpp @@ -571,7 +571,9 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir) } else if (is_vec_zero(op_const[0])) { return mul(ir->operands[1], ir->operands[2]); } else if (is_vec_zero(op_const[1])) { - return add(ir->operands[0], neg(mul(ir->operands[0], ir->operands[2]))); + unsigned op2_components = ir->operands[2]->type->vector_elements; + ir_constant *one = new(mem_ctx) ir_constant(1.0f, op2_components); + return mul(ir->operands[0], add(one, neg(ir->operands[2]))); } break; ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] glx/dri2: fix build failure on HURD
This patch is Reviewed-by: Ian Romanick On 03/01/2014 01:11 AM, Fabio Pedretti wrote: From: Julien Cristau Patch from Debian package. Cc: "10.1" --- src/glx/dri2_query_renderer.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c index b50a202..95560cb 100644 --- a/src/glx/dri2_query_renderer.c +++ b/src/glx/dri2_query_renderer.c @@ -20,6 +20,9 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ + +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) + #include "glxclient.h" #include "glx_error.h" #include "xf86drm.h" @@ -95,3 +98,5 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute, return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value); } + +#endif /* GLX_DIRECT_RENDERING */ ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] glsl: Fix broken LRP algebraic optimization.
On 03/01/2014 09:33 AM, Ian Romanick wrote: > On 03/01/2014 12:18 AM, Kenneth Graunke wrote: >> opt_algebraic was translating lrp(x, 0, a) into add(x, -mul(x, a)). >> >> Unfortunately, this references "x" twice, which is invalid in the IR, >> leading to assertion failures in the validator. > > Right... and Matt probably didn't notice this because he tests release > builds because they make piglit runs so much faster. Hmm... isn't -Og > credible yet? :( > >> Normally, cloning IR solves this. However, "x" could actually be an >> arbitrary expression tree, so copying it could result in huge piles >> of wasted computation. This is why we avoid reusing subexpressions. > > The other way to solve this is to assign x to a temporary. Isn't x-a*x > slightly better because it can be implemented as MAD? Normally, yes, except with the caveat that these are expression trees, so who knows what the computation is or if anything would find it. Notably, the shader-db stats didn't find any instances where we got more instructions (even in fs8), so at least i965 wasn't finding any MAD opportunities. > I don't have a strong opinion... if you don't feel like doing a temp, > > Reviewed-by: Ian Romanick Yeah, I shied away from that because opt_algebraic has never done that. >> Instead, transform it into mul(x, add(1.0, -a)), which is equivalent >> but doesn't need two references to "x". >> >> Fixes a regression since d5fa8a95621169, which isn't in any stable >> branches. Fixes 18 shaders in shader-db (bastion and yofrankie). >> >> Signed-off-by: Kenneth Graunke >> --- >> src/glsl/opt_algebraic.cpp | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> Here's the shader-db output comparing master to this: >> >> GAINED: shaders/bastion/48.shader_test fs16 >> GAINED: shaders/bastion/48.shader_test fs8 >> GAINED: shaders/bastion/48.shader_test vs >> GAINED: shaders/yofrankie/27.shader_test fs16 >> GAINED: shaders/yofrankie/27.shader_test fs8 >> GAINED: shaders/yofrankie/27.shader_test vs >> GAINED: shaders/yofrankie/30.shader_test fs16 >> GAINED: shaders/yofrankie/30.shader_test fs8 >> GAINED: shaders/yofrankie/30.shader_test vs >> GAINED: shaders/yofrankie/48.shader_test fs16 >> GAINED: shaders/yofrankie/48.shader_test fs8 >> GAINED: shaders/yofrankie/48.shader_test vs >> GAINED: shaders/yofrankie/87.shader_test fs16 >> GAINED: shaders/yofrankie/87.shader_test fs8 >> GAINED: shaders/yofrankie/87.shader_test vs >> GAINED: shaders/yofrankie/9.shader_test fs16 >> GAINED: shaders/yofrankie/9.shader_test fs8 >> GAINED: shaders/yofrankie/9.shader_test vs >> >> total instructions in shared programs: 1726391 -> 1726391 (0.00%) >> instructions in affected programs: 0 -> 0 >> GAINED:18 >> LOST: >> >> diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp >> index 778638c..5c49a78 100644 >> --- a/src/glsl/opt_algebraic.cpp >> +++ b/src/glsl/opt_algebraic.cpp >> @@ -571,7 +571,9 @@ >> ir_algebraic_visitor::handle_expression(ir_expression *ir) >> } else if (is_vec_zero(op_const[0])) { >>return mul(ir->operands[1], ir->operands[2]); >> } else if (is_vec_zero(op_const[1])) { >> - return add(ir->operands[0], neg(mul(ir->operands[0], >> ir->operands[2]))); >> + unsigned op2_components = >> ir->operands[2]->type->vector_elements; >> + ir_constant *one = new(mem_ctx) ir_constant(1.0f, >> op2_components); >> + return mul(ir->operands[0], add(one, neg(ir->operands[2]))); >> } >> break; >> >> > signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] Add support for swrast to the DRM EGL platform
From: Giovanni Campagna Turn GBM into a swrast loader (providing putimage/getimage backed by a dumb KMS buffer). This allows to run KMS+DRM GL applications (such as weston or mutter-wayland) unmodified on cards that don't have any client side HW acceleration component but that can do modeset (examples include simpledrm and qxl) --- src/egl/drivers/dri2/platform_drm.c | 186 src/gbm/backends/dri/gbm_dri.c | 208 +--- src/gbm/backends/dri/gbm_driint.h | 21 +++- src/gbm/main/gbm.h | 3 + src/loader/loader.c | 6 ++ 5 files changed, 363 insertions(+), 61 deletions(-) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index a2b387d..265c935 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -43,6 +44,7 @@ lock_front_buffer(struct gbm_surface *_surf) { struct gbm_dri_surface *surf = (struct gbm_dri_surface *) _surf; struct dri2_egl_surface *dri2_surf = surf->dri_private; + struct gbm_dri_device *device = (struct gbm_dri_device *) _surf->gbm; struct gbm_bo *bo; if (dri2_surf->current == NULL) { @@ -51,8 +53,11 @@ lock_front_buffer(struct gbm_surface *_surf) } bo = dri2_surf->current->bo; - dri2_surf->current->locked = 1; - dri2_surf->current = NULL; + + if (device->dri2) { + dri2_surf->current->locked = 1; + dri2_surf->current = NULL; + } return bo; } @@ -120,10 +125,18 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type, goto cleanup_surf; } - dri2_surf->dri_drawable = - (*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen, - dri2_conf->dri_double_config, - dri2_surf->gbm_surf); + if (dri2_dpy->dri2) { + dri2_surf->dri_drawable = + (*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen, + dri2_conf->dri_double_config, + dri2_surf->gbm_surf); + } else { + assert (dri2_dpy->swrast != NULL); + dri2_surf->dri_drawable = + (*dri2_dpy->swrast->createNewDrawable) (dri2_dpy->dri_screen, + dri2_conf->dri_double_config, + dri2_surf->gbm_surf); + } if (dri2_surf->dri_drawable == NULL) { _eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable"); @@ -204,6 +217,28 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) return 0; } +static int +get_swrast_front_bo(struct dri2_egl_surface *dri2_surf) +{ + struct dri2_egl_display *dri2_dpy = + dri2_egl_display(dri2_surf->base.Resource.Display); + struct gbm_dri_surface *surf = dri2_surf->gbm_surf; + + if (dri2_surf->current == NULL) { + assert (!dri2_surf->color_buffers[0].locked); + dri2_surf->current = &dri2_surf->color_buffers[0]; + } + + if (dri2_surf->current->bo == NULL) + dri2_surf->current->bo = gbm_bo_create(&dri2_dpy->gbm_dri->base.base, + surf->base.width, surf->base.height, + surf->base.format, surf->base.flags); + if (dri2_surf->current->bo == NULL) + return -1; + + return 0; +} + static void back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer) { @@ -357,19 +392,23 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw) struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw); int i; - if (dri2_surf->base.Type == EGL_WINDOW_BIT) { - if (dri2_surf->current) -_eglError(EGL_BAD_SURFACE, "dri2_swap_buffers"); - for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) - if (dri2_surf->color_buffers[i].age > 0) -dri2_surf->color_buffers[i].age++; - dri2_surf->current = dri2_surf->back; - dri2_surf->current->age = 1; - dri2_surf->back = NULL; - } + if (dri2_dpy->swrast) { + (*dri2_dpy->core->swapBuffers)(dri2_surf->dri_drawable); + } else { + if (dri2_surf->base.Type == EGL_WINDOW_BIT) { + if (dri2_surf->current) +_eglError(EGL_BAD_SURFACE, "dri2_swap_buffers"); + for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) +if (dri2_surf->color_buffers[i].age > 0) + dri2_surf->color_buffers[i].age++; + dri2_surf->current = dri2_surf->back; + dri2_surf->current->age = 1; + dri2_surf->back = NULL; + } - (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable); - (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable); + (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable); + (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable); +
[Mesa-dev] [Bug 75543] OSMesa Gallium OSMesaMakeCurrent
https://bugs.freedesktop.org/show_bug.cgi?id=75543 --- Comment #1 from Brian Paul --- I think your fix is correct. I'll write a patch for this. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 75543] OSMesa Gallium OSMesaMakeCurrent
https://bugs.freedesktop.org/show_bug.cgi?id=75543 --- Comment #2 from Brian Paul --- Created attachment 94934 --> https://bugs.freedesktop.org/attachment.cgi?id=94934&action=edit Patch to check buffer size when searching Can you verify this patch is OK? -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] glsl: Fix broken LRP algebraic optimization.
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: Move MESA_GLSL=dump output to stderr.
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 75336] Don't provide inline definitions of functions available in MSVS 2013's standard library
https://bugs.freedesktop.org/show_bug.cgi?id=75336 --- Comment #1 from Brian Paul --- Created attachment 94935 --> https://bugs.freedesktop.org/attachment.cgi?id=94935&action=edit patch for u_math.h -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 75336] Don't provide inline definitions of functions available in MSVS 2013's standard library
https://bugs.freedesktop.org/show_bug.cgi?id=75336 --- Comment #2 from Brian Paul --- Created attachment 94936 --> https://bugs.freedesktop.org/attachment.cgi?id=94936&action=edit patch for imports.h Can you verify that these two patches fixes the issue for you with Mesa git master? If so, I'll also tag them for inclusion in the next 10.1.x release too. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] softpipe: use 64-bit arithmetic in softpipe_resource_layout()
To avoid 32-bit integer overflow for large textures. Note: we're already doing this in llvmpipe. Cc: "10.0" "10.1" --- src/gallium/drivers/softpipe/sp_texture.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index dc89d06..6538e46 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -60,7 +60,7 @@ softpipe_resource_layout(struct pipe_screen *screen, unsigned width = pt->width0; unsigned height = pt->height0; unsigned depth = pt->depth0; - unsigned buffer_size = 0; + uint64_t buffer_size = 0; for (level = 0; level <= pt->last_level; level++) { unsigned slices; @@ -76,8 +76,8 @@ softpipe_resource_layout(struct pipe_screen *screen, spr->level_offset[level] = buffer_size; - buffer_size += (util_format_get_nblocksy(pt->format, height) * - slices * spr->stride[level]); + buffer_size += (uint64_t) util_format_get_nblocksy(pt->format, height) * + slices * spr->stride[level]; width = u_minify(width, 1); height = u_minify(height, 1); -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 07/10] xlib: remove unneeded context tracking code
This removes the only use of _glthread_Get/SetTSD(), etc. --- src/mesa/drivers/x11/glxapi.c | 47 - 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c index 8640cb0..c03c743 100644 --- a/src/mesa/drivers/x11/glxapi.c +++ b/src/mesa/drivers/x11/glxapi.c @@ -146,34 +146,6 @@ get_dispatch(Display *dpy) } - - -/** - * GLX API current context. - */ -#if defined(GLX_USE_TLS) -PUBLIC __thread void * CurrentContext -__attribute__((tls_model("initial-exec"))); -#elif defined(THREADS) -static _glthread_TSD ContextTSD; /**< Per-thread context pointer */ -#else -static GLXContext CurrentContext = 0; -#endif - - -static void -SetCurrentContext(GLXContext c) -{ -#if defined(GLX_USE_TLS) - CurrentContext = c; -#elif defined(THREADS) - _glthread_SetTSD(&ContextTSD, c); -#else - CurrentContext = c; -#endif -} - - /* * GLX API entrypoints */ @@ -231,8 +203,6 @@ glXDestroyContext(Display *dpy, GLXContext ctx) GET_DISPATCH(dpy, t); if (!t) return; - if (glXGetCurrentContext() == ctx) - SetCurrentContext(NULL); (t->DestroyContext)(dpy, ctx); } @@ -259,16 +229,13 @@ glXGetConfig(Display *dpy, XVisualInfo *visinfo, int attrib, int *value) } +/* declare here to avoid including xmesa.h */ +extern void *XMesaGetCurrentContext(void); + GLXContext PUBLIC glXGetCurrentContext(void) { -#if defined(GLX_USE_TLS) - return CurrentContext; -#elif defined(THREADS) - return (GLXContext) _glthread_GetTSD(&ContextTSD); -#else - return CurrentContext; -#endif + return (GLXContext) XMesaGetCurrentContext(); } @@ -301,9 +268,6 @@ glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx) return False; } b = (*t->MakeCurrent)(dpy, drawable, ctx); - if (b) { - SetCurrentContext(ctx); - } return b; } @@ -576,9 +540,6 @@ glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXConte if (!t) return False; b = (t->MakeContextCurrent)(dpy, draw, read, ctx); - if (b) { - SetCurrentContext(ctx); - } return b; } -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 02/10] mesa: switch to c11 mutex functions
--- doxygen/main.doxy|2 +- src/mesa/main/arrayobj.c | 12 ++-- src/mesa/main/bufferobj.c| 26 - src/mesa/main/context.c |6 +++--- src/mesa/main/dlist.c|4 ++-- src/mesa/main/errors.c |6 +++--- src/mesa/main/execmem.c | 10 +- src/mesa/main/fbobject.c | 22 ++--- src/mesa/main/framebuffer.c | 14 +++--- src/mesa/main/getstring.c|4 ++-- src/mesa/main/hash.c | 44 +- src/mesa/main/mtypes.h | 16 +++ src/mesa/main/pipelineobj.c | 12 ++-- src/mesa/main/renderbuffer.c | 12 ++-- src/mesa/main/samplerobj.c | 12 ++-- src/mesa/main/shaderapi.c|4 ++-- src/mesa/main/shared.c | 16 +++ src/mesa/main/syncobj.c | 14 +++--- src/mesa/main/teximage.h |4 ++-- src/mesa/main/texobj.c | 34 src/mesa/program/program.c |8 21 files changed, 141 insertions(+), 141 deletions(-) diff --git a/doxygen/main.doxy b/doxygen/main.doxy index 8b997b1..c258031 100644 --- a/doxygen/main.doxy +++ b/doxygen/main.doxy @@ -34,7 +34,7 @@ SEARCH_INCLUDES= YES INCLUDE_PATH = ../include/ INCLUDE_FILE_PATTERNS = PREDEFINED = -EXPAND_AS_DEFINED = _glthread_DECLARE_STATIC_MUTEX +EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--- # Configuration::addtions related to external references diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index b33ba80..efb9930 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -119,7 +119,7 @@ _mesa_delete_vao(struct gl_context *ctx, struct gl_vertex_array_object *obj) { unbind_array_object_vbos(ctx, obj); _mesa_reference_buffer_object(ctx, &obj->IndexBufferObj, NULL); - _glthread_DESTROY_MUTEX(obj->Mutex); + mtx_destroy(&obj->Mutex); free(obj->Label); free(obj); } @@ -142,7 +142,7 @@ _mesa_reference_vao_(struct gl_context *ctx, GLboolean deleteFlag = GL_FALSE; struct gl_vertex_array_object *oldObj = *ptr; - _glthread_LOCK_MUTEX(oldObj->Mutex); + mtx_lock(&oldObj->Mutex); ASSERT(oldObj->RefCount > 0); oldObj->RefCount--; #if 0 @@ -150,7 +150,7 @@ _mesa_reference_vao_(struct gl_context *ctx, (void *) oldObj, oldObj->Name, oldObj->RefCount); #endif deleteFlag = (oldObj->RefCount == 0); - _glthread_UNLOCK_MUTEX(oldObj->Mutex); + mtx_unlock(&oldObj->Mutex); if (deleteFlag) { ASSERT(ctx->Driver.DeleteArrayObject); @@ -163,7 +163,7 @@ _mesa_reference_vao_(struct gl_context *ctx, if (vao) { /* reference new array object */ - _glthread_LOCK_MUTEX(vao->Mutex); + mtx_lock(&vao->Mutex); if (vao->RefCount == 0) { /* this array's being deleted (look just above) */ /* Not sure this can every really happen. Warn if it does. */ @@ -178,7 +178,7 @@ _mesa_reference_vao_(struct gl_context *ctx, #endif *ptr = vao; } - _glthread_UNLOCK_MUTEX(vao->Mutex); + mtx_unlock(&vao->Mutex); } } @@ -226,7 +226,7 @@ _mesa_initialize_vao(struct gl_context *ctx, obj->Name = name; - _glthread_INIT_MUTEX(obj->Mutex); + mtx_init(&obj->Mutex, mtx_plain); obj->RefCount = 1; /* Init the individual arrays */ diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 237b49c..8076b37 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -417,7 +417,7 @@ _mesa_delete_buffer_object(struct gl_context *ctx, bufObj->RefCount = -1000; bufObj->Name = ~0; - _glthread_DESTROY_MUTEX(bufObj->Mutex); + mtx_destroy(&bufObj->Mutex); free(bufObj->Label); free(bufObj); } @@ -439,7 +439,7 @@ _mesa_reference_buffer_object_(struct gl_context *ctx, GLboolean deleteFlag = GL_FALSE; struct gl_buffer_object *oldObj = *ptr; - _glthread_LOCK_MUTEX(oldObj->Mutex); + mtx_lock(&oldObj->Mutex); ASSERT(oldObj->RefCount > 0); oldObj->RefCount--; #if 0 @@ -447,7 +447,7 @@ _mesa_reference_buffer_object_(struct gl_context *ctx, (void *) oldObj, oldObj->Name, oldObj->RefCount); #endif deleteFlag = (oldObj->RefCount == 0); - _glthread_UNLOCK_MUTEX(oldObj->Mutex); + mtx_unlock(&oldObj->Mutex); if (deleteFlag) { @@ -469,7 +469,7 @@ _mesa_reference_buffer_object_(struct gl_context *ctx, if (bufObj) { /* reference new buffer */ - _glthread_LOCK_MUTEX(bufObj->Mutex); + mtx_lock(&bufObj->Mutex); if (bufObj->RefCount == 0) { /* this buffer's being deleted (look just above) */ /* Not sure this can every really happen. Warn if it does. */ @@ -484,7 +484,7 @@ _mesa_reference_buffer_
[Mesa-dev] [PATCH 06/10] xlib: simplify context handling
Get rid of the fake_glx_context struct. Now, an XMesaContext is the same as a GLXContext. --- src/mesa/drivers/x11/fakeglx.c | 134 src/mesa/drivers/x11/glxapi.h |2 +- src/mesa/drivers/x11/xm_api.c |1 + 3 files changed, 28 insertions(+), 109 deletions(-) diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index def157f..eba13ac 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -81,21 +81,6 @@ "GLX_SGIX_fbconfig " \ "GLX_SGIX_pbuffer " -/* - * Our fake GLX context will contain a "real" GLX context and an XMesa context. - * - * Note that a pointer to a __GLXcontext is a pointer to a fake_glx_context, - * and vice versa. - * - * We really just need this structure in order to make the libGL functions - * glXGetCurrentContext(), glXGetCurrentDrawable() and glXGetCurrentDisplay() - * work correctly. - */ -struct fake_glx_context { - __GLXcontext glxContext; /* this MUST be first! */ - XMesaContext xmesaContext; -}; - /**/ @@ -1272,40 +1257,16 @@ Fake_glXChooseVisual( Display *dpy, int screen, int *list ) } -/** - * Init basic fields of a new fake_glx_context. - */ -static void -init_glx_context(struct fake_glx_context *glxCtx, Display *dpy) -{ - /* Always return True. See if anyone's confused... */ - GLboolean direct = GL_TRUE; - - glxCtx->xmesaContext->direct = direct; - glxCtx->glxContext.isDirect = direct; - glxCtx->glxContext.currentDpy = dpy; - glxCtx->glxContext.xid = (XID) glxCtx; /* self pointer */ - - assert((void *) glxCtx == (void *) &(glxCtx->glxContext)); -} - - - static GLXContext Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo, GLXContext share_list, Bool direct ) { XMesaVisual xmvis; - struct fake_glx_context *glxCtx; - struct fake_glx_context *shareCtx = (struct fake_glx_context *) share_list; + XMesaContext xmesaCtx; if (!dpy || !visinfo) return 0; - glxCtx = CALLOC_STRUCT(fake_glx_context); - if (!glxCtx) - return 0; - /* deallocate unused windows/buffers */ #if 0 XMesaGarbageCollect(dpy); @@ -1316,22 +1277,13 @@ Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo, /* This visual wasn't found with glXChooseVisual() */ xmvis = create_glx_visual( dpy, visinfo ); if (!xmvis) { - /* unusable visual */ - free(glxCtx); return NULL; } } - glxCtx->xmesaContext = XMesaCreateContext(xmvis, - shareCtx ? shareCtx->xmesaContext : NULL); - if (!glxCtx->xmesaContext) { - free(glxCtx); - return NULL; - } - - init_glx_context(glxCtx, dpy); + xmesaCtx = XMesaCreateContext(xmvis, (XMesaContext) share_list); - return (GLXContext) glxCtx; + return (GLXContext) xmesaCtx; } @@ -1348,11 +1300,9 @@ static Bool Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx ) { - struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx; - if (ctx && draw && read) { XMesaBuffer drawBuffer, readBuffer; - XMesaContext xmctx = glxCtx->xmesaContext; + XMesaContext xmctx = (XMesaContext) ctx; /* Find the XMesaBuffer which corresponds to the GLXDrawable 'draw' */ if (ctx == MakeCurrent_PrevContext @@ -1395,15 +1345,7 @@ Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, MakeCurrent_PrevReadBuffer = readBuffer; /* Now make current! */ - if (XMesaMakeCurrent2(xmctx, drawBuffer, readBuffer)) { - ((__GLXcontext *) ctx)->currentDpy = dpy; - ((__GLXcontext *) ctx)->currentDrawable = draw; - ((__GLXcontext *) ctx)->currentReadable = read; - return True; - } - else { - return False; - } + return XMesaMakeCurrent2(xmctx, drawBuffer, readBuffer); } else if (!ctx && !draw && !read) { /* release current context w/out assigning new one. */ @@ -1497,15 +1439,13 @@ static void Fake_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, unsigned long mask ) { - struct fake_glx_context *fakeSrc = (struct fake_glx_context *) src; - struct fake_glx_context *fakeDst = (struct fake_glx_context *) dst; - XMesaContext xm_src = fakeSrc->xmesaContext; - XMesaContext xm_dst = fakeDst->xmesaContext; + XMesaContext xmSrc = (XMesaContext) src; + XMesaContext xmDst = (XMesaContext) dst; (void) dpy; if (MakeCurrent_PrevContext == src) { _mesa_Flush(); } - _mesa_copy_context( &(xm_src->mesa), &(xm_dst->mesa), (GLuint) mask ); + _mesa_copy_context( &xmSrc->mesa, &xmDst->mesa, (GLuint) mask ); } @@ -1536,16 +1476,14 @@ static void Fake_glXDestroyContext( Display *dpy, GLXContext ctx ) { if (ctx) { - struct fake_glx_context *glxCtx = (stru
[Mesa-dev] [PATCH 05/10] xlib: remove unused realglx.[ch] files
At one point in time, the xlib driver could call the real GLX functions. But that's long dead. --- src/mesa/drivers/x11/glxapi.c | 15 +- src/mesa/drivers/x11/realglx.c | 180 -- src/mesa/drivers/x11/realglx.h | 326 3 files changed, 4 insertions(+), 517 deletions(-) delete mode 100644 src/mesa/drivers/x11/realglx.c delete mode 100644 src/mesa/drivers/x11/realglx.h diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c index dfa8946..8640cb0 100644 --- a/src/mesa/drivers/x11/glxapi.c +++ b/src/mesa/drivers/x11/glxapi.c @@ -24,9 +24,9 @@ /* - * This is the GLX API dispatcher. Calls to the glX* functions are - * either routed to the real GLX encoders or to Mesa's pseudo-GLX functions. - * See the glxapi.h file for more details. + * This is the GLX API dispatcher. It uses a dispatch table but that's + * not really needed anymore since the table always points to the "fake" + * GLX functions. */ @@ -40,7 +40,6 @@ #include "glxapi.h" -extern struct _glxapi_table *_real_GetGLXDispatchTable(void); extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void); @@ -107,9 +106,7 @@ get_dispatch(Display *dpy) } } - /* A new display, determine if we should use real GLX -* or Mesa's pseudo-GLX. -*/ + /* Setup the dispatch table */ { struct _glxapi_table *t = _mesa_GetGLXDispatchTable(); @@ -130,10 +127,6 @@ get_dispatch(Display *dpy) } } - /* If we get here that means we can't use real GLX on this display -* and the Mesa pseudo-GLX software renderer wasn't compiled in. -* Or, we ran out of memory! -*/ return NULL; } diff --git a/src/mesa/drivers/x11/realglx.c b/src/mesa/drivers/x11/realglx.c deleted file mode 100644 index d643418..000 --- a/src/mesa/drivers/x11/realglx.c +++ /dev/null @@ -1,180 +0,0 @@ - -/* - * Mesa 3-D graphics library - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include "realglx.h" -#include "glxapi.h" - - -struct _glxapi_table * -_real_GetGLXDispatchTable(void) -{ - static struct _glxapi_table glx; - - /* be sure our dispatch table size <= libGL's table */ - { - GLuint size = sizeof(struct _glxapi_table) / sizeof(void *); - (void) size; - assert(_glxapi_get_dispatch_table_size() >= size); - } - - /* initialize the whole table to no-ops */ - _glxapi_set_no_op_table(&glx); - - /* now initialize the table with the functions I implement */ - - /*** GLX_VERSION_1_0 ***/ - glx.ChooseVisual = _real_glXChooseVisual; - glx.CopyContext = _real_glXCopyContext; - glx.CreateContext = _real_glXCreateContext; - glx.CreateGLXPixmap = _real_glXCreateGLXPixmap; - glx.DestroyContext = _real_glXDestroyContext; - glx.DestroyGLXPixmap = _real_glXDestroyGLXPixmap; - glx.GetConfig = _real_glXGetConfig; - /*glx.GetCurrentContext = _real_glXGetCurrentContext;*/ - /*glx.GetCurrentDrawable = _real_glXGetCurrentDrawable;*/ - glx.IsDirect = _real_glXIsDirect; - glx.MakeCurrent = _real_glXMakeCurrent; - glx.QueryExtension = _real_glXQueryExtension; - glx.QueryVersion = _real_glXQueryVersion; - glx.SwapBuffers = _real_glXSwapBuffers; - glx.UseXFont = _real_glXUseXFont; - glx.WaitGL = _real_glXWaitGL; - glx.WaitX = _real_glXWaitX; - - /*** GLX_VERSION_1_1 ***/ - glx.GetClientString = _real_glXGetClientString; - glx.QueryExtensionsString = _real_glXQueryExtensionsString; - glx.QueryServerString = _real_glXQueryServerString; - - /*** GLX_VERSION_1_2 ***/ - /*glx.GetCurrentDisplay = _real_glXGetCurrentDisplay;*/ - - /*** GLX_VERSION_1_3 ***/ - glx.ChooseFBConfig = _real_glXChooseFBConfig; - glx.CreateNewContext = _real_glXCreateNewContext; - glx.CreatePbuffer = _real_glXCreatePbuffer; - glx.CreatePixmap = _real_glXCreatePixmap; - gl
[Mesa-dev] [PATCH 03/10] glsl: switch to c11 mutex functions
--- src/glsl/builtin_functions.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index b9dc959..a52077d 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cpp @@ -4351,7 +4351,7 @@ builtin_builder::_memory_barrier(builtin_available_predicate avail) /* The singleton instance of builtin_builder. */ static builtin_builder builtins; -_glthread_DECLARE_STATIC_MUTEX(builtins_lock); +static mtx_t builtins_lock = _MTX_INITIALIZER_NP; /** * External API (exposing the built-in module to the rest of the compiler): @@ -4360,17 +4360,17 @@ _glthread_DECLARE_STATIC_MUTEX(builtins_lock); void _mesa_glsl_initialize_builtin_functions() { - _glthread_LOCK_MUTEX(builtins_lock); + mtx_lock(&builtins_lock); builtins.initialize(); - _glthread_UNLOCK_MUTEX(builtins_lock); + mtx_unlock(&builtins_lock); } void _mesa_glsl_release_builtin_functions() { - _glthread_LOCK_MUTEX(builtins_lock); + mtx_lock(&builtins_lock); builtins.release(); - _glthread_UNLOCK_MUTEX(builtins_lock); + mtx_unlock(&builtins_lock); } ir_function_signature * @@ -4378,9 +4378,9 @@ _mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state, const char *name, exec_list *actual_parameters) { ir_function_signature * s; - _glthread_LOCK_MUTEX(builtins_lock); + mtx_lock(&builtins_lock); s = builtins.find(state, name, actual_parameters); - _glthread_UNLOCK_MUTEX(builtins_lock); + mtx_unlock(&builtins_lock); return s; } -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 01/10] xlib: switch to c11 mutex functions
The _glthread_LOCK/UNLOCK_MUTEX() macros are just wrappers around the c11 mutex functions. Let's start getting rid of those wrappers. --- src/mesa/drivers/x11/xm_api.c | 21 ++--- src/mesa/drivers/x11/xm_dd.c |4 ++-- src/mesa/drivers/x11/xmesaP.h |3 ++- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index ac290a5..5a3a206 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -74,7 +74,6 @@ #include "main/teximage.h" #include "main/version.h" #include "main/vtxfmt.h" -#include "glapi/glthread.h" #include "swrast/swrast.h" #include "swrast/s_renderbuffer.h" #include "swrast_setup/swrast_setup.h" @@ -88,7 +87,7 @@ /** * Global X driver lock */ -_glthread_Mutex _xmesa_lock; +mtx_t _xmesa_lock; @@ -248,10 +247,10 @@ xmesa_get_window_size(XMesaDisplay *dpy, XMesaBuffer b, { Status stat; - _glthread_LOCK_MUTEX(_xmesa_lock); + mtx_lock(&_xmesa_lock); XSync(b->xm_visual->display, 0); /* added for Chromium */ stat = get_drawable_size(dpy, b->frontxrb->pixmap, width, height); - _glthread_UNLOCK_MUTEX(_xmesa_lock); + mtx_unlock(&_xmesa_lock); if (!stat) { /* probably querying a window that's recently been destroyed */ @@ -892,7 +891,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) TNLcontext *tnl; if (firstTime) { - _glthread_INIT_MUTEX(_xmesa_lock); + mtx_init(&_xmesa_lock, mtx_plain); firstTime = GL_FALSE; } @@ -1336,28 +1335,28 @@ void XMesaSwapBuffers( XMesaBuffer b ) /* Copy Ximage (back buf) from client memory to server window */ #if defined(USE_XSHM) if (b->shm) { -/*_glthread_LOCK_MUTEX(_xmesa_lock);*/ +/*mtx_lock(&_xmesa_lock);*/ XShmPutImage( b->xm_visual->display, b->frontxrb->drawable, b->swapgc, b->backxrb->ximage, 0, 0, 0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height, False ); -/*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ +/*mtx_unlock(&_xmesa_lock);*/ } else #endif { -/*_glthread_LOCK_MUTEX(_xmesa_lock);*/ +/*mtx_lock(&_xmesa_lock);*/ XMesaPutImage( b->xm_visual->display, b->frontxrb->drawable, b->swapgc, b->backxrb->ximage, 0, 0, 0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height ); -/*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ +/*mtx_unlock(&_xmesa_lock);*/ } } else if (b->backxrb->pixmap) { /* Copy pixmap (back buf) to window (front buf) on server */ - /*_glthread_LOCK_MUTEX(_xmesa_lock);*/ + /*mtx_lock(&_xmesa_lock);*/ XMesaCopyArea( b->xm_visual->display, b->backxrb->pixmap, /* source drawable */ b->frontxrb->drawable, /* dest. drawable */ @@ -1365,7 +1364,7 @@ void XMesaSwapBuffers( XMesaBuffer b ) 0, 0, b->mesa_buffer.Width, b->mesa_buffer.Height, 0, 0 /* dest region */ ); - /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ + /*mtx_unlock(&_xmesa_lock);*/ } } XSync( b->xm_visual->display, False ); diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index c0dcb61..3fe1f01 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -54,9 +54,9 @@ finish_or_flush( struct gl_context *ctx ) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); if (xmesa) { - _glthread_LOCK_MUTEX(_xmesa_lock); + mtx_lock(&_xmesa_lock); XSync( xmesa->display, False ); - _glthread_UNLOCK_MUTEX(_xmesa_lock); + mtx_unlock(&_xmesa_lock); } } diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 85af1df..b47934d 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -27,12 +27,13 @@ #define XMESAP_H +#include "c11/threads.h" #include "xmesa.h" #include "main/mtypes.h" #include "swrast/s_context.h" -extern _glthread_Mutex _xmesa_lock; +extern mtx_t _xmesa_lock; extern XMesaBuffer XMesaBufferList; -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 04/10] mesa: remove unused _glthread_*MUTEX() macros
--- src/mapi/glapi/glthread.h |7 --- 1 file changed, 7 deletions(-) diff --git a/src/mapi/glapi/glthread.h b/src/mapi/glapi/glthread.h index 2399abb..ddb4973 100644 --- a/src/mapi/glapi/glthread.h +++ b/src/mapi/glapi/glthread.h @@ -7,19 +7,12 @@ extern "C" { #endif -#define _glthread_DECLARE_STATIC_MUTEX(name) u_mutex_declare_static(name) -#define _glthread_INIT_MUTEX(name) u_mutex_init(name) -#define _glthread_DESTROY_MUTEX(name)u_mutex_destroy(name) -#define _glthread_LOCK_MUTEX(name) u_mutex_lock(name) -#define _glthread_UNLOCK_MUTEX(name) u_mutex_unlock(name) - #define _glthread_InitTSD(tsd) u_tsd_init(tsd); #define _glthread_DestroyTSD(tsd)u_tsd_destroy(tsd); #define _glthread_GetTSD(tsd)u_tsd_get(tsd); #define _glthread_SetTSD(tsd, ptr) u_tsd_set(tsd, ptr); typedef struct u_tsd _glthread_TSD; -typedef u_mutex _glthread_Mutex; #ifdef __cplusplus } -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 08/10] mesa: remove unused glthread/TSD macros
--- src/mapi/glapi/glthread.h |7 --- 1 file changed, 7 deletions(-) diff --git a/src/mapi/glapi/glthread.h b/src/mapi/glapi/glthread.h index ddb4973..bed2c02 100644 --- a/src/mapi/glapi/glthread.h +++ b/src/mapi/glapi/glthread.h @@ -7,13 +7,6 @@ extern "C" { #endif -#define _glthread_InitTSD(tsd) u_tsd_init(tsd); -#define _glthread_DestroyTSD(tsd)u_tsd_destroy(tsd); -#define _glthread_GetTSD(tsd)u_tsd_get(tsd); -#define _glthread_SetTSD(tsd, ptr) u_tsd_set(tsd, ptr); - -typedef struct u_tsd _glthread_TSD; - #ifdef __cplusplus } #endif -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 09/10] mesa: remove empty glthread.h file
--- doxygen/core_subset.doxy |1 - src/glx/singlepix.c |1 - src/mapi/glapi/gen/glX_proto_recv.py |1 - src/mapi/glapi/gen/glX_proto_send.py |1 - src/mapi/glapi/glapi.h |2 +- src/mapi/glapi/glthread.h| 14 -- src/mesa/drivers/x11/glxapi.c|2 +- src/mesa/main/api_loopback.c |1 - src/mesa/main/api_loopback.h |1 - src/mesa/main/errors.c |1 - src/mesa/main/execmem.c |1 - src/mesa/main/hash.c |1 - 12 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 src/mapi/glapi/glthread.h diff --git a/doxygen/core_subset.doxy b/doxygen/core_subset.doxy index 35faf56..dfa59f4 100644 --- a/doxygen/core_subset.doxy +++ b/doxygen/core_subset.doxy @@ -73,7 +73,6 @@ FILE_PATTERNS = \ fog.h \ get.h \ glheader.h \ - glthread.h \ hash.[ch] \ hint.h \ histogram.h \ diff --git a/src/glx/singlepix.c b/src/glx/singlepix.c index b80b2fc..e1468c6 100644 --- a/src/glx/singlepix.c +++ b/src/glx/singlepix.c @@ -31,7 +31,6 @@ #include "packsingle.h" #include "indirect.h" #include "glapi.h" -#include "glthread.h" #include void diff --git a/src/mapi/glapi/gen/glX_proto_recv.py b/src/mapi/glapi/gen/glX_proto_recv.py index 42b85a5..d076409 100644 --- a/src/mapi/glapi/gen/glX_proto_recv.py +++ b/src/mapi/glapi/gen/glX_proto_recv.py @@ -92,7 +92,6 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): print '#include "singlesize.h"' print '#include "glapi.h"' print '#include "glapitable.h"' -print '#include "glthread.h"' print '#include "dispatch.h"' print '' print '#define __GLX_PAD(x) (((x) + 3) & ~3)' diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py index 8b80441..a98f63e 100644 --- a/src/mapi/glapi/gen/glX_proto_send.py +++ b/src/mapi/glapi/gen/glX_proto_send.py @@ -167,7 +167,6 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto): print '#include "glxclient.h"' print '#include "indirect_size.h"' print '#include "glapi.h"' -print '#include "glthread.h"' print '#include ' print '#include ' print '#include ' diff --git a/src/mapi/glapi/glapi.h b/src/mapi/glapi/glapi.h index c764271..dcf91a7 100644 --- a/src/mapi/glapi/glapi.h +++ b/src/mapi/glapi/glapi.h @@ -44,7 +44,7 @@ #ifndef _GLAPI_H #define _GLAPI_H -#include "glapi/glthread.h" +#include "u_thread.h" #ifdef __cplusplus diff --git a/src/mapi/glapi/glthread.h b/src/mapi/glapi/glthread.h deleted file mode 100644 index bed2c02..000 --- a/src/mapi/glapi/glthread.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef GLTHREAD_H -#define GLTHREAD_H - -#include "u_thread.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* GLTHREAD_H */ diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c index c03c743..a870e94 100644 --- a/src/mesa/drivers/x11/glxapi.c +++ b/src/mesa/drivers/x11/glxapi.c @@ -131,7 +131,7 @@ get_dispatch(Display *dpy) } -/* Don't use the GET_DISPATCH defined in glthread.h */ +/* Don't use the GET_DISPATCH macro */ #undef GET_DISPATCH #define GET_DISPATCH(DPY, TABLE) \ diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 8a04174..d10ae15 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -34,7 +34,6 @@ #include "api_loopback.h" #include "mtypes.h" #include "glapi/glapi.h" -#include "glapi/glthread.h" #include "main/dispatch.h" #include "main/context.h" diff --git a/src/mesa/main/api_loopback.h b/src/mesa/main/api_loopback.h index 0b014ad..2195e01 100644 --- a/src/mesa/main/api_loopback.h +++ b/src/mesa/main/api_loopback.h @@ -32,7 +32,6 @@ #include "main/macros.h" // ? #include "main/mtypes.h" // ? #include "glapi/glapi.h" // ? -#include "glapi/glthread.h" // ? #include "main/dispatch.h" // ? #include "main/context.h" // ? diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 603dfc9..ca73a66 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -37,7 +37,6 @@ #include "mtypes.h" #include "version.h" #include "hash_table.h" -#include "glapi/glthread.h" #define MESSAGE_LOG 1 #define MESSAGE_LOG_ARB 2 diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c index 54239cc..7267cf8 100644 --- a/src/mesa/main/execmem.c +++ b/src/mesa/main/execmem.c @@ -32,7 +32,6 @@ #include "imports.h" -#include "glapi/glthread.h" diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index 06c1be4..4c92005 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -36,7 +36,6 @@ #include "glheader.h" #include "imports.h" -#inclu
[Mesa-dev] [PATCH 10/10] mesa: remove unneeded glthread.c file
The _glthread_GetID() function is also defined in mapi_glapi.c --- src/mapi/glapi/Makefile.sources |1 - src/mapi/glapi/SConscript |1 - src/mapi/glapi/glthread.c |7 --- 3 files changed, 9 deletions(-) delete mode 100644 src/mapi/glapi/glthread.c diff --git a/src/mapi/glapi/Makefile.sources b/src/mapi/glapi/Makefile.sources index 58d28c5..100e634 100644 --- a/src/mapi/glapi/Makefile.sources +++ b/src/mapi/glapi/Makefile.sources @@ -6,7 +6,6 @@ GLAPI_SOURCES = \ glapi_gentable.c \ glapi_getproc.c \ glapi_nop.c \ - glthread.c \ glapi.c X86_API = \ diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index 152818d..bc1c43a 100644 --- a/src/mapi/glapi/SConscript +++ b/src/mapi/glapi/SConscript @@ -34,7 +34,6 @@ glapi_sources = [ 'glapi_entrypoint.c', 'glapi_getproc.c', 'glapi_nop.c', -'glthread.c', 'glapi.c', ] diff --git a/src/mapi/glapi/glthread.c b/src/mapi/glapi/glthread.c deleted file mode 100644 index 0091538..000 --- a/src/mapi/glapi/glthread.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "glapi/glapi.h" - -unsigned long -_glthread_GetID(void) -{ - return u_thread_self(); -} -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] r600g: Prevent SIGFPE when using r600_dma_copy_tile with large textures
Ping On 02/04/2014 02:47 AM, Marek Olšák wrote: Unless Jerome has a better idea, your best bet would be to just return FALSE from that function. For Jerome: The code crashes on a division by 0 (cheight is 0). The problem occurs with the texture format R32G32B32A32 and width >= 4096. Do you have any idea what is wrong with it? Thank you. Marek On Mon, Feb 3, 2014 at 6:40 AM, Ahmed Allam wrote: Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73781 Signed-off-by: Ahmed Allam --- src/gallium/drivers/r600/r600_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index a0d527b..8690849 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -3095,7 +3095,8 @@ static boolean r600_dma_copy_tile(struct r600_context *rctx, /* It's a r6xx/r7xx limitation, the blit must be on 8 boundary for number * line in the blit. Compute max 8 line we can copy in the size limit */ - cheight = ((0x << 2) / pitch) & 0xfff8; + cheight = ((0x << 2) / pitch) > 0x0008 ? + ((0x << 2) / pitch) & 0xfff8 : ((0x << 2) / pitch); ncopy = (copy_height / cheight) + !!(copy_height % cheight); r600_need_dma_space(rctx, ncopy * 7); -- 1.9.rc1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] mesa/main: add ARB_clear_texture entrypoints
This adds enough code to let drivers implement texture clearing, but doesn't actually do that for any of them. Signed-off-by: Ilia Mirkin --- Thought I'd give this a shot. Am I on the right track here? Is the dd API reasonable? I haven't written a piglit test for all the "generic" error cases yet, but I'll get to that in a bit. I'm a little confused between all the different formats on a teximage... BaseFormat appears to be some generalization of the format, but what's the difference between InternalFormat and TexFormat? Just the type, but otherwise equivalent? Or are they representing different things? BTW, this is the first time I'm adding stuff to mesa/main, so forgive me if I left out a step. src/mapi/glapi/gen/ARB_clear_texture.xml | 34 src/mapi/glapi/gen/gl_API.xml| 2 + src/mesa/main/dd.h | 11 +++ src/mesa/main/formatquery.c | 9 +++ src/mesa/main/mtypes.h | 1 + src/mesa/main/tests/dispatch_sanity.cpp | 4 + src/mesa/main/teximage.c | 131 +++ src/mesa/main/teximage.h | 10 +++ 8 files changed, 202 insertions(+) create mode 100644 src/mapi/glapi/gen/ARB_clear_texture.xml diff --git a/src/mapi/glapi/gen/ARB_clear_texture.xml b/src/mapi/glapi/gen/ARB_clear_texture.xml new file mode 100644 index 000..bd9116f --- /dev/null +++ b/src/mapi/glapi/gen/ARB_clear_texture.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 7e1946e..15f8e32 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8515,6 +8515,8 @@ +http://www.w3.org/2001/XInclude"/> + diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 9715241..d824bca 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -275,6 +275,17 @@ struct dd_function_table { GLint level, mesa_format format, GLint width, GLint height, GLint depth, GLint border); + + + void (*ClearTexSubImage)(struct gl_context *ctx, +struct gl_texture_image *texImage, +GLint xoffset, GLint yoffset, GLint zoffset, +GLsizei width, GLsizei height, GLsizei depth, +GLenum format, GLenum type, const GLvoid *data); + + GLenum (*QuerySupportForClearTex)(struct gl_context *ctx, + GLenum internalFormat); + /*@}*/ diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 40eca87..7997cb4 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -140,6 +140,15 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, count = 1; break; } + case GL_CLEAR_TEXTURE: + if (ctx->Extensions.ARB_clear_texture) { + const GLenum support = ctx->Driver.QuerySupportForClearTex( + ctx, internalformat); + buffer[0] = (GLint) support; + count = 1; + break; + } + /* fallthrough */ default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetInternalformativ(pname=%s)", diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 7246b1e..e4a3837 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3490,6 +3490,7 @@ struct gl_extensions GLboolean ARB_base_instance; GLboolean ARB_blend_func_extended; GLboolean ARB_buffer_storage; + GLboolean ARB_clear_texture; GLboolean ARB_color_buffer_float; GLboolean ARB_compute_shader; GLboolean ARB_conservative_depth; diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index d1b0011..8690b5d 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -936,6 +936,10 @@ const struct function gl_core_functions_possible[] = { /* GL_ARB_buffer_storage */ { "glBufferStorage", 43, -1 }, + /* GL_ARB_clear_texture */ + { "glClearTexImage", 13, -1 }, + { "glClearTexSubImage", 13, -1 }, + { NULL, 0, -1 } }; diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 0519d22..9171187 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3768,6 +3768,137 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level, x, y, width, height); } +static struct gl_texture_image * +get_tex_image(struct gl_context *ctx, GLuint texture, GLint level, GLint zoffset) +{ + GLenum target = 0; + struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, texture); + struct gl_texture_image *texImage; + +
[Mesa-dev] [PATCH] clover: Fix building with latest llvm
Recently, llvm has changed to use c++11, so we also should use it --- src/gallium/state_trackers/clover/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am index ece2b38..cc9311c 100644 --- a/src/gallium/state_trackers/clover/Makefile.am +++ b/src/gallium/state_trackers/clover/Makefile.am @@ -37,7 +37,7 @@ libcltgsi_la_SOURCES = \ tgsi/compiler.cpp libclllvm_la_CXXFLAGS = \ - -std=c++98 \ + -std=c++11 \ $(VISIBILITY_CXXFLAGS) \ $(LLVM_CPPFLAGS) \ $(DEFINES) \ @@ -49,7 +49,7 @@ libclllvm_la_SOURCES = \ llvm/invocation.cpp libclover_la_CXXFLAGS = \ - -std=c++0x \ + -std=c++11 \ $(VISIBILITY_CXXFLAGS) libclover_la_LIBADD = \ -- 1.9.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa/main: add ARB_clear_texture entrypoints
On Saturday 01 March 2014 17:09:58 Ilia Mirkin wrote: > This adds enough code to let drivers implement texture clearing, but > doesn't actually do that for any of them. > > Signed-off-by: Ilia Mirkin > --- > > Thought I'd give this a shot. Am I on the right track here? Is the dd API > reasonable? I haven't written a piglit test for all the "generic" error > cases yet, but I'll get to that in a bit. I'm a little confused between all > the different formats on a teximage... BaseFormat appears to be some > generalization of the format, but what's the difference between > InternalFormat and TexFormat? Just the type, but otherwise equivalent? Or > are they representing different things? > When you have the information about the formats, please consider adding comments to the respective data fields or wherever else they are easy to find. I'm also fairly new to Mesa and I've been puzzled about different "kinds" of texture / image / framebuffer formats a few times as well. Andreas > BTW, this is the first time I'm adding stuff to mesa/main, so forgive me if > I left out a step. > > src/mapi/glapi/gen/ARB_clear_texture.xml | 34 > src/mapi/glapi/gen/gl_API.xml| 2 + > src/mesa/main/dd.h | 11 +++ > src/mesa/main/formatquery.c | 9 +++ > src/mesa/main/mtypes.h | 1 + > src/mesa/main/tests/dispatch_sanity.cpp | 4 + > src/mesa/main/teximage.c | 131 > +++ src/mesa/main/teximage.h | > 10 +++ > 8 files changed, 202 insertions(+) > create mode 100644 src/mapi/glapi/gen/ARB_clear_texture.xml > > diff --git a/src/mapi/glapi/gen/ARB_clear_texture.xml > b/src/mapi/glapi/gen/ARB_clear_texture.xml new file mode 100644 > index 000..bd9116f > --- /dev/null > +++ b/src/mapi/glapi/gen/ARB_clear_texture.xml > @@ -0,0 +1,34 @@ > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml > index 7e1946e..15f8e32 100644 > --- a/src/mapi/glapi/gen/gl_API.xml > +++ b/src/mapi/glapi/gen/gl_API.xml > @@ -8515,6 +8515,8 @@ > > > > + xmlns:xi="http://www.w3.org/2001/XInclude"/> + > > > > diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h > index 9715241..d824bca 100644 > --- a/src/mesa/main/dd.h > +++ b/src/mesa/main/dd.h > @@ -275,6 +275,17 @@ struct dd_function_table { >GLint level, mesa_format format, >GLint width, GLint height, >GLint depth, GLint border); > + > + > + void (*ClearTexSubImage)(struct gl_context *ctx, > +struct gl_texture_image *texImage, > +GLint xoffset, GLint yoffset, GLint zoffset, > +GLsizei width, GLsizei height, GLsizei depth, > +GLenum format, GLenum type, const GLvoid > *data); + > + GLenum (*QuerySupportForClearTex)(struct gl_context *ctx, > + GLenum internalFormat); > + > /*@}*/ > > > diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c > index 40eca87..7997cb4 100644 > --- a/src/mesa/main/formatquery.c > +++ b/src/mesa/main/formatquery.c > @@ -140,6 +140,15 @@ _mesa_GetInternalformativ(GLenum target, GLenum > internalformat, GLenum pname, count = 1; >break; > } > + case GL_CLEAR_TEXTURE: > + if (ctx->Extensions.ARB_clear_texture) { > + const GLenum support = ctx->Driver.QuerySupportForClearTex( > + ctx, internalformat); > + buffer[0] = (GLint) support; > + count = 1; > + break; > + } > + /* fallthrough */ > default: >_mesa_error(ctx, GL_INVALID_ENUM, >"glGetInternalformativ(pname=%s)", > diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h > index 7246b1e..e4a3837 100644 > --- a/src/mesa/main/mtypes.h > +++ b/src/mesa/main/mtypes.h > @@ -3490,6 +3490,7 @@ struct gl_extensions > GLboolean ARB_base_instance; > GLboolean ARB_blend_func_extended; > GLboolean ARB_buffer_storage; > + GLboolean ARB_clear_texture; > GLboolean ARB_color_buffer_float; > GLboolean ARB_compute_shader; > GLboolean ARB_conservative_depth; > diff --git a/src/mesa/main/tests/dispatch_sanity.cpp > b/src/mesa/main/tests/dispatch_sanity.cpp index d1b0011..8690b5d 100644 > --- a/src/mesa/main/tests/dispatch_sanity.cpp > +++ b/src/mesa/main/tests/dispatch_sanity.cpp > @@ -936,6 +936,10 @@ const struct function gl_core_functions_possible[] = { > /* GL_ARB_buffer_storage */ > { "glBufferStorage", 43, -1 }, > > + /* GL_ARB_clear_texture */ > + { "glClea
Re: [Mesa-dev] [PATCH] clover: Fix building with latest llvm
Bruno Jiménez writes: > Recently, llvm has changed to use c++11, so we also should use it > --- > src/gallium/state_trackers/clover/Makefile.am | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/gallium/state_trackers/clover/Makefile.am > b/src/gallium/state_trackers/clover/Makefile.am > index ece2b38..cc9311c 100644 > --- a/src/gallium/state_trackers/clover/Makefile.am > +++ b/src/gallium/state_trackers/clover/Makefile.am > @@ -37,7 +37,7 @@ libcltgsi_la_SOURCES = \ > tgsi/compiler.cpp > > libclllvm_la_CXXFLAGS = \ > - -std=c++98 \ > + -std=c++11 \ I think this will break earlier versions of LLVM in subtle ways -- mainly because the C++98 and C++11 standard libraries are not guaranteed to be binary compatible with each other. We should probably use LLVM_CXXFLAGS to detect which -std flag LLVM was built with and make sure we use the same. > $(VISIBILITY_CXXFLAGS) \ > $(LLVM_CPPFLAGS) \ > $(DEFINES) \ > @@ -49,7 +49,7 @@ libclllvm_la_SOURCES = \ > llvm/invocation.cpp > > libclover_la_CXXFLAGS = \ > - -std=c++0x \ > + -std=c++11 \ This looks good to me (though it's not strictly related to fixing LLVM). Thanks. > $(VISIBILITY_CXXFLAGS) > > libclover_la_LIBADD = \ > -- > 1.9.0 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev pgpUimvITkzln.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 73846] [llvmpipe] lp_test_format fails with llvm-3.5svn >= r199602
https://bugs.freedesktop.org/show_bug.cgi?id=73846 --- Comment #1 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master) llvm: 3.5svn r202603 lp_test_format is still failing with latest mesa and llvm. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] scons: Build with C++11 with LLVM >= 3.5.
Starting with llvm-3.5svn r202574, LLVM expects C+11 mode. commit f8bc17fadc8f170c1126328d203f0dab78960137 Author: Chandler Carruth Date: Sat Mar 1 06:31:00 2014 + [C++11] Turn off compiler-based detection of R-value references, relying on the fact that we now build in C++11 mode with modern compilers. This should flush out any issues. If the build bots are happy with this, I'll GC all the code for coping without R-value references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202574 91177308-0d34-0410-b5e6-96231b3b80d8 Signed-off-by: Vinson Lee --- scons/llvm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scons/llvm.py b/scons/llvm.py index 6282cb5..134a072 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -204,6 +204,7 @@ def generate(env): env.ParseConfig('llvm-config --ldflags') if llvm_version >= distutils.version.LooseVersion('3.5'): env.ParseConfig('llvm-config --system-libs') +env.Append(CXXFLAGS = ['-std=c++11']) except OSError: print 'scons: llvm-config version %s failed' % llvm_version return -- 1.8.3.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 71199] [llvmpipe] piglit glean polygonOffset regression
https://bugs.freedesktop.org/show_bug.cgi?id=71199 Vinson Lee changed: What|Removed |Added CC||bri...@vmware.com --- Comment #2 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master) This llvmpipe regression is still present with latest mesa master 10.2.0-devel. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 67692] [llvmpipe] piglit glsl-fs-frontfacing regression
https://bugs.freedesktop.org/show_bug.cgi?id=67692 Vinson Lee changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) glsl-fs-frontfacing is passing on llvmpipe now. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 72582] [swrast] piglit getteximage-targets S3TC 2D_ARRAY regression
https://bugs.freedesktop.org/show_bug.cgi?id=72582 Vinson Lee changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) getteximage-targets S3TC 2D_ARRAY is passing on swrast now. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 62919] piglit getteximage-targets S3TC 2D_ARRAY regression
https://bugs.freedesktop.org/show_bug.cgi?id=62919 Vinson Lee changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) getteximage-targets S3TC 2D_ARRAY passes on swrast now. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 72326] [swrast] piglit glean pbo regression
https://bugs.freedesktop.org/show_bug.cgi?id=72326 --- Comment #1 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) The swrast glean pbo regression is still present. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 70359] [llvmpipe] piglit arb_shader_texture_lod-texgrad regression
https://bugs.freedesktop.org/show_bug.cgi?id=70359 Vinson Lee changed: What|Removed |Added CC||bri...@vmware.com, ||jfons...@vmware.com --- Comment #2 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) The llvmpipe arb_shader_texture_lod-texgrad regression is still present. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 45348] [swrast] piglit fbo-drawbuffers-arbfp regression
https://bugs.freedesktop.org/show_bug.cgi?id=45348 --- Comment #3 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) The piglit fbo-drawbuffers-arbfp on swrast is still present. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 65224] piglit arb_uniform_buffer_object-maxuniformblocksize fs regression
https://bugs.freedesktop.org/show_bug.cgi?id=65224 Vinson Lee changed: What|Removed |Added CC||bri...@vmware.com --- Comment #1 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) arb_uniform_buffer_object-maxuniformblocksize fs passes on softpipe now but still fails on llvmpipe. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 66863] st_glsl_to_tgsi.cpp:2320:emit_block_mov: Assertion `type->is_scalar() || type->is_vector()' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=66863 Vinson Lee changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) piglit in-parameter-nested-struct is passing now. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 66184] src/mesa/state_tracker/st_glsl_to_tgsi.cpp:3216:simplify_cmp: Assertion `inst->dst.index < 4096' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=66184 Vinson Lee changed: What|Removed |Added CC||bri...@vmware.com --- Comment #1 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) This crash can still be reproduced. (gdb) bt #0 0x7fa45c191a1b in _debug_assert_fail (expr=0x7fa45c2d4c69 "inst->dst.index < 4096", file=0x7fa45c2d40d0 "state_tracker/st_glsl_to_tgsi.cpp", line=3245, function=0x7fa45c2d5711 "simplify_cmp") at util/u_debug.c:278 #1 0x7fa45c008a45 in glsl_to_tgsi_visitor::simplify_cmp (this=0x7fa468b89000) at state_tracker/st_glsl_to_tgsi.cpp:3245 #2 0x7fa45c00f0b7 in get_mesa_program (ctx=0x7fa4398c5000, shader_program=0x7fa4234fc4b0, shader=0x7fa4538c8800) at state_tracker/st_glsl_to_tgsi.cpp:5190 #3 0x7fa45c00f7eb in st_link_shader (ctx=0x7fa4398c5000, prog=0x7fa4234fc4b0) at state_tracker/st_glsl_to_tgsi.cpp:5376 #4 0x7fa45c0253ec in _mesa_glsl_link_shader (ctx=0x7fa4398c5000, prog=0x7fa4234fc4b0) at program/ir_to_mesa.cpp:3093 #5 0x7fa45bf20b97 in link_program (ctx=0x7fa4398c5000, program=571) at main/shaderapi.c:913 #6 0x7fa45bf21cd1 in _mesa_LinkProgram (programObj=571) at main/shaderapi.c:1377 #7 0x7fa48fbe1fc1 in fLinkProgram (this=, program=571) at ../../../dist/include/GLContext.h:1315 #8 mozilla::WebGLContext::LinkProgram (this=this@entry=0x7fa41c8fd800, program=program@entry=0x7fa45b5f8380) at /build/buildd/firefox-28.0~b2+build1/content/canvas/src/WebGLContextGL.cpp:2129 #9 0x7fa48f8b791b in mozilla::dom::WebGLRenderingContextBinding::linkProgram (cx=0x7fa4693bef00, obj=..., self=0x7fa41c8fd800, args=...) at /build/buildd/firefox-28.0~b2+build1/obj-x86_64-linux-gnu/dom/bindings/WebGLRenderingContextBinding.cpp:9458 #10 0x7fa48f8b529c in mozilla::dom::WebGLRenderingContextBinding::genericMethod (cx=0x7fa4693bef00, argc=, vp=0x7fa4805901a8) at /build/buildd/firefox-28.0~b2+build1/obj-x86_64-linux-gnu/dom/bindings/WebGLRenderingContextBinding.cpp:12673 #11 0x7fa49079d963 in CallJSNative (args=..., native=0x7fa48f8b518a , cx=0x7fa4693bef00) at /build/buildd/firefox-28.0~b2+build1/js/src/jscntxtinlines.h:220 #12 js::Invoke (cx=cx@entry=0x7fa4693bef00, args=..., construct=construct@entry=js::NO_CONSTRUCT) at /build/buildd/firefox-28.0~b2+build1/js/src/vm/Interpreter.cpp:463 #13 0x7fa490790bc0 in Interpret (cx=cx@entry=0x7fa4693bef00, state=...) at /build/buildd/firefox-28.0~b2+build1/js/src/vm/Interpreter.cpp:2511 #14 0x7fa49079d61d in js::RunScript (cx=cx@entry=0x7fa4693bef00, state=...) at /build/buildd/firefox-28.0~b2+build1/js/src/vm/Interpreter.cpp:420 #15 0x7fa49079d86a in js::Invoke (cx=cx@entry=0x7fa4693bef00, args=..., construct=construct@entry=js::NO_CONSTRUCT) at /build/buildd/firefox-28.0~b2+build1/js/src/vm/Interpreter.cpp:482 #16 0x7fa49079ddcd in js::Invoke (cx=cx@entry=0x7fa4693bef00, thisv=..., fval=..., argc=0, argv=, rval=...) at /build/buildd/firefox-28.0~b2+build1/js/src/vm/Interpreter.cpp:519 #17 0x7fa49068ec77 in JS_CallFunctionValue (cx=cx@entry=0x7fa4693bef00, objArg=, fval=..., argc=argc@entry=0, argv=, rval=rval@entry=0x7fff4efbe420) at /build/buildd/firefox-28.0~b2+build1/js/src/jsapi.cpp:5001 #18 0x7fa48f722786 in mozilla::dom::Function::Call (this=this@entry=0x7fa425af6140, cx=0x7fa4693bef00, aThisObj=..., aThisObj@entry=..., arguments=..., aRv=...) at /build/buildd/firefox-28.0~b2+build1/obj-x86_64-linux-gnu/dom/bindings/FunctionBinding.cpp:35 #19 0x7fa48fa417b8 in mozilla::dom::Function::Call > ( this=this@entry=0x7fa425af6140, thisObj=..., arguments=..., aRv=..., aExceptionHandling=aExceptionHandling@entry=mozilla::dom::CallbackObject::eReportExceptions) at ../../dist/include/mozilla/dom/FunctionBinding.h:55 #20 0x7fa48fa418f4 in nsGlobalWindow::RunTimeoutHandler (this=this@entry=0x7fa42aaf6000, aTimeout=aTimeout@entry=0x7fa4487723c0, aScx=) at /build/buildd/firefox-28.0~b2+build1/dom/base/nsGlobalWindow.cpp:11723 #21 0x7fa48fa42137 in nsGlobalWindow::RunTimeout (this=0x7fa42aaf6000, aTimeout=0x7fa4487723c0) at /build/buildd/firefox-28.0~b2+build1/dom/base/nsGlobalWindow.cpp:11947 #22 0x7fa48fa42336 in nsGlobalWindow::TimerCallback (aTimer=, aClosure=) at /build/buildd/firefox-28.0~b2+build1/dom/base/nsGlobalWindow.cpp:12193 #23 0x7fa48f2e11ec in nsTimerImpl::Fire (this=0x7fa46a15fb50) at /build/buildd/firefox-28.0~b2+build1/xpcom/threads/nsTimerImpl.cpp:551 #24 0x7fa48f2e12a7 in nsTimerEvent::Run (this=0x7fa45c328ea2) at /build/buildd/firefox-28.0~b2+build1/xpcom/threads/nsTimerImpl.cpp:635 #25 0x7fa48f2deec4 in nsThread::ProcessNextEvent (this=0x7fa493328c00, mayWait=, result=0x7fff4efbe8df) at /build/buildd/
[Mesa-dev] [Bug 75660] New: u_inlines.h:277:pipe_buffer_map_range: Assertion `length' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=75660 Priority: medium Bug ID: 75660 Keywords: have-backtrace Assignee: mesa-dev@lists.freedesktop.org Summary: u_inlines.h:277:pipe_buffer_map_range: Assertion `length' failed. Severity: critical Classification: Unclassified OS: Linux (All) Reporter: v...@freedesktop.org Hardware: x86-64 (AMD64) Status: NEW Version: unspecified Component: Mesa core Product: Mesa mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) piglit arb_clear_buffer_object-zero-size triggers an assert with softpipe and llvmpipe. $ ./bin/arb_clear_buffer_object-zero-size -auto ../../src/gallium/auxiliary/util/u_inlines.h:277:pipe_buffer_map_range: Assertion `length' failed. Trace/breakpoint trap (core dumped) (gdb) bt #0 0x7f09421b2a1b in _debug_assert_fail (expr=0x7f09422eca62 "length", file=0x7f09422ec9c0 "../../src/gallium/auxiliary/util/u_inlines.h", line=277, function=0x7f09422eccc0 <__func__.32774> "pipe_buffer_map_range") at util/u_debug.c:278 #1 0x7f0941ffefdb in pipe_buffer_map_range (pipe=0xb4fd10, buffer=0xc7b9a0, offset=0, length=0, access=258, transfer=0xb4f8b8) at ../../src/gallium/auxiliary/util/u_inlines.h:277 #2 0x7f0941fffaff in st_bufferobj_map_range (ctx=0x7f09472ab010, offset=0, length=0, access=6, obj=0xb4f810, index=MAP_INTERNAL) at state_tracker/st_cb_bufferobjects.c:359 #3 0x7f0941e6968d in _mesa_buffer_clear_subdata (ctx=0x7f09472ab010, offset=0, size=0, clearValue=0x7fff8da95d80, clearValueSize=4, bufObj=0xb4f810) at main/bufferobj.c:679 #4 0x7f0941e6b27e in _mesa_ClearBufferSubData (target=34962, internalformat=32856, offset=0, size=0, format=6408, type=5121, data=0x401441) at main/bufferobj.c:1522 #5 0x7f0946dc56f1 in stub_glClearBufferSubData (target=34962, internalformat=32856, offset=0, size=0, format=6408, type=5121, data=0x401441) at piglit/tests/util/generated_dispatch.c:2020 #6 0x00400fc7 in piglit_init (argc=1, argv=0x7fff8da95fe8) at piglit/tests/spec/arb_clear_buffer_object/zero-size.c:73 #7 0x7f0946dc0a1a in run_test (gl_fw=0x7f09470af360 , argc=1, argv=0x7fff8da95fe8) at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:140 #8 0x7f0946dbe7e9 in piglit_gl_test_run (argc=1, argv=0x7fff8da95fe8, config=0x7fff8da95eb0) at piglit/tests/util/piglit-framework-gl.c:191 #9 0x00400f00 in main (argc=1, argv=0x7fff8da95fe8) at piglit/tests/spec/arb_clear_buffer_object/zero-size.c:38 (gdb) frame 1 #1 0x7f0941ffefdb in pipe_buffer_map_range (pipe=0xb4fd10, buffer=0xc7b9a0, offset=0, length=0, access=258, transfer=0xb4f8b8) at ../../src/gallium/auxiliary/util/u_inlines.h:277 277 assert(length); (gdb) print length $1 = 0 -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 65525] [llvmpipe] lp_scene.h:210:lp_scene_alloc: Assertion `size <= (64 * 1024)' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=65525 Vinson Lee changed: What|Removed |Added CC||bri...@vmware.com, ||i...@freedesktop.org, ||jfons...@vmware.com, ||srol...@vmware.com --- Comment #1 from Vinson Lee --- mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) This regression is still present on llvmpipe. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 75661] New: st_glsl_to_tgsi.cpp:637:get_opcode: Assertion `src0.type != GLSL_TYPE_STRUCT' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=75661 Priority: medium Bug ID: 75661 Keywords: have-backtrace Assignee: mesa-dev@lists.freedesktop.org Summary: st_glsl_to_tgsi.cpp:637:get_opcode: Assertion `src0.type != GLSL_TYPE_STRUCT' failed. Severity: critical Classification: Unclassified OS: Linux (All) Reporter: v...@freedesktop.org Hardware: x86-64 (AMD64) Status: NEW Version: git Component: Mesa core Product: Mesa mesa: fc25956badb8e1932cc19d8c97b4be16e92dfc65 (master 10.2.0-devel) piglit fs-deref-literal-array-of-structs triggers an assert on softpipe and llvmpipe. $ ./bin/shader_runner tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs.shader_test -auto state_tracker/st_glsl_to_tgsi.cpp:637:get_opcode: Assertion `src0.type != GLSL_TYPE_STRUCT' failed. Trace/breakpoint trap (core dumped) (gdb) bt #0 0x7f527f2d9a1b in _debug_assert_fail (expr=0x7f527f41c182 "src0.type != GLSL_TYPE_STRUCT", file=0x7f527f41c0d0 "state_tracker/st_glsl_to_tgsi.cpp", line=637, function=0x7f527f41d508 "get_opcode") at util/u_debug.c:278 #1 0x7f527f141e2a in glsl_to_tgsi_visitor::get_opcode (this=0x10cc050, ir=0x10e4460, op=1, dst=..., src0=..., src1=...) at state_tracker/st_glsl_to_tgsi.cpp:637 #2 0x7f527f14162e in glsl_to_tgsi_visitor::emit (this=0x10cc050, ir=0x10e4460, op=1, dst=..., src0=..., src1=..., src2=...) at state_tracker/st_glsl_to_tgsi.cpp:533 #3 0x7f527f141c77 in glsl_to_tgsi_visitor::emit (this=0x10cc050, ir=0x10e4460, op=1, dst=..., src0=...) at state_tracker/st_glsl_to_tgsi.cpp:616 #4 0x7f527f14c9d1 in glsl_to_tgsi_visitor::visit (this=0x10cc050, ir=0x10e4460) at state_tracker/st_glsl_to_tgsi.cpp:2492 #5 0x7f527f21b69c in ir_constant::accept (this=0x10e4460, v=0x10cc050) at ../../src/glsl/ir.h:2134 #6 0x7f527f14acdc in glsl_to_tgsi_visitor::visit (this=0x10cc050, ir=0x10e48e0) at state_tracker/st_glsl_to_tgsi.cpp:2085 #7 0x7f527f21b5f0 in ir_dereference_array::accept (this=0x10e48e0, v=0x10cc050) at ../../src/glsl/ir.h:2024 #8 0x7f527f14b3a3 in glsl_to_tgsi_visitor::visit (this=0x10cc050, ir=0x10e4950) at state_tracker/st_glsl_to_tgsi.cpp:2163 #9 0x7f527f21b65e in ir_dereference_record::accept (this=0x10e4950, v=0x10cc050) at ../../src/glsl/ir.h:2072 #10 0x7f527f14b9f5 in glsl_to_tgsi_visitor::visit (this=0x10cc050, ir=0x10e4a00) at state_tracker/st_glsl_to_tgsi.cpp:2338 #11 0x7f527f21b318 in ir_assignment::accept (this=0x10e4a00, v=0x10cc050) at ../../src/glsl/ir.h:1053 #12 0x7f527f143954 in glsl_to_tgsi_visitor::visit (this=0x10cc050, ir=0x10e4130) at state_tracker/st_glsl_to_tgsi.cpp:1187 #13 0x7f527f21b268 in ir_function::accept (this=0x10e4130, v=0x10cc050) at ../../src/glsl/ir.h:920 #14 0x7f527f2183dd in visit_exec_list (list=0x10d8fe0, visitor=0x10cc050) at ../../src/glsl/ir.cpp:1725 #15 0x7f527f156f98 in get_mesa_program (ctx=0x7f52843d2010, shader_program=0x10cb510, shader=0x10d8e10) at state_tracker/st_glsl_to_tgsi.cpp:5144 #16 0x7f527f1577eb in st_link_shader (ctx=0x7f52843d2010, prog=0x10cb510) at state_tracker/st_glsl_to_tgsi.cpp:5376 #17 0x7f527f16d3ec in _mesa_glsl_link_shader (ctx=0x7f52843d2010, prog=0x10cb510) at program/ir_to_mesa.cpp:3093 #18 0x7f527f068b97 in link_program (ctx=0x7f52843d2010, program=3) at main/shaderapi.c:913 #19 0x7f527f069cd1 in _mesa_LinkProgram (programObj=3) at main/shaderapi.c:1377 #20 0x7f5283f0d469 in stub_glLinkProgram (program=3) at piglit/tests/util/generated_dispatch.c:17573 #21 0x0040586e in link_and_use_shaders () at piglit/tests/shaders/shader_runner.c:814 #22 0x004094f0 in piglit_init (argc=2, argv=0x7fff9e9bf9c8) at piglit/tests/shaders/shader_runner.c:2055 #23 0x7f5283ee7a1a in run_test (gl_fw=0x7f52841d6360 , argc=2, argv=0x7fff9e9bf9c8) at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:140 #24 0x7f5283ee57e9 in piglit_gl_test_run (argc=2, argv=0x7fff9e9bf9c8, config=0x7fff9e9bf890) at piglit/tests/util/piglit-framework-gl.c:191 #25 0x0040415e in main (argc=2, argv=0x7fff9e9bf9c8) at piglit/tests/shaders/shader_runner.c:60 (gdb) frame 1 #1 0x7f527f141e2a in glsl_to_tgsi_visitor::get_opcode (this=0x10cc050, ir=0x10e4460, op=1, dst=..., src0=..., src1=...) at state_tracker/st_glsl_to_tgsi.cpp:637 637 assert(src0.type != GLSL_TYPE_STRUCT); (gdb) print src0.type $1 = 7 (gdb) print /d GLSL_TYPE_STRUCT $2 = 7 -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev