summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: include dispatch.h lessMarek Olšák2018-04-1220-20/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Silence remaining unused parameter warnings in teximage.cIan Romanick2018-04-111-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/mesa/main/teximage.c: In function ‘_mesa_test_proxy_teximage’: src/mesa/main/teximage.c:1301:51: warning: unused parameter ‘level’ [-Wunused-parameter] GLuint numLevels, GLint level, ^~~~~ src/mesa/main/teximage.c: In function ‘texsubimage_error_check’: src/mesa/main/teximage.c:2186:30: warning: unused parameter ‘dsa’ [-Wunused-parameter] bool dsa, const char *callerName) ^~~ src/mesa/main/teximage.c: In function ‘copytexture_error_check’: src/mesa/main/teximage.c:2297:32: warning: unused parameter ‘width’ [-Wunused-parameter] GLint width, GLint height, GLint border ) ^~~~~ src/mesa/main/teximage.c:2297:45: warning: unused parameter ‘height’ [-Wunused-parameter] GLint width, GLint height, GLint border ) ^~~~~~ src/mesa/main/teximage.c: In function ‘check_rtt_cb’: src/mesa/main/teximage.c:2679:21: warning: unused parameter ‘key’ [-Wunused-parameter] check_rtt_cb(GLuint key, void *data, void *userData) ^~~ src/mesa/main/teximage.c: In function ‘override_internal_format’: src/mesa/main/teximage.c:2756:55: warning: unused parameter ‘width’ [-Wunused-parameter] override_internal_format(GLenum internalFormat, GLint width, GLint height) ^~~~~ src/mesa/main/teximage.c:2756:68: warning: unused parameter ‘height’ [-Wunused-parameter] override_internal_format(GLenum internalFormat, GLint width, GLint height) ^~~~~~ src/mesa/main/teximage.c: In function ‘texture_sub_image’: src/mesa/main/teximage.c:3293:24: warning: unused parameter ‘dsa’ [-Wunused-parameter] bool dsa) ^~~ src/mesa/main/teximage.c: In function ‘can_avoid_reallocation’: src/mesa/main/teximage.c:3788:53: warning: unused parameter ‘x’ [-Wunused-parameter] mesa_format texFormat, GLint x, GLint y, GLsizei width, ^ src/mesa/main/teximage.c:3788:62: warning: unused parameter ‘y’ [-Wunused-parameter] mesa_format texFormat, GLint x, GLint y, GLsizei width, ^ src/mesa/main/teximage.c: In function ‘valid_texstorage_ms_parameters’: src/mesa/main/teximage.c:5987:40: warning: unused parameter ‘samples’ [-Wunused-parameter] GLsizei samples, unsigned dims) ^~~~~~~ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Silence unused parameter warning in compressedteximage_only_formatIan Romanick2018-04-113-10/+10
| | | | | | | | | | | | | | | Passing ctx to compressedteximage_only_format was the only use of the ctx parameter in _mesa_format_no_online_compression, so that parameter had to go too. ../../SOURCE/master/src/mesa/main/teximage.c: In function ‘compressedteximage_only_format’: ../../SOURCE/master/src/mesa/main/teximage.c:1355:57: warning: unused parameter ‘ctx’ [-Wunused-parameter] compressedteximage_only_format(const struct gl_context *ctx, GLenum format) ^~~ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* blorp: Silence unused function warningsNanley Chery2018-04-111-1/+1
| | | | | | | | | | | | | | | | | | | vulkan/genX_blorp_exec.c:69:1: warning: ‘blorp_get_surface_base_address’ defined but not used [-Wunused-function] blorp_get_surface_base_address(struct blorp_batch *batch) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from vulkan/genX_blorp_exec.c:35:0: ./blorp/blorp_genX_exec.h:1249:1: warning: ‘blorp_emit_memcpy’ defined but not used [-Wunused-function] blorp_emit_memcpy(struct blorp_batch *batch, ^~~~~~~~~~~~~~~~~ genX_blorp_exec.c:99:1: warning: ‘blorp_get_surface_base_address’ defined but not used [-Wunused-function] blorp_get_surface_base_address(struct blorp_batch *batch) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from genX_blorp_exec.c:33:0: ../../../../../src/intel/blorp/blorp_genX_exec.h:1249:1: warning: ‘blorp_emit_memcpy’ defined but not used [-Wunused-function] blorp_emit_memcpy(struct blorp_batch *batch, ^~~~~~~~~~~~~~~~~ Reviewed-by: Lionel Landwerlin <[email protected]>
* mesa: Assert base format before truncating to unsigned shortTopi Pohjolainen2018-04-111-2/+3
| | | | | | | | | CID: 1433709 Fixes: ca721b3d8: mesa: use GLenum16 in a few more places Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965: Remove brw_bo_alloc_tiled_2d from intel_detect_swizzling.Kenneth Graunke2018-04-101-10/+4
| | | | | | I'd like to drop this pre-isl function. This drops one of the two uses. Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa: fix glsl version mismatch in compat profileTimothy Arceri2018-04-111-2/+6
| | | | | | | | | | Drivers that only support compat 3.0 were reporting GLSL 1.40 support. This fixes issues with the menu of Dawn of War II. Fixes: a0c8b49284ef "mesa: enable OpenGL 3.1 with ARB_compatibility" Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105807
* st/mesa: finalise tcs/tes/geom NIR before storing it to the cacheTimothy Arceri2018-04-101-2/+9
| | | | | | | We don't create variants of the NIR so here we finalise it before caching to avoid unnecessary processing when restoring it. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: exit st_translate_fragment_program() earlier for NIR pathTimothy Arceri2018-04-101-6/+6
| | | | | | This avoids a bunch of scanning that is only used by the TGSI path. Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_nir: set paramater value offset as driver location for packed ↵Timothy Arceri2018-04-103-11/+11
| | | | | | | | | uniforms This allows us to simplify the code and will also be useful for supporting bindless textures. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: stop calling _mesa_init_shader_object_functions()Timothy Arceri2018-04-101-1/+0
| | | | | | | This sets the LinkShader function for the driver, but for the st we set it properly with the following call to st_init_program_functions(). Reviewed-by: Marek Olšák <[email protected]>
* mesa/st/nir: fix instruction removalRob Clark2018-04-091-1/+1
| | | | | | | | | At one point this kinda worked (or at least didn't cause problems). But with deref-instructions it results in dangling deref instructions not being properly removed. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/st/nir: fix naked lowering pass callRob Clark2018-04-091-1/+1
| | | | | | | | Not using the macro means no nir_validate in debug builds, resulting in problems showing up only after later passes. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Make the miptree clear color setter take a gl_color_unionNanley Chery2018-04-093-6/+7
| | | | | | | | We want to hide the internal details of how the miptree's clear color is calculated. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/miptree: Move the clear color and value setter implementationsNanley Chery2018-04-092-21/+30
| | | | | | | These will get more complex in later commits. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Use the brw_context for the clear color and value settersNanley Chery2018-04-093-6/+6
| | | | | | | Do what all the other functions in the miptree API do. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: return the fourcc saved in __DRIimage when possibleXiong, James2018-04-091-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a image from a texture, the image's dri_format is set to the first plane's format, and used to look up for the fourcc. e.g. for FOURCC_NV12 texture, the dri_format is set to __DRI_IMAGE_FORMAT_R8, we end up with a wrong entry in function intel_lookup_fourcc(): { __DRI_IMAGE_FOURCC_R8, __DRI_IMAGE_COMPONENTS_R, 1, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, } }, instead of the correct one: { __DRI_IMAGE_FOURCC_NV12, __DRI_IMAGE_COMPONENTS_Y_UV, 2, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, { 1, 1, 1, __DRI_IMAGE_FORMAT_GR88, 2 } } }, as a result, a wrong fourcc __DRI_IMAGE_FOURCC_R8 was returned. To fix this bug, the image inherits the texture's planar_format that has the original fourcc; Upon querying, if planar_format is set, return the saved fourcc; Otherwise fall back to the old way. v3: add a bug description and "cc mesa-stable" tag (Jason) remove redundant null pointer check (Tapani) squash 2 patches into one (James) v2: fall back to intel_lookup_fourcc() when planar_format is NULL (Dongwon & Matt Roper) Cc: [email protected] Signed-off-by: Xiong, James <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: adds some comments regarding MESA_GLES_VERSION_OVERRIDE usageAndres Gomez2018-04-091-2/+8
| | | | | | | | | | Fixes: 03fd6704db9 ("mesa: Add support for a new override string MESA_GLES_VERSION_OVERRIDE") Cc: Jordan Justen <[email protected]> Cc: Ian Romanick <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: simplify MESA_GL_VERSION_OVERRIDE behavior of API overrideMarek Olšák2018-04-091-12/+11
| | | | | | | | | | | | | | | | | | v2: - Provide a correct explanation on the envvars documentation (Ian). - Provide a more correct explanation on the function comments (Andres). v3: - Homogenize documentation and inline comments (Emil). - Correct a typo (Emil). Fixes: 2599b92eb97 ("mesa: allow forcing >=3.1 compatibility contexts with MESA_GL_VERSION_OVERRIDE") Cc: Jordan Justen <[email protected]> Cc: Ian Romanick <[email protected]> Cc: Eric Engestrom <[email protected]> Cc: Emil Velikov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri_util: don't fail when not supporting ARB_compatibility with GL3.1Andres Gomez2018-04-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, any driver that does not support the ARB_compatibility extension will fail on GL3.1 context creation if the application does not request the forward-compatiblity flag. Restore the original check which changes mesa_api to API_OPENGL_CORE, only when: - GL3.1 is requested, without the forward-compatiblity flag. - driver does not support ARB_compatibility - as deduced by max_gl_compat_version. Fixes: a0c8b49284e ("mesa: enable OpenGL 3.1 with ARB_compatibility") v2: - Improve commit log (Emil). - Provide a correct explanation on the features documentation (Ian). Cc: Marek Olšák <[email protected]> Cc: Ian Romanick <[email protected]> Cc: Kenneth Graunke <[email protected]> Cc: Eric Engestrom <[email protected]> Cc: Emil Velikov <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* dri_util: when overriding, always reset the core versionAndres Gomez2018-04-091-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This way we won't fail when validating just because we may have a non overriden core version that is lower than the requested one, even when the compat version is high enough. For example, running glcts from VK-GL-CTS with i965, this will succeed: $ MESA_GL_VERSION_OVERRIDE=4.6 ./glcts --deqp-case=KHR-GL46.info.vendor While, this will fail: $ MESA_GL_VERSION_OVERRIDE=4.6COMPAT ./glcts --deqp-case=KHR-GL46.info.vendor Fixes: 464c56d3d5c ("dri_util: Use _mesa_override_gl_version_contextless") Cc: Ian Romanick <[email protected]> Cc: Tapani Pälli <[email protected]> Cc: Marek Olšák <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* st/mesa: tex offsets can't be in a const or 2d-indexedIlia Mirkin2018-04-071-1/+5
| | | | | | | | | | | | | | | | | All consts are now implicitly 2d (they set .Dimension), so trigger asserts. Also, the texture offset can't handle any sort of 2d indexing. While this could be tacked on, this seems unnecessary, just move it off into a separate temp. Fixes assertion failure in tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-gatherOffset-uniform-offset.frag Note that this was an issue even before the const-always-2d thing, since there was no detection of when even a proper second dimension was used, e.g. for UBO or geom/tess inputs. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* i965: Use %x instead of %u in debug print.Kenneth Graunke2018-04-061-1/+1
| | | | | I mistakenly printed out the address as 0x<decimal number> instead of printing a proper hex number. This was...surprising.
* prog/nir: Simplify some load/store operationsJason Ekstrand2018-04-051-40/+13
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965/surface_state: Emit the clear color address instead of value.Rafael Antognolli2018-04-051-0/+22
| | | | | | | | | | | | On Gen10, when emitting the surface state, use the value stored in the clear color entry buffer by using a clear color address in the surface state. v4: Use the clear color offset from the clear_color_bo, when available. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/blorp: Update the fast clear value buffer.Rafael Antognolli2018-04-052-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | On Gen10, whenever we do a fast clear, blorp will update the clear color state buffer for us, as long as we set the clear color address correctly. However, on a hiz clear, if the surface is already on the fast clear state we skip the actual fast clear operation and, before gen10, only updated the miptree. On gen10+ we need to update the clear value state buffer too, since blorp will not be doing a fast clear and updating it for us. v4: - do not use clear_value_size in the for loop - Get the address of the clear color from the aux buffer or the clear_color_bo, depending on which one is available. - let core blorp update the clear color, but also update it when we skip a fast clear depth. v5: Better subject (Jordan). v6: Remove outdated comment (Jason). Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Add aux_buf variable to simplify code.Rafael Antognolli2018-04-052-21/+14
| | | | | | | | | | | | In a follow up patch, we make use of clear_color_bo, which is in mt->mcs_buf or mt->hiz_buf. To avoid duplicating more code that does the same thing on both aux buffers, just use aux_buf already. v5: Add aux_buf to brw_wm_surface_state too. v6: Drop aux_surf and use aux_buf->surf instead (Jason). Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/miptree: Add new clear color BO for winsys aux buffersRafael Antognolli2018-04-051-0/+17
| | | | | | | | | | | | | Add an extra BO to store clear color when we receive the aux buffer from the window system. Since we have no control over the aux buffer size in this case, we need the new BO to store only the clear color. v5: - Better subject (Jordan). - Drop alignment from brw_bo_alloc(). Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/miptree: Add space to store the clear value in the aux surface.Rafael Antognolli2018-04-052-0/+33
| | | | | | | | | | | | | | | | Similarly to vulkan where we store the clear value in the aux surface, we can do the same in GL. v2: Remove unneeded extra function. v3: Use clear_value_state_size instead of clear_value_size. v4: - rename to clear_color_state_size - store clear_color_bo and clear_color_offset in the aux buf struct v5: Unreference clear color bo (Jordan) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* st/mesa: set stencil border color the same as intensityMarek Olšák2018-04-041-0/+2
| | | | | | This fixes some stencil border color tests on Vega and Raven chips. Reviewed-by: Ilia Mirkin <[email protected]>
* Fix use of alloca() without #include <c99_alloca.h>Jon Turney2018-04-041-0/+1
| | | | | | | | | | | | | Fix use of alloca() without #include <c99_alloca.h> in 1da345e5 vbo/vbo_context.c: In function '_vbo_draw_indirect': vbo/vbo_context.c:284:34: error: implicit declaration of function 'alloca' [-Werror=implicit-function-declaration] struct _mesa_prim *space = alloca(draw_count*sizeof(struct _mesa_prim)); ^~~~~~ vbo/vbo_context.c:284:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion] Signed-off-by: Jon Turney <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* i965: Extend the negative 32-bit deltas to 64-bitsSergii Romantsov2018-04-031-1/+1
| | | | | | | | | | | | | | | | | | Gen8+ use 48-bit address relocations so need to extend the sign to 64-bit return value. Without it we have higher bits zeroed and missing the negavive values. Haswell and older use 32-bit deltas so are unaffected by this issue. v2: used int32_t fucntion parameter instead of explicit type conversion. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101408 Signed-off-by: Sergii Romantsov <[email protected]> Tested-by: Andriy Khulap <[email protected]> Tested-by: Stuart Young <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "18.0 17.3" <[email protected]>
* st/mesa: Also use PIPE_FORMAT_R8G8B8A8_SRGB for framebuffer_sRGB.Jakob Bornecrantz2018-04-031-1/+2
| | | | | | | | | When running virgl on a GLES host the only sRGB formats that support rendering is RGBA and RGBX. That pipe format is in the sRGB default lists that the state tracker uses when mapping mesa formats. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* mesa: ensure that variable is initializedDylan Baker2018-04-031-1/+1
| | | | | | | | | | | | | | | This variable controls whether we link using the glsl code path or the spirv path. It's set when we validate that all shaders are glsl or spirv, but if there are no shaders attached to the program it will remain unset, resulting in undefined behavior. We want to go down the glsl path in that case, so initialize to false. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105820 Fixes: 16f6634e7fb5ada308e55b852cd49251e7f3f8b1 ("mesa/program: Link SPIR-V shaders using the SPIR-V code-path") Signed-off-by: Dylan Baker <[email protected]> Tested-by: Mark Janes <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]>
* Revert "mesa: add GL_HALF_FLOAT as supported type to readpixels"Tapani Pälli2018-04-031-2/+0
| | | | | | | | | This reverts commit 41cf30b8bc55fdf36adac3311002dc32b6715949. Commit caused regressions with KHR-GLES3.packed_pixels.* tests. Signed-off-by: Tapani Pälli <[email protected]> Suggested-by: Eric Anholt <[email protected]>
* st/mesa: don't draw if the bound element array buffer is not allocatedMarek Olšák2018-04-021-0/+7
| | | | Tested-by: Dieter Nützel <[email protected]>
* st/glsl_to_nir: gather next_stage in shader_infoTimothy Arceri2018-04-021-0/+15
| | | | Reviewed-by: Marek Olšák <[email protected]>
* vbo: Use alloca for _vbo_draw_indirect.Mathias Fröhlich2018-03-311-24/+55
| | | | | | | | | | Avoid using malloc in the draw path of mesa. Since the draw_count is a user api input, fall back to malloc if the amount of consumed stack space may get too high. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* vbo: Remove unused includes to vbo_private.hMathias Fröhlich2018-03-312-3/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* vbo: Move vbo_split into the tnl module.Mathias Fröhlich2018-03-3112-174/+178
| | | | | | | | Move the files, adapt to the naming scheme in tnl, update callers and build system. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* vbo: Readd the arrays argument to the legacy draw methods.Mathias Fröhlich2018-03-317-29/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The legacy draw paths from back before 2012 contained a gl_vertex_array array for the inputs to be used for draw. So all draw methods from legacy drivers and everything that goes through tnl are originally written for this calling convention. The same goes for tools like t_rebase or vbo_split*, that even partly still have the original calling convention with a currently unused such pointer. Back in 2012 patch 50f7e75 mesa: move gl_client_array*[] from vbo_draw_func into gl_context introduced Array._DrawArrays, which was something that was IMO aiming for a similar direction than Array._DrawVAO introduced recently. Now several tools like t_rebase and vbo_split*, which are mostly used by tnl based drivers, would need to be converted to use the internal Array._DrawVAO instead of Array._DrawArrays. The same goes for the driver backends that use any of these tools. Alternatively we can reintroduce the gl_vertex_array array in its call argument list and put these tools finally into the tnl directory. So this change reintroduces this gl_vertex_array array for the legacy draw paths that are still required for the tools t_rebase and vbo_split*. A followup will move vbo_split also into tnl. Note that none of the affected drivers use the DriverFlags.NewArray driver bit. So it should be safe to remove this also for the legacy draw path. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* vbo: Remove the now unused vbo draw path.Mathias Fröhlich2018-03-317-97/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* tnl: Push down the gl_vertex_array inputs into tnl drivers.Mathias Fröhlich2018-03-3113-9/+88
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* vbo: Remove vbo_indirect_draw_func.Mathias Fröhlich2018-03-313-102/+30
| | | | | | | | | | | Remove the vbo_indirect_draw_func vbo callback and make the default implementation use the drivers main draw callback function directly. This will be needed with the next changes when drivers without own main drivers DrawIndirect implementation get moved to the main drivers Draw method. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* i965: Push down the gl_vertex_array inputs into i965.Mathias Fröhlich2018-03-314-6/+23
| | | | | | | | | | Let the i965 backend have its own gl_vertex_array array and basically reimplement the way _vbo_draw works. Note that brw_draw_indirect_prims calls brw_draw_prims internally and gets its update to Array._DrawArray by this way. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* gallium: Push down the gl_vertex_array inputs into gallium.Mathias Fröhlich2018-03-315-14/+52
| | | | | | | | Let the gallium backend have its own gl_vertex_array array and basically reimplement the way _vbo_draw works. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* spirv: Fix building with SConsNeil Roberts2018-03-302-0/+4
| | | | | | | | | | | | | The SCons build broke with commit ba975140d3c9 because a SPIR-V function is called from Mesa main. This adds a convenience library for SPIR-V and adds it to everything that was including nir. It also adds both nir and spirv to drivers/x11/SConscript. Also add nir/spirv modules to osmesa and libgl-gdi targets. (Brian Paul) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105817 Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* mesa: fix MSVC bitshift overflow warningsBrian Paul2018-03-301-1/+1
| | | | | | | | | | | | | | In the BITFIELD_MASK() macro, if b==32 the expression evaluates to ~0u, but the compiler still sees the expression (1 << 32) in the unused part and issues a warning about integer bitshift overflow. Fix that by using (b) % 32 to ensure the max shift is 31 bits. This issue has been present for a while, but shows up much more often because of the recent VBO changes. Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: add missing GLSL_TYPE_[U]INT8 cases in st_glsl_type_dword_size()Brian Paul2018-03-301-0/+3
| | | | | | Silences a compiler warning about unhandled enum switch cases. Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: MaxVertexAttribStride is not always setJakob Bornecrantz2018-03-301-1/+6
| | | | | | | This assert is hit on hardware which does not expose GL 4.4 or GLES 3.1. Reviewed-by: Mathias Fröhlich <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>