Hi, this is the filter backtrace:
Program received signal SIGSEGV, Segmentation fault. get_sampler_varient (unit=<value optimized out>, sampler=0x8085c80, texture=0x0, processor=0) at sp_state_sampler.c:207 207 key.bits.target = sp_texture->base.target; (gdb) bt #0 get_sampler_varient (unit=<value optimized out>, sampler=0x8085c80, texture=0x0, processor=0) at sp_state_sampler.c:207 #1 0x00c12c7c in softpipe_reset_sampler_varients (softpipe=0x805d498) at sp_state_sampler.c:263 #2 0x00c12312 in update_tgsi_samplers (softpipe=0x805d498) at sp_state_derived.c:200 #3 softpipe_update_derived (softpipe=0x805d498) at sp_state_derived.c:249 #4 0x00c0978d in softpipe_draw_range_elements_instanced (pipe=0x805d498, indexBuffer=<value optimized out>, indexSize=0, minIndex=0, maxIndex=4294967295, mode=6, start=0, count=4, startInstance=0, instanceCount=1) at sp_draw_arrays.c:260 #5 0x00c0996c in softpipe_draw_arrays (pipe=0x805d498, mode=6, start=0, count=4) at sp_draw_arrays.c:144 #6 0x004cc40c in util_draw_vertex_buffer (pipe=0x805d498, vbuf=0x808d4c0, offset=0, prim_type=6, num_verts=4, num_attribs=2) at util/u_draw_quad.c:72 #7 0x004acb36 in renderer_texture_quad (r=0x80751b8, tex=0x8086eb8, x1offset=0, y1offset=0, x2offset=32, y2offset=32, x1=10, y1=10, x2=42, y2=10, x3=42, y3=42, x4=10, y4=42) at renderer.c:590 #8 0x004ab036 in image_draw (img=0x8086e60) at image.c:552 #9 0x0048c6e7 in vgDrawImage (image=134770272) at api_images.c:307 #10 0x08049301 in draw () at filter.c:97 #11 0x080498ba in event_loop (argc=1, argv=0xbffff3c4, init_f=0x8048fd0 <init>, resh_f=0x8048f50 <reshape>, draw_f=0x8049270 <draw>, key_f=0) at eglcommon.c:172 #12 run (argc=1, argv=0xbffff3c4, init_f=0x8048fd0 <init>, resh_f=0x8048f50 <reshape>, draw_f=0x8049270 <draw>, key_f=0) at eglcommon.c:276 #13 0x08048fc1 in main (argc=1, argv=0xbffff3c4) at filter.c:105 and this is the output of text_to_tgsi: VERT DCL IN[0] DCL OUT[0], POSITION DCL TEMP[0] DCL CONST[0..1] 0: MUL TEMP[0], IN[0], CONST[0] 1: ADD TEMP[0], TEMP[0], CONST[1] 2: MOV OUT[0], TEMP[0] 3: END FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR, CONSTANT DCL TEMP[0..4], CONSTANT DCL ADDR[0], CONSTANT DCL CONST[0..20], CONSTANT DCL SAMP[0], CONSTANT 0: MOV TEMP[0], CONST[0].xxxx 1: MOV TEMP[1], CONST[0].xxxx 2: BGNLOOP :14 3: SGE TEMP[0].z, TEMP[0].yyyy, CONST[1].xxxx 4: IF TEMP[0].zzzz :7 5: BRK 6: ENDIF 7: ARL ADDR[0].x, TEMP[0].yyyy 8: MOV TEMP[3], CONST[ADDR[0]+2] 9: ADD TEMP[4].xy, IN[0], TEMP[3] 10: TEX TEMP[2], TEMP[4], SAMP[0], 2D 11: MOV TEMP[3], CONST[ADDR[0]+11] 12: MAD TEMP[1], TEMP[2], TEMP[3], TEMP[1] 13: ADD TEMP[0].y, TEMP[0].yyyy, CONST[0].yyyy 14: ENDLOOP :2 15: MAD OUT[0], TEMP[1], CONST[1].yyyy, CONST[1].zzzz 16: END VERT DCL IN[0] DCL IN[1] DCL OUT[0], POSITION DCL OUT[1], GENERIC DCL TEMP[0] DCL CONST[0..1] 0: MUL TEMP[0], IN[0], CONST[0] 1: ADD TEMP[0], TEMP[0], CONST[1] 2: MOV OUT[0], TEMP[0] 3: MOV OUT[1], IN[1] 4: END Segmentation fault On Wed, Feb 3, 2010 at 12:03 PM, Zack Rusin <za...@vmware.com> wrote: > On Wednesday 03 February 2010 09:19:43 Igor Oliveira wrote: >> A new version and a little improvement. >> Makes more sense adding the texture in paint bind samplers than mask >> bind samplers. >> >> Igor >> >> On Wed, Feb 3, 2010 at 6:21 AM, Igor Oliveira >> >> <igor.olive...@openbossa.org> wrote: >> > This patch fix segfaults in mask.cpp and mask4.cpp binding a missing >> > texture in mask bind samplers. > > What's the stack trace again? I don't have a working vg setup right now. I'm a > bit confused why it's crashing when we never sample from those units. > > The issue is that while right now alpha_mask texture is unconditionally there > that's actually a bug - there's no guarantee that the alpha mask will be > always present (obviously for egl configs that didn't ask for it, it shouldn't > be there). Meaning that for stuff like filter and lookup it's perfectly ok for > it to be null. > > I think ideally what we'd do is fix all those static sampler texture > assignment. E.g. right now > 0 - paint sampler/texture for gradient/pattern > 1 - mask sampler/texture > 2 - blend sampler/texture > 3 - image sampler/texture > > meaning that if there's no paint, mask and blend and we only draw image then > we have > 0 - dummy > 1 - dummy > 2 - dummy > 3 - image > > We had to do it this way when we had the hand written text assembly to have > some semblance of sanity but now that we use ureg we could fix it properly > e.g. > in asm_fill.c in mask(...) instead of doing sampler[1], we'd simply do > *sampler > and change the combine_shaders to pass the correct the sampler to the > function. Yep. It is better do that. i was fixing it because i was porting filters to ureg and we do not have the khronos conformance tests so we need to know when we have regressions in ureg code. > > If you need to fix the crash just to move forward on something I can commit it > but please just add a /* FIXME: the texture might not be there */ and > debug_assert(ctx->draw_buffer->alpha_mask);. > > z > Igor ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev