summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add viewport_array() helperSamuel Pitoiset2017-06-231-7/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glViewportIndexed*()Samuel Pitoiset2017-06-233-2/+24
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename ViewportIndexedf() to viewport_indexed_err()Samuel Pitoiset2017-06-231-6/+7
| | | | | | | While are at it, add a 'context' parameter for consistency. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glClipControl()Samuel Pitoiset2017-06-233-1/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add clip_control() helperSamuel Pitoiset2017-06-231-27/+34
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Convert upload_default_color to genxml.Rafael Antognolli2017-06-221-77/+85
| | | | | | | | | | This function was moved to genX_state_upload.c but was still not using genxml. By converting it to genxml, we make some things simpler, like setting haswell's border color state, but others are more complex, since the structs used by each gen are different. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Remove unused code and delete file.Rafael Antognolli2017-06-222-626/+0
| | | | | | | | The sampler state code was all moved to genxml, so we can get rid of these functions and delete the file. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Convert vs, gs, tcs, tes and cs samplers to genxml.Rafael Antognolli2017-06-223-126/+123
| | | | | | | | Since they just use the code that is already available in genX_state_upload.c, convert them in one batch. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Convert fs sampler state to use genxml.Rafael Antognolli2017-06-223-23/+540
| | | | | | | | Also convert some auxiliary functions used by it, and copy upload_default_color to genX_state_upload.c. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* genxml: fix gen5 sampler border color state.Rafael Antognolli2017-06-221-20/+20
| | | | | | | | Based on the current code, gen5 and gen6 have the same sampler border color state struct. So fix the gen5 one to match gen6. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* aubinator: Dump sampler state pointers on gen6 too.Rafael Antognolli2017-06-221-0/+11
| | | | | | | | We already have a function to dump sampler states, so do that for gen6 too. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Fix -Wswitch in anv_layout_to_aux_usage()Chad Versace2017-06-221-0/+3
| | | | | | | | anv_layout_to_aux_usage() lacked a case for VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR. Add an unreachable case, because we don't support the extension. Acked-by: Jason Ekstrand <[email protected]>
* i965: Fix -Wunused-variable in gen8_write_pma_stall_bits()Chad Versace2017-06-221-2/+0
| | | | Trivial fix. 'ctx' was unused.
* i965/CFL: Add PCI Ids for Coffee Lake.Anusha Srivatsa2017-06-222-0/+27
| | | | | | | | | | | | | | Coffee Lake has a gen9 graphics following KBL. From 3D perspective, CFL is a clone of KBL/SKL features. v2: Change commit message, correct alignment <Anuj Phogat> v3: Update IDs. v4: Initialize l3_banks, correct nomenclature <Anuj> Cc: Rodrigo Vivi <[email protected]> Signed-off-by: Anusha Srivatsa <[email protected]> Acked-by: Benjamin Widawsky <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* intel: Enable vulkan build for gen10Anuj Phogat2017-06-221-0/+4
| | | | | | | | This patch just enables building Vulkan libs for gen10. We still don't have gen 10 support enabled on Vulkan. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cnl: Generate and use gen10 functionsAnuj Phogat2017-06-224-1/+13
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cnl: Don't set FloatBlendOptimizationEnable{Mask}Anuj Phogat2017-06-221-3/+6
| | | | | | | This field is remove from CACHE_MODE_1 register in gen10. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cnl: Use GENX(xx) in place of GEN9_xxAnuj Phogat2017-06-221-8/+8
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cnl: Add #defines for MOCS and genX(x)Anuj Phogat2017-06-221-0/+14
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/genxml: Add Gen10 CACHE_MODE_1 definitionsAnuj Phogat2017-06-221-0/+18
| | | | | | | | | | Few of the fields in this register are changed as compared to gen9.xml. V2: Remove some fields which are not valid anymore. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* intel/genxml: Rename StartInstanceLocation to StartingInstanceLocationAnuj Phogat2017-06-221-1/+1
| | | | | | | | This is required because we already have a macro defined with the name StartInstanceLocation. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* intel/genxml: Rename IndirectStatePointer to BorderColorPointerAnuj Phogat2017-06-221-1/+1
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* intel/genxml: Combine DataDWord{0, 1} fields in to ImmediateData fieldAnuj Phogat2017-06-221-2/+1
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* intel/genxml: Add INSTDONE registers in gen10Anuj Phogat2017-06-221-0/+115
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* intel/genxml: Add better support for MI_MATH in gen10Anuj Phogat2017-06-221-4/+65
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* i965/dri: Add intel_screen param to intel_create_winsys_renderbufferChad Versace2017-06-223-11/+17
| | | | | | | The param is currently unused. It will later be used it to support R8G8B8X8 EGLConfigs on Skylake. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move brw_context format arrays to intel_screenChad Versace2017-06-224-40/+64
| | | | | | | | | | | | | | | | | | | This allows us to query the driver's supported formats in i965's DRI code, where often there is available a DRIscreen but no GL context. To reduce diff noise, this patch does not completely remove brw_context's format arrays. It just redeclares them as pointers which point to the arrays in intel_screen. Specifically, move these two arrays from brw_context to intel_screen: mesa_to_isl_render_format[] mesa_format_supports_render[] And add a new array to intel_screen, mesa_format_supportex_texture[] which brw_init_surface_formats() copies to ctx->TextureFormatSupported. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Rename some vague format members of brw_contextChad Versace2017-06-229-28/+28
| | | | | | | | | | | | | | | | | | | | | | I'm swimming in a vortex of formats. Mesa formats, isl formats, DRI formats, GL formats, etc. It's easy to misinterpret the following brw_context members unless you've recently read their definition. In upcoming patches, I change them from embedded arrays to simple pointers; after that, even their definition doesn't help, because the MESA_FORMAT_COUNT hint will no longer be present. Rename them to prevent further confusion. While we're renaming, choose shorter names too. -format_supported_as_render_target +mesa_format_supports_render -render_target_format +mesa_to_isl_render_format Reviewed-by: Kenneth Graunke <[email protected]>
* egl: Rename 'count' in ${platform}_add_configs_for_visuals (v2)Chad Versace2017-06-224-25/+28
| | | | | | | | | | Rename 'count' to 'config_count'. I didn't understand what the variable did until I untangled the for-loops. Now the next person won't have that problem. v2: Rebase. Fix typo. Apply to all platforms (for emil). Reviewed-by: Eric Engestrom <[email protected]> (v1)
* egl/x11: Declare EGLConfig attrib array inside loopChad Versace2017-06-221-12/+12
| | | | | | | | | No behavioral change. Just a readability cleanup. Instead of modifying this small array on each loop iteration, we now initialize it in-place with the values it needs. Reviewed-by: Eric Engestrom <[email protected]>
* egl/drm: Declare EGLConfig attrib array inside loopChad Versace2017-06-221-5/+5
| | | | | | | | | No behavioral change. Just a readability cleanup. Instead of modifying this small array on each loop iteration, we now initialize it in-place with the values it needs. Reviewed-by: Eric Engestrom <[email protected]>
* egl/android: Declare EGLConfig attrib array inside loop (v2)Chad Versace2017-06-221-9/+7
| | | | | | | | | | | No behavioral change. Just a readability cleanup. Instead of modifying this small array on each loop iteration, we now initialize it in-place with the values it needs. v2: Rebase. Reviewed-by: Eric Engestrom <[email protected]> (v1)
* egl/dri2: Declare loop vars inside the loopChad Versace2017-06-221-24/+19
| | | | | | | | | | | That is, consistently do this: for (int i = 0; ...) No behavioral change. This patch touches only egl_dri2.c. Reviewed-by: Eric Engestrom <[email protected]>
* egl/wayland: Declare loop vars inside the loopChad Versace2017-06-221-27/+17
| | | | | | | | | | That is, consistently do this: for (int i = 0; ...) No behavioral change. Reviewed-by: Eric Engestrom <[email protected]>
* egl/surfaceless: Move loop vars inside the loopChad Versace2017-06-221-7/+5
| | | | | | | | | | That is, consistently do this: for (int i = 0; ...) No behavioral change. Reviewed-by: Eric Engestrom <[email protected]>
* egl/x11: Declare loop vars inside the loopChad Versace2017-06-221-8/+7
| | | | | | | | | | That is, consistently do this: for (int i = 0; ...) No behavioral change. Reviewed-by: Eric Engestrom <[email protected]>
* egl/drm: Move loop vars inside the loopChad Versace2017-06-221-22/+15
| | | | | | | | | | That is, consistently do this: for (int i = 0; ...) No behavioral change. Reviewed-by: Eric Engestrom <[email protected]>
* egl/android: Declare loop vars inside their loops (v2)Chad Versace2017-06-221-19/+15
| | | | | | | | | | | | That is, consistently do this: for (int i = 0; ...) No behavioral change. v2: Rebase. Reviewed-by: Eric Engestrom <[email protected]> (v1)
* svga: minor whitespace fixes in svga_pipe_vertex.cBrian Paul2017-06-221-6/+10
|
* svga: check return value from svga_set_shader( SVGA3D_SHADERTYPE_GS, NULL)Brian Paul2017-06-221-0/+2
| | | | | | | | | | | If the call fails we need to flush the command buffer and retry. In this case, we were failing to unbind the GS which led to subsequent errors. This fixes a bug replaying a Cinebench R15 apitrace in a Linux guest. VMware bug 1894451 cc: [email protected] Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix pre-mature flushing of the command bufferCharmaine Lee2017-06-225-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | When surface_invalidate is called to invalidate a newly created surface in svga_validate_surface_view(), it is possible that the command buffer is already full, and in this case, currently, the associated wddm winsys function will flush the command buffer and resend the invalidate surface command. However, this can pre-maturely flush the command buffer if there is still pending image updates to be patched. To fix the problem, this patch will add a return status to the surface_invalidate interface and if it returns FALSE, the caller will call svga_context_flush() to do the proper context flush. Note, we don't call svga_context_flush() if surface_invalidate() fails when flushing the screen surface cache though, because it is already in the process of context flush, all the image updates are already patched, calling svga_context_flush() can trigger a deadlock. So in this case, we call the winsys context flush interface directly to flush the command buffer. Fixes driver errors and graphics corruption running Tropics. VMware bug 1891975. Also tested with MTT glretrace, piglit and various OpenGL apps such as Heaven, CinebenchR15, NobelClinicianViewer, Lightsmark, GoogleEarth. cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
* swr: invalidate attachment on transition changeGeorge Kyriazis2017-06-223-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following RT attachment order: 1. Attach surfaces attachments 0 & 1, and render with them 2. Detach 0 & 1 3. Re-attach 0 & 1 to different surfaces 4. Render with the new attachment The definition of a tile being resolved is that local changes have been flushed out to the surface, hence there is no need to reload the tile before it's written to. For an invalid tile, the tile has to be reloaded from the surface before rendering. Stage (2) was marking hot tiles for attachements 0 & 1 as RESOLVED, which means that the hot tiles can be written out to memory with no need to read them back in (they are "clean"). They need to be marked as resolved here, because a surface may be destroyed after a detach, and we don't want to have un-resolved tiles that may force a readback from a NULL (destroyed) surface. (Part of a destroy is detach all attachments first) Stage (3), during the no att -> att transition, we need to realize that the "new" surface tiles need to be fetched fresh from the new surface, instead of using the resolved tiles, that belong to a stale attachment. This is done by marking the hot tiles as invalid in stage (3), when we realize that a new attachment is being made, so that they are re-fetched during rendering in stage (4). Also note that hot tiles are indexed by attachment. - Fixes VTK dual depth-peeling tests. - No piglit changes Reviewed-by: Tim Rowley <[email protected]>
* Revert "getteximage: Return correct error value when texure object is not found"Juan A. Suarez Romero2017-06-221-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | From OpenGL 4.5 spec PDF, section '8.11. Texture Queries', page 236: "An INVALID_VALUE error is generated if texture is not the name of an existing texture object." Same wording applies to the compressed version. But turns out this is a spec bug, and Khronos is fixing it for the next revisions. The proposal is to return INVALID_OPERATION in these cases. This reverts commit 633c959faeae5099fd095f27da7b954e4a36254b. v2: - Use _mesa_lookup_texture_err (Samuel Pitoiset) v3: - _mesa_lookup_texture_err() already handles texture > 0 (Samuel Pitoiset) - Just revert 633c959fae (Juan A. Suarez) Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Juan A. Suarez Romero <[email protected]>
* egl: properly count configsEric Engestrom2017-06-225-6/+12
| | | | | | | | | | dri2_conf represents another config (which shouldn't be counted) if it doesn't have the requested ID. Reported-by: Liu Zhiquan <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Cc: <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/android: Change order of EGLConfig generation (v2)Chad Versace2017-06-221-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Many Android apps (such as Google's official NDK GLES2 example app), and even portions the core framework code (such as SystemServiceManager in Nougat), incorrectly choose their EGLConfig. They neglect to match the EGLConfig's EGL_NATIVE_VISUAL_ID against the window's native format, and instead choose the first EGLConfig whose channel sizes match those of the native window format while ignoring the channel *ordering*. We can detect such buggy clients in logcat when they call eglCreateSurface, by detecting the mismatch between the EGLConfig's format and the window's format. As a workaround, this patch changes the order of EGLConfig generation such that all EGLConfigs for HAL pixel format i precede those for HAL pixel format i+1. In my (chadversary) testing on Android Nougat, this was good enough to pacify the buggy clients. v2: Rebase to make patch cherry-pickable to stable. Cc: [email protected] Cc: Tomasz Figa <[email protected]> Cc: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i915: Fix gl_Fragcoord interpolationVille Syrjälä2017-06-225-16/+21
| | | | | | | | | | | | | | | | gl_FragCoord contains the window coordinates so it seems to me that we should not use perspective correct interpolation for it. At least now I get similar output as i965/swrast/llvmpipe produce. This fixes dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_w. dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_xyz was already passing, though I'm not quite sure how it managed to do that. v2: Add definitons for the S3 "wrap shortest" bits as well (Ian) Cc: [email protected] Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]>
* egl: simplify dri_config conditionalsEric Engestrom2017-06-222-17/+11
| | | | | | | | | | | | | In the same spirit as 858f2f2ae6 (egl/dri2: ease srgb __DRIconfig conditionals), let's merge dri_single_config and dri_double_config into a single dri_config[2]. This moves the `if (double) dri_double_config else dri_single_config` logic to `dri_config[double]`, reducing code duplication and making it easier to read. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radeonsi/gfx9: enable DCC fast clearMarek Olšák2017-06-221-4/+0
| | | | | | It seems to work now. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: don't ever flush the TC metadata cacheMarek Olšák2017-06-221-10/+3
| | | | | | | | The closed Vulkan driver doesn't do it either. Also remove some old comments that aren't useful. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: use TC L2 for fast color clear with CP DMAMarek Olšák2017-06-221-2/+5
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>