summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: use MAX3() instead of MAX2(MAX2) in draw_textured_quad()Brian Paul2015-10-201-1/+2
| | | | | | Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: fix incorrect opcode in save_BlendFunci()Brian Paul2015-10-201-1/+1
| | | | | | | | | Fixes assertion failure with new piglit arb_draw_buffers_blend-state_set_get test. Cc: [email protected] Reviewed-by: Jose Fonseca <[email protected]>
* mesa: add more cases to print_list() in dlist.cBrian Paul2015-10-201-0/+46
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* i965: silence incompatible pointer type warningEmil Velikov2015-10-201-1/+1
| | | | | | | | | | | | | | | | | src/mesa/drivers/dri/i965/brw_program.c:94:39: warning: passing argument 1 of ‘_mesa_init_gl_program’ from incompatible pointer type [-Wincompatible-pointer-types] return _mesa_init_gl_program(&prog->program, target, id); ^ Runtime was unaffected as brw_geometry_program is subclassed from gl_geometry_program, thus the address passed was the same. Fixes: bcb56c2c69d (program: convert _mesa_init_gl_program() to take struct gl_program *) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* gallium: add PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINTMarek Olšák2015-10-2016-1/+45
| | | | | | | | | | | | | | This avoids a serious r600g bug leading to a GPU hang. The chances this bug will get fixed are pretty low now. I deeply regret listening to others and not pushing this patch, leaving other users with a GPU-crashing driver. Yes, it should be fixed in the compiler and it's ugly, but users couldn't care less about that. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86720 Cc: 11.0 10.6 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* vc4: Switch our vertex attr lowering to being NIR-based.Eric Anholt2015-10-202-143/+200
| | | | | | | | | | This exposes more information to NIR's optimization, and should be particularly useful when we do range-based optimization. total uniforms in shared programs: 32066 -> 32065 (-0.00%) uniforms in affected programs: 21 -> 20 (-4.76%) total instructions in shared programs: 93104 -> 92630 (-0.51%) instructions in affected programs: 31901 -> 31427 (-1.49%)
* vc4: Add limited support for ibfe/ubfe.Eric Anholt2015-10-201-0/+42
| | | | | This is just enough to cover our unpack modes, which will be used by some new NIR-based lowering in the next commit.
* tgsi/scan: use properties for clip/cull distance writemasksMarek Olšák2015-10-201-14/+14
| | | | | | No changes needed for drivers already relying on tgsi_shader_info. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: pass the clip distance array size to driversMarek Olšák2015-10-201-0/+8
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add new properties for clip and cull distance usageMarek Olšák2015-10-203-1/+15
| | | | | | | | The TGSI usage mask can't be used, because these are declared as an output array of 2 elements. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: replace UsesClipDistance with ClipDistanceArraySizeMarek Olšák2015-10-205-30/+25
| | | | | | | This is more practical and needed by gallium. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeonsi: enable BC_OPTIMIZE if centroid isn't usedMarek Olšák2015-10-201-1/+5
| | | | | | This solution was recommended by a Catalyst developer. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: fix the export_prim_id field size in the shader keyMarek Olšák2015-10-201-2/+2
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: support thread-safe shaders shared by multiple contextsMarek Olšák2015-10-209-199/+224
| | | | | | | | | | | | The "current" shader pointer is moved from the CSO to the context, so that the CSO is mostly immutable. The only drawback is that the "current" pointer isn't saved when unbinding a shader and it must be looked up when the shader is bound again. This is also a prerequisite for multithreaded shader compilation. Reviewed-by: Michel Dänzer <[email protected]>
* st/mesa: create shaders which have only one variant immediatelly (v2)Marek Olšák2015-10-203-2/+24
| | | | | | v2: fix the condition when lacking sample shading Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: negate the can_force_persample_interp flagMarek Olšák2015-10-204-5/+6
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: decouple shaders from contexts if they are shareableMarek Olšák2015-10-206-13/+21
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: add PIPE_CAP_SHAREABLE_SHADERSMarek Olšák2015-10-2015-0/+16
| | | | | | I'll let drivers figure out how to do it. Reviewed-by: Ilia Mirkin <[email protected]>
* radeonsi: add support for ARB_texture_viewMarek Olšák2015-10-204-8/+24
| | | | | | | | | | | | All tests pass. We don't need to do much - just set CUBE if the view target is CUBE or CUBE_ARRAY, otherwise set the resource target. The reason this can be so simple is that texture instructions have a greater effect on the target than the sampler view. Thanks Glenn for the piglit test. Reviewed-by: Michel Dänzer <[email protected]>
* vc4: Use nir_foreach_variableBoyan Ding2015-10-203-7/+7
| | | | | Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: fix stream qualifier for blocks with an instance nameTimothy Arceri2015-10-203-22/+16
| | | | | | | | | | This also removes the validation from the parser as it is not required and once arb_enhanced_layouts comes along we wont be able to do validation on the stream qualifier in the parser anyway as it adds constant expression support to the stream qualifier. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: 11.0 <[email protected]>
* glsl: fix regression when building interface field name for SSBOsTimothy Arceri2015-10-201-0/+2
| | | | | | | | | Fixes regression cased by bb5aeb854915ba67abc56257f830d002c956439e We don't care about the swizzle when building the name so just skip over it. Tested-by: Markus Wick <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* st/omx/dec/h264: fix field picture type 0 poc disorderLeo Liu2015-10-191-4/+8
| | | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: "10.6 11.0" <[email protected]>
* i965/gen9: Handle the GL_TEXTURE_{1D, 1D_ARRAY} targets inside switchAnuj Phogat2015-10-191-4/+4
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/fs: Localize variables' scopes.Matt Turner2015-10-191-8/+5
|
* i965/fs: Consider type mismatches in saturate propagation.Matt Turner2015-10-191-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | NIR considers bcsel to produce and consume unsigned types, leading to SEL instructions operating on unsigned types when the data is really floating-point. Previous to this patch, saturate propagation would happily transform (+f0) sel g20:UD, g30:UD, g40:UD mov.sat g50:F, g20:F into (+f0) sel.sat g20:UD, g30:UD, g40:UD mov g50:F, g20:F But since the meaning of .sat is dependent on the type of the destination register, this is not valid. Instead, allow saturate propagation to change the types of dest/source on instructions that are simply copying data in order to propagate the saturate modifier. Fixes bad code gen in 158 programs. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Extract can_change_source_types() functions.Matt Turner2015-10-196-27/+30
| | | | | | | | | Make them members of fs_inst/vec4_instruction for use elsewhere. Also fix the fs version to check that dst.type == src[1].type and for !saturate. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/vs: Move URB entry_size and read_length calculations to compile_vsJason Ekstrand2015-10-192-34/+34
| | | | Reviewed-By: Eduardo Lima Mitev <[email protected]>
* i965: Move the entire compiler API into a single fileJason Ekstrand2015-10-1910-619/+665
| | | | | | | | | | | At this point, the compiler API has been substantially simplified. In the spirit of Kristian's making a compiler library, this commit makes a single header file that contains, more-or-less, the entire compiler API. There's still a bit of cleanup to do particularly in the area of geometry shaders. However, this gets us much closer to having a separate compiler. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Rename brw_foo_emit to brw_compile_fooJason Ekstrand2015-10-1911-66/+67
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/fs: Move some of the prog_data setup into brw_wm_emitJason Ekstrand2015-10-192-98/+100
| | | | | | | | This commit moves the common/modern stuff. Some legacy stuff such as setting use_alt_mode was left because it needs to know whether or not we're an ARB program. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/cs: Rework cs_emit to take a nir_shader and a brw_compilerJason Ekstrand2015-10-193-29/+42
| | | | | | | This commit removes all dependence on GL state by getting rid of the brw_context parameter and the GL data structures. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/gs: Rework gs_emit to take a nir_shader and a brw_compilerJason Ekstrand2015-10-193-40/+29
| | | | | | | | | This commit removes all dependence on GL state by getting rid of the brw_context parameter and the GL data structures. Unfortunately, we still have to pass in the gl_shader_program for gen6 because it's needed for transform feedback. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/vs: Rework vs_emit to take a nir_shader and a brw_compilerJason Ekstrand2015-10-193-49/+49
| | | | | | | | | | | This commit removes all dependence on GL state by getting rid of the brw_context parameter and the GL data structures. v2 (Jason Ekstrand): - Patch use_legacy_snorm_formula through as a function argument rather than trying to go through the shader key. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/fs: Rework wm_fs_emit to take a nir_shader and a brw_compilerJason Ekstrand2015-10-193-39/+47
| | | | | | | This commit removes all dependence on GL state by getting rid of the brw_context parameter and the GL data structures. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Use a const nir_shader in backend_shaderJason Ekstrand2015-10-1911-12/+12
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/vec4: Remove gl_program and gl_shader_program from the generatorJason Ekstrand2015-10-194-29/+20
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/fs: Remove the gl_program from the generatorJason Ekstrand2015-10-195-9/+5
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* nir/info: Add a few bits of info for fragment shadersJason Ekstrand2015-10-193-0/+29
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* nir/info: Add compute shader local size to nir_shader_infoJason Ekstrand2015-10-192-0/+12
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* nir/info: Move the GS info into a stage-specific info unionJason Ekstrand2015-10-192-8/+18
| | | | | | | | This way we can have other stage-specific info without consuming too much extra space. While we're at it, we make sure that the geometry info is only set if we're actually a goemetry shader. Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: Move gl_frag_depth_layout from mtypes.h to shader_enums.hJason Ekstrand2015-10-192-18/+17
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* nir: Add a label to nir_shader_infoJason Ekstrand2015-10-193-0/+7
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/asm: Explicitly use a nir_instr for IR annotationsJason Ekstrand2015-10-194-19/+5
| | | | | | | Now that everything goes through NIR, we don't need this to be a void pointer anymore. Reviewed-by: Topi Pohjolainen <[email protected]>
* scons: Build nir/glsl_types.cpp once.Jose Fonseca2015-10-198-29/+8
| | | | | | | | | | | | Undoes early hacks, and ensures nir/glsl_types.cpp is built once, and only once. The root problem is that SCons doesn't know about NIR nor any source file in the NIR_FILES source list. Tested with libgl-gdi and libgl-xlib scons targets. Reviewed-by: Brian Paul <[email protected]>
* svga: fix incorrect round-down arithmeticBrian Paul2015-10-191-1/+1
| | | | | | | | | Spotted by Roland. Luckily, this code should never really be hit since the const buffer size and offset should already be multiples of 16. I could probably add more assertions to that effect, but let's just fix the arithmetic for now. Reviewed-by: Roland Scheidegger <[email protected]>
* glsl: fix segfault when indirect indexing a buffer variable which is an arraySamuel Iglesias Gonsalvez2015-10-191-1/+2
| | | | | | | Fixes a regression added by bb5aeb854915ba67abc56257f830d002c956439e. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* st/va: Added support for NV12 to IYUV conversion in vlVaGetImageIndrajit Das2015-10-191-3/+5
| | | | Reviewed-by: Christian König <[email protected]>
* st/va: Used correct parameter to derive the value of the "h" variable in ↵Indrajit Das2015-10-191-1/+1
| | | | | | | | vlVaCreateImage Cc: "11.0" <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glsl_to_tgsi: Use {Num}UniformBlocks instead of {Num}BufferInterfaceBlocksIago Toral Quiroga2015-10-191-2/+2
| | | | | | | The latter holds both UBOs and SSBOs, but here we only want UBOs. Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Marek Olšák <[email protected]>