Bug 84539 - brw_fs_register_coalesce.cpp:183: bool fs_visitor::register_coalesce(): Assertion `src_size <= 11' failed.
Summary: brw_fs_register_coalesce.cpp:183: bool fs_visitor::register_coalesce(): Asser...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Jason Ekstrand
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-01 02:38 UTC by Dave Airlie
Modified: 2014-10-27 17:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Airlie 2014-10-01 02:38:00 UTC
Running piglit inside virgl on master this happened,

GLSL: #version 130
#extension GL_ARB_fragment_coord_conventions : enable
layout(origin_upper_left ) in vec4 gl_FragCoord;
out vec4 out_c0;
out vec4 out_c1;
out vec4 out_c2;
out vec4 out_c3;
out vec4 out_c4;
out vec4 out_c5;
out vec4 out_c6;
out vec4 out_c7;
vec4 temps[4];
uniform vec4 fsconst0[4];
uniform sampler2D fssamp0;
void main(void)
{
temps[0] = vec4(((gl_FragCoord)));
temps[0].y = float(((gl_FragCoord) * (fsconst0[3].zzzz) + (fsconst0[3].wwww)).y);
temps[1].yzw = vec3(((vec4(0,0,0,0)).yzw));
temps[2].xy = vec2((( temps[0].xyyy  + (vec4(-0.5,-0.5,-0.5,-0.5)))).xy);
temps[3].x = float(1.0/((fsconst0[1].xxxx)));
temps[2].xy = vec2((( temps[2].xyyy  *  temps[3].xxxx )).xy);
temps[2].xy = vec2(( temps[2].xyyy .xy));
temps[2].x = float(texture(fssamp0,  temps[2] .xy));
temps[2].x = float((( temps[2].xxxx  +  -temps[0].zzzz )).x);
temps[2].x = float((abs( temps[2].xxxx )));
temps[1].x = float((((fsconst0[2].xxxx) *  temps[2].xxxx )).x);
out_c0 = vec4(( temps[1] ));
gl_FragDepth = float(( temps[0].zzzz .z));
out_c1 = out_c0;
out_c2 = out_c0;
out_c3 = out_c0;
out_c4 = out_c0;
out_c5 = out_c0;
out_c6 = out_c0;
out_c7 = out_c0;
}

(gdb) up
#4  0x00007fa9f1ba1fa2 in fs_visitor::register_coalesce (this=this@entry=0x7fff0eac78a0)
    at brw_fs_register_coalesce.cpp:183
183	         assert(src_size <= MAX_SAMPLER_MESSAGE_SIZE);
(gdb) print src_size
$1 = 12
(gdb) list
178	
179	      if (reg_from != inst->src[0].reg) {
180	         reg_from = inst->src[0].reg;
181	
182	         src_size = virtual_grf_sizes[inst->src[0].reg];
183	         assert(src_size <= MAX_SAMPLER_MESSAGE_SIZE);
184	
185	         assert(inst->src[0].width % 8 == 0);
186	         channels_remaining = src_size;
187	         memset(mov, 0, sizeof(mov));
(gdb) print inst->src[0].reg
$2 = 25
(gdb) print inst
$3 = (fs_inst *) 0x7faa14fed030
(gdb) print *inst
$4 = {<backend_instruction> = {<exec_node> = {next = 0x7faa1577e670, prev = 0x7faa15754d00}, ir = 0x0, annotation = 0x0, 
    texture_offset = 0, offset = 0, mlen = 0 '\000', base_mrf = 0 '\000', target = 0 '\000', 
    opcode = SHADER_OPCODE_LOAD_PAYLOAD, conditional_mod = BRW_CONDITIONAL_NONE, predicate = BRW_PREDICATE_NONE, 
    predicate_inverse = false, writes_accumulator = false, force_writemask_all = false, no_dd_clear = false, 
    no_dd_check = false, saturate = false}, dst = {<backend_reg> = {file = GRF, type = BRW_REGISTER_TYPE_F, reg = 11, 
      reg_offset = 0, fixed_hw_reg = {type = BRW_REGISTER_TYPE_UD, file = 0, nr = 0, subnr = 0, negate = 0, abs = 0, 
        vstride = 0, width = 0, hstride = 0, address_mode = 0, pad0 = 0, dw1 = {bits = {swizzle = 0, writemask = 0, 
            indirect_offset = 0, pad1 = 0}, f = 0, d = 0, ud = 0}}, negate = false, abs = false}, subreg_offset = 0, 
    reladdr = 0x0, width = 8 '\b', effective_width = 8 '\b', stride = 1 '\001'}, src = 0x7faa14fece10, sources = 12 '\f', 
  exec_size = 8 '\b', flag_subreg = 0 '\000', regs_written = 12 '\f', eot = false, header_present = false, 
  shadow_compare = false, force_uncompressed = false, force_sechalf = false, pi_noperspective = false}
(gdb) print virtual_grf_sizes
$5 = (int *) 0x7faa15954010
(gdb) print virtual_grf_sizes[25]
$6 = 12
Comment 1 Dave Airlie 2014-10-01 02:42:58 UTC
oh also this is an Ivybridge machine

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.4.0-devel (git-7ddcee6)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
Comment 2 Jason Ekstrand 2014-10-01 22:57:26 UTC
This patch should fix it:

http://lists.freedesktop.org/archives/mesa-dev/2014-October/068930.html
Comment 3 Matt Turner 2014-10-27 17:12:12 UTC
commit 50d0e2e118fb3e42dc83c83de34da3eac0a0d8a1
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Wed Oct 1 10:54:59 2014 -0700

    i965/fs: Add a MAX_GRF_SIZE define and use it various places
    
    Previously, we had a MAX_SAMPLER_MESSAGE_SIZE which we used instead.
    However, some FB write messages can validly be longer than this so we need
    something different.  Since MAX_SAMPLER_MESSAGE_SIZE is validly useful on
    its own, we leave it alone and add a new MAX_GRF_SIZE that's big enough for
    FB writes.
    
    Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84539
    Reviewed-by: Matt Turner <mattst88@gmail.com>


bug/show.html.tmpl processed on Jan 16, 2017 at 21:48:58.
(provided by the Example extension).