summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Drop _mesa_bsearch() wrapper.Matt Turner2014-09-242-21/+0
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Unifdef _WIN32_WCE.Matt Turner2014-09-243-24/+1
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Unifdef _XBOX.Matt Turner2014-09-241-1/+1
| | | | | | | | Inexplicably added in commit 36940429. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Use realloc() instead of _mesa_realloc() and remove the latter.Matt Turner2014-09-246-28/+7
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove duplicate _mesa_{init,free}_shader_state prototypes.Matt Turner2014-09-241-7/+0
| | | | Reviewed-by: Tapani Pälli <[email protected]>
* i965: Add and use functions to get next/prev blocks.Matt Turner2014-09-246-20/+73
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Call insert and remove functions from exec_node directly.Matt Turner2014-09-243-14/+11
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Make instruction lists local to the bblocks.Matt Turner2014-09-2412-92/+115
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/cfg: Add note about double-loop macros and break behavior.Matt Turner2014-09-241-0/+6
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Replace initialization loops with memset().Matt Turner2014-09-242-15/+5
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/vec4: Don't iterate between blocks with inst->next/prev.Matt Turner2014-09-241-21/+9
| | | | | | The register coalescing portion of this patch hurts three shaders in Guacamelee by one instruction each, but examining the diff makes me believe that what we were generating was (perhaps harmlessly) incorrect.
* i965/fs: Don't iterate between blocks with inst->next/prev.Matt Turner2014-09-245-47/+34
| | | | | | When instruction lists are per-basic block, this won't work. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/cfg: Add macros to iterate through a block given a starting point.Matt Turner2014-09-241-0/+10
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/fs: Make count_to_loop_end() use basic blocks.Matt Turner2014-09-241-15/+16
| | | | | | | When the instructions aren't in a flat list, this wouldn't have worked. Also, this should be faster. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/vec4: Don't use instruction list after calculating the cfg.Matt Turner2014-09-245-14/+15
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/fs: Don't use instruction list after calculating the cfg.Matt Turner2014-09-243-22/+22
| | | | | | | | The only trick is changing a break into a return true in register coalescing, since the macro is actually a double loop, and break will do something different than you expect. (Wish I'd realized that earlier!) Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Remove now unneeded calls to calculate_cfg().Matt Turner2014-09-2412-39/+4
| | | | | | | Now that nothing invalidates the CFG, we can calculate_cfg() immediately after emit_fb_writes()/emit_thread_end() and never again. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Remove cfg-invalidating parameter from invalidate_live_intervals.Matt Turner2014-09-2420-40/+34
| | | | | | Everything has been converted to preserve the CFG. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Preserve the CFG in instruction scheduling.Matt Turner2014-09-241-32/+42
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/vec4: Preserve CFG in spill_reg().Matt Turner2014-09-244-38/+56
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/vec4: Preserve the CFG in a few more places.Matt Turner2014-09-241-7/+16
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/fs: Preserve the CFG in a few more places.Matt Turner2014-09-242-15/+21
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Restructure debug flagsKristian Høgsberg2014-09-242-60/+60
| | | | | | | | | | | This cleans up the debug flags to be consistently indented, use bit shifting instead of hex-values and fixes a bug where the new DEBUG_NO8 flag used the same value as the DEBUG_VUE flag. This was hidden by the numbers not being aligned. Also removes gaps in the range where DEBUG_IOCTL (0x4) and DEBUG_REGION (0x400) used to be. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* st/mesa: redefine mapping from VARYING_SLOT_TEXi/PNTC/VARi to TGSI GENERIC[i]Marek Olšák2014-09-243-22/+52
| | | | | | | | | | | Generic varyings in TGSI were based on the value of VARYING_SLOT_TEX0, so VAR0 was always GENERIC[22] (with tessellation patches). Some drivers might not be able to cope with that. This commit defines a proper mapping, so that PNTC is GENERIC[8] and VAR0 is GENERIC[9]. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: don't set coord_enable for gl_PointCoord if using TGSI_SEMANTIC_PCOORDMarek Olšák2014-09-241-1/+2
| | | | | | This was missed when Christoph Bumiller added PIPE_CAP_TGSI_TEXCOORD. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use UniformBooleanTrue in glsl_to_tgsiMarek Olšák2014-09-241-4/+1
| | | | | | | Just for consistency. This doesn't fix anything as the original code was already pretty good. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: drop dependence on API profile in st_init_extensionsMarek Olšák2014-09-244-14/+11
| | | | | | | The extensions and limits being set in the conditional block are core-only anyway and don't have any effect on other profiles. Reviewed-by: Brian Paul <[email protected]>
* mesa: allow forcing >=3.1 compatibility contexts with MESA_GL_VERSION_OVERRIDEMarek Olšák2014-09-241-6/+10
| | | | | | | | | | E.g. the 4.0 compatibility profile can be forced with: MESA_GL_VERSION_OVERRIDE=4.0COMPAT Some tests that I have require 4.0 compatibility. Reviewed-by: Brian Paul <[email protected]>
* mesa: don't set ES versions to GLSLVersion in _mesa_init_constantsMarek Olšák2014-09-242-11/+3
| | | | | | | No place in Mesa expects an ES version there. Drivers don't even set it like this. Reviewed-by: Brian Paul <[email protected]>
* mesa: Move register_allocate.c to util.Eric Anholt2014-09-237-738/+4
| | | | | | | | | | | | | The r300 gallium driver is using it outside of the Mesa tree, and I wanted to do so for vc4 as well. Rather than make the multiple-definitions problem even more complicated, just move it to more-shared code. v2: Don't forget to delete the symlink in r300 (review by Matt). Delete more r300-helper references (review by Emil) Don't prefix util/ header inclusion with "util/" (review by Emil) Reviewed-by: Matt Turner <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]> (v1)
* meta: Fix error paths in meta_copy_image.cJuha-Pekka Heikkila2014-09-231-0/+9
| | | | | | | | If _mesa_get_tex_image() return NULL there is already error set in context. Other error pats free allocated texture. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* meta: Avoid null access on setup_glsl_msaa_blit_shader()Juha-Pekka Heikkila2014-09-231-11/+13
| | | | | | | On default fallback path there was null access on src_rb Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Add extra null check in intel_bufferobj_alloc()Juha-Pekka Heikkila2014-09-231-0/+3
| | | | | | | Check calloc returned requested memory. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa/main: Check allocations success in ↵Juha-Pekka Heikkila2014-09-231-0/+9
| | | | | | | _mesa_one_time_init_extension_overrides() Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Avoid null access in intelMakeCurrent()Juha-Pekka Heikkila2014-09-231-3/+7
| | | | | | | separate two null checks connected with && to their own if branches. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: add null checks in symbol_table.cJuha-Pekka Heikkila2014-09-231-0/+30
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: in set_read_rb_tex_image() check _mesa_meta_bind_rb_as_tex_image() did ↵Juha-Pekka Heikkila2014-09-232-5/+18
| | | | | | | | | | | succeed Check if _mesa_meta_bind_rb_as_tex_image() did give the texture. If no texture was given there is already either GL_INVALID_VALUE or GL_OUT_OF_MEMORY error set in context. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i915: Fix black buffers when importing prime fdsAndreas Pokorny2014-09-231-0/+2
| | | | | | | | | Width and Height of the imported image was never initialized from the imported bo. Cc: 10.2 10.3 <[email protected]> Signed-off-by: Andreas Pokorny <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* i965/fs: Remove direct fs_visitor brw_wm_prog_key dependenceJordan Justen2014-09-225-9/+36
| | | | | | | | Instead we store a void pointer to the key, and cast it to brw_wm_prog_key for fragment shader specific code paths. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/fs: Use brw_sampler_prog_key_data instead of brw_wm_prog_key::texJordan Justen2014-09-221-12/+29
| | | | | | | | | | This helps: 1. Reduce the need to have fs_visitor::key's type be brw_wm_prog_key* 2. Align the code to allow brw_sampler_prog_key_data to be pulled out of other prog_key types for different stages. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/fs: Remove direct fs_visitor brw_wm_prog_data dependenceJordan Justen2014-09-223-21/+56
| | | | | | | | Instead we store a brw_stage_prog_data pointer, and cast it to brw_wm_prog_data for fragment shader specific code paths. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/gen6: Enable GL 3.3 and GLSL 3.30Chris Forbes2014-09-202-9/+2
| | | | | | | | | | | | Tested on my snb-gt2: 4 tests skip->pass in spec/EXT_texture_array 51 tests skip->pass in spec.glsl-3.30 4 tests skip->pass in spec/!OpenGL 3.3 No regressions; no skip->fail changes. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/gen6: enable GLSL 1.50, OpenGL 3.2 and GL_AMD_vertex_shader_layeredSamuel Iglesias Gonsalvez2014-09-192-3/+3
| | | | | | | | | | | | | | | | Geometry shaders was the only thing we needed to enable GLSL 1.50 and OpenGL 3.2 in gen6. v2: Layered clears do not work properly in gen6 with OpenGL 3.2. Kenneth and Jordan realized that for this to work we also need GL_AMD_vertex_shader_layered (which requires OpenGL 3.2, so it could not be enabled before this patch), so we agreed to enable this together with OpenGL 3.2 in this patch. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* i965/gen6/gs: Use a specific implementation of geometry shaders for gen6.Iago Toral Quiroga2014-09-191-20/+33
| | | | | | | | | | | | | In gen6 we will use the geometry shader implementation from gen6_gs_visitor.cpp and keep the implementation in brw_vec4_gs_visitor.cpp for gen7+. Notice that gen6_gs_visitor inherits from brw_vec4_gs_visitor so it is not a completely seprate implementation of geometry shaders. Also, gen6 does not support multiple dispatch modes, its default operation mode is equivalent to gen7's SINGLE mode, so select that in gen6 for consistency. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/gen6/gs: upload ubo and pull constants surfaces.Iago Toral Quiroga2014-09-191-0/+2
| | | | | | | | | | | | Uniforms declared as uniform blocks are stored in ubo surfaces and need to be pulled from the geometry shader program so make sure we upload them first and do the same for pull constants. This fixes all piglit tests that use uniform blocks: bin/shader_runner tests/spec/glsl-1.50/uniform_buffer/gs-* Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/gen6/gs: Enable transform feedback support in geometry shadersSamuel Iglesias Gonsalvez2014-09-192-8/+11
| | | | | | Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/gen6/gs: Fix binding table clash between TF surfaces and textures.Iago Toral Quiroga2014-09-196-29/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | For gen6 geometry shaders we use the first BRW_MAX_SOL_BINDINGS entries of the binding table for transform feedback surfaces. However, vec4_visitor will setup the binding table so that textures use the same space in the binding table. This is done when calling assign_common_binding_table_offsets(0) as part if its run() method. To fix this clash we add a virtual method to the vec4_visitor hierarchy to assign the binding table offsets, so that we can change this behavior specifically for gen6 geometry shaders by mapping textures right after the first BRW_MAX_SOL_BINDINGS entries. Also, when there is no user-provided geometry shader, we only need to upload the binding table if we have transform feedback, however, in the case of a user-provided geometry shader, we can't only look into transform feedback to make that decision. This fixes multiple piglit tests for textureSize() and texelFetch() when these functions are called from a geometry shader in gen6, like these: bin/textureSize gs sampler2D -fbo -auto bin/texelFetch gs usampler2D -fbo -auto Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/gen6/gs: Avoid buffering transform feedback varyings twice.Iago Toral Quiroga2014-09-192-106/+83
| | | | | | | | | Currently we buffer transform feedack varyings separately. This patch makes it so that we reuse the values we have already buffered for all the output varyings of the geometry shader instead. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/gen6/gs: Buffer PSIZ/flags vertex data in gen6_gs_visitorSamuel Iglesias Gonsalvez2014-09-191-38/+41
| | | | | | | | | | | | | | Since geometry shaders can alter the value of varyings packed in the first output VUE slot (PSIZ), we need to buffer it together with all the other vertex data so we can emit the right value for each vertex when we do the URB writes. This fixes the following piglit test in gen6: tests/spec/glsl-1.50/execution/redeclare-pervertex-out-subset-gs.shader_test Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/gen6/gs: Setup SOL surfaces for user-provided geometry shadersSamuel Iglesias Gonsalvez2014-09-191-38/+81
| | | | | | | | | | Update gen6_gs_binding_table and gen6_sol_surface to use user-provided geometry program information when present. This is necessary to implement transform feedback support. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>