summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* vc4: Add support for 8-bit unorm/snorm vertex inputs.Eric Anholt2014-09-236-16/+101
|
* vc4: Add disasm for A-file unpack operations.Eric Anholt2014-09-233-22/+26
| | | | | | The A-file unpack is just like R4 unpack, except that if you don't do a floating-point operation it won't do float conversion (so int16 gets scaled up to int32).
* vc4: Switch to using Mesa's register allocator.Eric Anholt2014-09-235-114/+121
| | | | | | | | | This will let me more reliably allocate a-file registers, which are going to be even more in demand when I start using a-file unpacks. Also fixes a bug where the reservation of payload registers (FRAG_Z/W) was off by one but just caused failure to register allocate at all if the off-by-one was fixed.
* vc4: Make a static list of all the registers.Eric Anholt2014-09-231-12/+82
|
* vc4: Switch the context struct to use ralloc.Eric Anholt2014-09-231-2/+3
| | | | | I wanted to hang the ra_regs off it so I didn't have to free, but it turned out it wasn't ralloced yet.
* mesa: Move register_allocate.c to util.Eric Anholt2014-09-2316-30/+13
| | | | | | | | | | | | | 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)
* gallivm: fix idivRoland Scheidegger2014-09-231-7/+5
| | | | | | | | | | | ffeb77c7b0552a8624e46e65d6347240ac5ae84d had a typo which turned all signed integer divisions into unsigned ones. Oops. This gets us back the 51 little piglits (all from glsl built-in-functions, fs/vs/gs-op-div-int-ivec2 and similar). Cc: "10.2 10.3" <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* egl: extra null checks for get_xcb_screen() return valuesJuha-Pekka Heikkila2014-09-231-6/+24
| | | | | | | verify get_xcb_screen() returned pointer before using it. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* 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]>
* glsl: Check realloc return value in ir_function::matching_signature()Juha-Pekka Heikkila2014-09-231-2/+9
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* loader: Check dlsym() did not fail in libudev_get_device_name_for_fd()Juha-Pekka Heikkila2014-09-231-0/+3
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* glsl: Check calloc return value in link_intrastage_shaders()Juha-Pekka Heikkila2014-09-231-4/+11
| | | | | | | Check calloc return value while adding build-in functions. 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]>
* glsl: add missing null check in tfeedback_decl::init()Juha-Pekka Heikkila2014-09-231-0/+5
| | | | | 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]>
* glsl: Fix memory leak in glsl_lexer.llJuha-Pekka Heikkila2014-09-231-3/+6
| | | | | | | | | | | | | Running fast clear glClear with SNB caused Valgrind to complain about this. v2: line 237 fixed glClear from leaking memory, other strdups are also now changed to ralloc_strdups but I don't know what effect those have. At least no changes in my Piglit quick run. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* ilo: rework pipeline workaroundsChia-I Wu2014-09-233-228/+339
| | | | | | | | Add current_pipe_control_dw1 and deferred_pipe_control_dw1 to track what have been done since lsat 3DPRIMITIVE and what need to be done before next 3DPRIMITIVE. Based on them, we can emit WAs more smartly. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: remove handle_invalid_batch_bo()Chia-I Wu2014-09-233-67/+32
| | | | | | | | | | | | | | It was used to set has_gen6_wa_pipe_control to false when the batch buffer changed. When called from emit_flush() and others, it also unset ILO_3D_PIPELINE_INVALIDATE_BATCH_BO so that the following emit_draw() will not set has_gen6_wa_pipe_control to false again. It sounded error-prone and was just ugly. We should be able to achieve the same goal by reset has_gen6_wa_pipe_control in ilo_3d_pipeline_invalidate(). With handle_invalid_batch_bo() gone, the emit functions can also be inlined. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: make gen6_pipeline_update_max_svbi() staticChia-I Wu2014-09-233-8/+1
| | | | | | | We do not need to call it from GEN7 pipeline anymore since software PIPE_QUERY_PRIMITIVES_EMITTED is gone. Signed-off-by: Chia-I Wu <[email protected]>
* freedreno/ir3: add TXB2 supportIlia Mirkin2014-09-221-4/+14
| | | | | | | Handles texture(samplerCubeShadow, bias), part of GLES3 and GL3 Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: add TXQ supportIlia Mirkin2014-09-221-0/+27
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix TXB/TXL to actually pull the bias/lod argumentIlia Mirkin2014-09-221-1/+4
| | | | | | | | | | | | Previously we would get a potentially computed post-swizzle coord based on the texture target info, which would not include the bias/lod in the last argument. The second argument does not have to be adjacent, so adjusting the order array did not make sense. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: make texture instruction construction more dynamicIlia Mirkin2014-09-221-145/+80
| | | | | | | | | | This will make life a lot easier as we add support for additional instructions. v2: shadow reference value is always .z or .w Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[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]>
* egl/drm: expose KHR_image_pixmap extensionAndreas Pokorny2014-09-231-0/+1
| | | | | | | | | This changes enables EGL_KHR_image_pixmap in the egl drm platform, which is implemented there but has not been advertised yet. Cc: 10.2 10.3 <[email protected]> Signed-off-by: Andreas Pokorny <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* gallium: update comment for enum pipe_formatBrian Paul2014-09-221-6/+1
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: replace pipe_type enum with tgsi_return_type enumBrian Paul2014-09-227-28/+29
| | | | | | | | | | | The only place the enum pipe_type was used is for the TGSI sampler view return type. So make it a TGSI type. Note: it appears this part of TGSI isn't used by anyone so it may be removed in the future. v2: the new name is tgsi_return_type, not tgsi_type. This means we can drop the previously posted tgsi_type -> tgsi_opcode_type patch. Reviewed-by: Roland Scheidegger <[email protected]>
* draw: use new tgsi_transform inst/decl helpers in pstipple codeBrian Paul2014-09-221-68/+19
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* draw: use new tgsi_transform inst/decl helpers in aapoint codeBrian Paul2014-09-221-202/+54
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* draw: use new tgsi_transform inst/decl helpers in aaline codeBrian Paul2014-09-221-66/+21
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* tgsi: add inst/decl helpers for tgsi_transform utilityBrian Paul2014-09-221-0/+333
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* draw: use tgsi transform prolog callback in polygon stipple codeBrian Paul2014-09-221-125/+110
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* draw: use tgsi transform prolog/epilog callbacks in AA line codeBrian Paul2014-09-221-90/+92
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* draw: use tgsi transform prolog/epilog callbacks in AA point codeBrian Paul2014-09-221-305/+316
| | | | | | This simplifies the code and makes it a little easier to understand. Reviewed-by: Charmaine Lee <[email protected]>
* tgsi: fix tgsi transform's epilog callbackBrian Paul2014-09-221-7/+15
| | | | | | | We want to call the caller's epilog callback when we find the TGSI END instruction, not after it. Reviewed-by: Charmaine Lee <[email protected]>
* tgsi: add prolog() method to tgsi_transform_contextBrian Paul2014-09-222-0/+13
| | | | | | | Called when the user can insert new decls, instructions. This could be used in a few places in the 'draw' module. Reviewed-by: Charmaine Lee <[email protected]>
* glsl: use ptrdiff_t cast to silence g++ sign warningBrian Paul2014-09-221-1/+1
| | | | Reviewed-by: Ian Romanick <[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]>
* clover: Add support to mem objects for multiple destructor callbacks v2Tom Stellard2014-09-222-5/+8
| | | | | | | | | | | | The spec says that mem objects should maintain a stack of callbacks not just one. v2: - Remove stray printf. Reviewed-by: Francisco Jerez <[email protected]> CC: "10.3" <[email protected]>
* st/xa: silence unused variable warningBrian Paul2014-09-221-0/+1
| | | | Reviewed-by: Emil Velikov <[email protected]>
* target-helpers: add inline qualifier on configuration_query()Brian Paul2014-09-221-1/+1
| | | | | | To silence unused function warnings. Reviewed-by: Emil Velikov <[email protected]>
* ilo: clean up fallback path for primitive restartChia-I Wu2014-09-221-160/+74
| | | | | | | We should be able to draw with the index buffer mapped. That simplifies things a lot. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: handle conditional rendering in the contextChia-I Wu2014-09-228-65/+58
| | | | | | Conditional rendering is not limited to draw_vbo(). Move the support to ilo_context, and replace ilo_3d_pass_render_condition() by ilo_skip_rendering().
* ilo: create the pipeline from the builderChia-I Wu2014-09-225-15/+7
| | | | The pipeline needs just the builder to build commands. It does not need CP.