summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: fix a crash in ir_print_visitor() for bindless samplers/imagesSamuel Pitoiset2017-06-011-1/+5
| | | | | | | | | Bindless samplers/images are represented with 64-bit unsigned integers and they can be assigned with explicit constructors. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: teach opt_array_splitting about bindless imagesSamuel Pitoiset2017-06-011-2/+13
| | | | | | | | Memory/format layout qualifiers shouldn't be lost when arrays of images are splitted by this pass. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: teach opt_structure_splitting about images in structuresSamuel Pitoiset2017-06-011-2/+21
| | | | | | | | | GL_ARB_bindless_texture allows images to be declared inside structures, but when memory/format qualifiers are used, they should be propagated when structures are splitted. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: fix broken indentation in do_structure_splitting()Samuel Pitoiset2017-06-011-16/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: handle format layout qualifiers for struct with array of imagesSamuel Pitoiset2017-06-011-1/+2
| | | | | | | | | | | This handles a situation like: struct { layout (r32f) image2D imgs[6]; } s; Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: handle memory qualifiers for struct with array of imagesSamuel Pitoiset2017-06-011-3/+4
| | | | | | | | | | | This handles a situation like: struct { image2D imgs[6]; } s; Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* nvc0: Clean up unnecessary includes from gallium/auxiliary/vl/Rhys Kidd2017-06-011-3/+0
| | | | | Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* i965: Simplify SO_DECL handling.Kenneth Graunke2017-06-011-28/+13
| | | | | | | We can initialize structs directly, avoid some temporaries, and cut out about half of the skip component handling. Reviewed-by: Rafael Antognolli <[email protected]>
* i965: Make a local for linked_xfb->Outputs[i], to shorten things.Kenneth Graunke2017-06-011-9/+10
| | | | | | This seems a bit more readable. Reviewed-by: Rafael Antognolli <[email protected]>
* i965: Move SOL PSIZ hacks from draw time to link time.Kenneth Graunke2017-06-013-34/+41
| | | | | | | | | We can just update the gl_transform_feedback_info fields at link time to make the VUE header fields have the right location and component. Then we don't need to handle them specially at draw time, which is expensive. Reviewed-by: Rafael Antognolli <[email protected]>
* mesa/main: replace remaining uses of IROUND() in GetUniform*() by round()Iago Toral Quiroga2017-06-011-2/+2
| | | | | | | | | These were correct since they were used only in conversions to signed integers, however this makes the implementation a bit more is more consistent and reduces chances of propagating use of these macros to unsigned cases in the future, which would not be correct. Reviewed-by: Matt Turner <[email protected]>
* mesa/main: conversion from float in GetUniformi64v requires rounding to nearestIago Toral Quiroga2017-06-011-1/+1
| | | | | | | | As we do for all other cases of float/double conversions to integers. v2: use round() instead of IROUND() macros (Iago) Reviewed-by: Matt Turner <[email protected]>
* mesa/main: Add conversion from double to uint64/int64 in GetUniform*i64v()Iago Toral Quiroga2017-06-011-0/+14
| | | | | | | | v2: - need unsigned rounding for double->uint64 conversion (Nicolai) - use round() instead of IROUND() macros (Iago) Reviewed-by: Matt Turner <[email protected]>
* mesa/main: Clamp GetUniformui64v values to be >= 0Iago Toral Quiroga2017-06-011-1/+45
| | | | | | | | | | Like we do for the 32-bit case. v2: - need unsigned rounding for float->uint64 conversion (Nicolai) - use roundf() instead of IROUND() macros (Iago) Reviewed-by: Matt Turner <[email protected]>
* mesa/main: Clamp GetUniformuiv values to be >= 0Kenneth Graunke2017-06-011-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | Section 2.2.2 (Data Conversions For State Query Commands) of the OpenGL 4.5 October 24th 2016 specification says: "If a command returning unsigned integer data is called, such as GetSamplerParameterIuiv, negative values are clamped to zero." v2: uint to int conversion should clamp to INT_MAX (Nicolai) v3 (Iago) - Add conversions conversions from 64-bit integer paths - Rebase on master v4: - need unsigned rounding for float/double->uint conversions (Nicolai) - use round{f}() instead of IROUND() macros (Iago) Fixes: KHR-GL45.gpu_shader_fp64.state_query Reviewed-by: Nicolai Hähnle <[email protected]> (v2) Reviewed-by: Matt Turner <[email protected]>
* mesa/main: fix indentation in _mesa_get_uniform()Iago Toral Quiroga2017-06-011-98/+101
| | | | | | | v2: also change the style of the large conditional in that function to follow the style from most other parts of Mesa (Nicolai) Reviewed-by: Matt Turner <[email protected]>
* r100: Silence numerous unused this or that warningsIan Romanick2017-05-311-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | radeon_fbo.c: In function ‘radeon_map_renderbuffer_s8z24’: radeon_fbo.c:147:50: warning: unused parameter ‘ctx’ [-Wunused-parameter] radeon_map_renderbuffer_s8z24(struct gl_context *ctx, ^~~ radeon_fbo.c: In function ‘radeon_map_renderbuffer_z16’: radeon_fbo.c:186:48: warning: unused parameter ‘ctx’ [-Wunused-parameter] radeon_map_renderbuffer_z16(struct gl_context *ctx, ^~~ radeon_fbo.c: In function ‘radeon_unmap_renderbuffer_s8z24’: radeon_fbo.c:344:52: warning: unused parameter ‘ctx’ [-Wunused-parameter] radeon_unmap_renderbuffer_s8z24(struct gl_context *ctx, ^~~ radeon_fbo.c: In function ‘radeon_unmap_renderbuffer_z16’: radeon_fbo.c:377:50: warning: unused parameter ‘ctx’ [-Wunused-parameter] radeon_unmap_renderbuffer_z16(struct gl_context *ctx, ^~~ radeon_fbo.c: In function ‘radeon_nop_alloc_storage’: radeon_fbo.c:624:75: warning: unused parameter ‘rb’ [-Wunused-parameter] radeon_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb, ^~ radeon_fbo.c:625:12: warning: unused parameter ‘internalFormat’ [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^~~~~~~~~~~~~~ radeon_fbo.c:625:35: warning: unused parameter ‘width’ [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^~~~~ radeon_fbo.c:625:49: warning: unused parameter ‘height’ [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^~~~~~ radeon_fbo.c: In function ‘radeon_bind_framebuffer’: radeon_fbo.c:696:74: warning: unused parameter ‘fbread’ [-Wunused-parameter] struct gl_framebuffer *fb, struct gl_framebuffer *fbread) ^~~~~~ radeon_fbo.c: In function ‘radeon_validate_framebuffer’: radeon_fbo.c:832:19: warning: unused variable ‘radeon’ [-Wunused-variable] radeonContextPtr radeon = RADEON_CONTEXT(ctx); ^~~~~~ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* r100: Use _mesa_get_format_base_format in radeon_update_wrapperIan Romanick2017-05-311-1/+1
| | | | | | | | | | | | | | The wrapper is for a renderbuffer around a texture. Textures can have formats (e.g., 3) that aren't valide for API generated renderbuffers. _mesa_base_fbo_format will return 0, but _mesa_get_format_base_format will return the base format of RGB. Fixes a crashes in piglit tests fbo-alphatest-formats (all subtests pass) and fbo-colormask-formats (some subtests pass, some fail). Signed-off-by: Ian Romanick <[email protected]> Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]>
* r100,r200: Don't assume glVisual is non-NULL during context creationIan Romanick2017-05-313-3/+1
| | | | | | | | | | | Thanks to EGL_MESA_configless_context, the visual pointer can be NULL. Fixes a segfault (or assertion failure) in piglit's egl-configless-context test. Signed-off-by: Ian Romanick <[email protected]> Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]>
* r100: Don't assume that the base mipmap of a texture existsIan Romanick2017-05-311-4/+10
| | | | | | | | Fixes crashes in piglit's gl-1.2-texture-base-level. Signed-off-by: Ian Romanick <[email protected]> Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]>
* r600/eg: add support for tracing IBs after a hang.Dave Airlie2017-06-0111-7/+785
| | | | | | | | | This is a poor man's version of radeonsi ddebug stuff, this should get hooked into that infrastructure, and grow more stuff, but for now, just create R600_TRACE var that points to a file that you want to dump the last IB to. Signed-off-by: Dave Airlie <[email protected]>
* glsl/lower_int64: only set progress when something is lowered.Dave Airlie2017-06-011-4/+1
| | | | | | | | Otherwise we'd get progress continually set if we had non 64-bit versions of these ops. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Revert HTILE reset word to 0xFFFFFFFF.Bas Nieuwenhuizen2017-05-311-1/+1
| | | | | | | | 0x30f regressed mad max. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Fixes: df91abfe5af "radv: Use correct clear words for HTILE."
* Android: major/minor/makedev live in <sys/sysmacros.h>Rob Herring2017-05-311-0/+1
| | | | | | | | | sysmacros.h was getting implicitly included in types.h until recently in AOSP master. Define MAJOR_IN_SYSMACROS to explicitly include sysmacros.h. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* egl/android: Drop unused 'format' param in get_back_bo()Chad Versace2017-05-311-2/+2
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/android: Align channel masks in HAL_PIXEL_FORMAT tableChad Versace2017-05-311-4/+4
| | | | | | | Improves readability. No change in behavior. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/drm: remove temporary fd variableEric Engestrom2017-05-311-8/+6
| | | | | | | | | | | | In all codepaths, this var ends up assigned to the struct, except one: a cleanup codepath, where the `close()` was removed, leading to fd leaks. Remove the temp fd and assign to the struct field directly instead. CovID: 1213930 Fixes: 7ec07beedf486d8ab901 ("egl/drm: make use of the dri2_display_destroy() helper") Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* mesa: throw an INVALID_OPERATION error in get_texobj_by_name()Samuel Pitoiset2017-05-311-50/+11
| | | | | | | | Because get_texobj_by_name() can already throw a INVALID_ENUM error, it makes more sense to add a check directly there. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add new 'name' parameter to get_texobj_by_name()Samuel Pitoiset2017-05-311-13/+12
| | | | | | | | To display better function names when INVALID_OPERATION is returned. Requested by Timothy. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi: remove unused si_pm4_state::compute_pktSamuel Pitoiset2017-05-312-4/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: remove chip_class define from si_pm4.hSamuel Pitoiset2017-05-311-1/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: merge si_pm4_free_state_simple() into si_pm4_free_state()Samuel Pitoiset2017-05-312-8/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/util: fix arithmetic use of 'void *' in u_vector_foreachSamuel Pitoiset2017-05-311-1/+1
| | | | | | | | | | u_vector_foreach is currently only used by the Intel Vulkan driver but when this macro is used in mesa core, GCC reports a compile-time error. Probably because some compiler options are different. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove _mesa from static function namesTimothy Arceri2017-05-311-4/+4
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa/st: indentation tidy-upTimothy Arceri2017-05-311-33/+32
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* freedreno/a5xx: drop WFIs in emit_marker5()Rob Clark2017-05-301-5/+0
| | | | | | | | | Results in always having at least one WFI between draws, which was slowing stk down by ~5% and ~10% in xonotic. (also drop bogus assert while we're at it.) Signed-off-by: Rob Clark <[email protected]>
* freedreno/a5xx: timestamp / time-elapsed queriesRob Clark2017-05-302-1/+97
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a5xx: rename query result structRob Clark2017-05-301-23/+22
| | | | | | Going to want the same thing for timestamp queries. Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2017-05-306-18/+624
| | | | Signed-off-by: Rob Clark <[email protected]>
* i965: Delete dead old-school packing structs.Kenneth Graunke2017-05-301-175/+0
| | | | Trivial.
* swr/rast: code cleanup (no functional change)Tim Rowley2017-05-301-2/+6
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: whitespace changesTim Rowley2017-05-303-8/+3
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: code cleanup (no functional change)Tim Rowley2017-05-301-3/+4
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: allow early-z if shader uses depth valueTim Rowley2017-05-301-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: move wireframe/point triangle binning after cullingTim Rowley2017-05-301-80/+76
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: remove unused functionsTim Rowley2017-05-301-28/+0
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: code cleanup (no functional change)Tim Rowley2017-05-301-60/+64
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: move binner utility functions to binner.hTim Rowley2017-05-303-193/+225
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: SIMD16 FE - fix/use SIMD16 calcDeterminantIntVertical()Tim Rowley2017-05-303-43/+65
| | | | | | Stop double pumping the SIMD8 version. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: add renderTargetArrayIndex to SWR_PS_CONTEXTTim Rowley2017-05-302-5/+6
| | | | Reviewed-by: Bruce Cherniak <[email protected]>