summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: print the invalid enum when CreateShader failsTimothy Arceri2016-01-131-1/+2
| | | | Reviewed-by: Tapani Pälli <[email protected]>
* i965: Mark TCS URB writes as having side effects.Kenneth Graunke2016-01-121-0/+1
| | | | | | | | | | | | | | | This adds barrier dependencies around TCS_OPCODE_URB_WRITE, preventing reads and writes from being incorrectly scheduled. Fixes rendering in GFXBench 4.0's tessellation demo. For some reason, we haven't ever listed URB writes as having side-effects. This hasn't been a problem because in most stages, we never read from the URB, and only write to each location once. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93526 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* mesa: use gl_shader_variable in program resource listTapani Pälli2016-01-122-19/+80
| | | | | | | | | | | | | | Patch changes linker to allocate gl_shader_variable instead of using ir_variable. This makes it possible to get rid of ir_variables and ir in memory after linking. v2: check that we do not create duplicate entries with packed varyings v3: document 'patch' bit (Ilia Mirkin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* main: get rid of needless conditionalErik Faye-Lund2016-01-121-13/+12
| | | | | | | | We already check if the driver changed the completeness, we don't need to duplicate that check. Let's just early out there instead. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* meta: Unconditionally set GL_SKIP_DECODE_EXTIan Romanick2016-01-112-11/+4
| | | | | | | | | | | | The path that depends on this will be avoided (by fallback_required) if the extension is not supported. _mesa_set_sampler_srgb_decode does not generate GL errors (by design), so there are no problems there. I kept this change separate and last because it is one of the few in the series that is not a candidate for the stable branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta: Only bind the sampler in one placeIan Romanick2016-01-112-8/+4
| | | | | | | | | | | All of the calls after the first _mesa_bind_sampler call are DSA style calls that don't depend on the current binding. I kept this change separate and last because it is one of the few in the series that is not a candidate for the stable branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/decompress: Don't pollute the sampler object namespaceIan Romanick2016-01-111-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Jason Ekstrand <[email protected]>
* meta/decompress: Save and restore the sampler using gl_sampler_object ↵Ian Romanick2016-01-111-4/+5
| | | | | | | | | | | | instead of GL API object handle Some meta operations can be called recursively. Future changes (the "Don't pollute the ... namespace" changes) will cause objects with invalid names to be used. If a nested meta operation tries to restore an object named 0xDEADBEEF, it will fail. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/decompress: Track sampler using gl_sampler_object instead of GL API ↵Ian Romanick2016-01-112-12/+12
| | | | | | | object handle Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/decompress: Use internal functions for sampler object accessIan Romanick2016-01-111-4/+9
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/generate_mipmap: Don't pollute the sampler object namespaceIan Romanick2016-01-111-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Jason Ekstrand <[email protected]>
* meta/generate_mipmap: Save and restore the sampler using gl_sampler_object ↵Ian Romanick2016-01-111-4/+5
| | | | | | | | | | | | instead of GL API object handle Some meta operations can be called recursively. Future changes (the "Don't pollute the ... namespace" changes) will cause objects with invalid names to be used. If a nested meta operation tries to restore an object named 0xDEADBEEF, it will fail. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/generate_mipmap: Track sampler using gl_sampler_object instead of GL ↵Ian Romanick2016-01-112-14/+17
| | | | | | | API object handle Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/generate_mipmap: Use internal functions for sampler object accessIan Romanick2016-01-111-9/+11
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/blit: Don't pollute the sampler object namespace in ↵Ian Romanick2016-01-111-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | _mesa_meta_setup_sampler tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Jason Ekstrand <[email protected]>
* meta/blit: Save and restore the sampler using gl_sampler_object instead of ↵Ian Romanick2016-01-112-5/+15
| | | | | | | | | | | | | | | | GL API object handle Some meta operations can be called recursively. Future changes (the "Don't pollute the ... namespace" changes) will cause objects with invalid names to be used. If a nested meta operation tries to restore an object named 0xDEADBEEF, it will fail. v2: Add a comment explaining why samp_obj_save is set to NULL in _mesa_meta_fb_tex_blit_begin. This came out of review feedback from Jason. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/blit: Use internal functions for sampler object accessIan Romanick2016-01-113-19/+25
| | | | | | | | This requires tracking the sampler object using the gl_sampler_object* instead of the object name. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meta/blit: Group the SamplerParameteri calls with the other sampler operationsIan Romanick2016-01-111-4/+4
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Refator _mesa_BindSampler to make _mesa_bind_samplerIan Romanick2016-01-112-6/+16
| | | | | | | | | Pulls the parts of _mesa_BindSampler that aren't just parameter validation out into a function that can be called from other parts of Mesa (e.g., meta). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add _mesa_set_sampler_srgb_decode methodIan Romanick2016-01-112-0/+14
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add _mesa_set_sampler_filters methodIan Romanick2016-01-112-0/+26
| | | | | | | v2: Add filter enum assertions. Suggested by Jason. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add _mesa_set_sampler_wrap methodIan Romanick2016-01-112-0/+20
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Mark Identity as constIan Romanick2016-01-111-1/+1
| | | | | | | | | | | | | | | I was going to send this as review for dce1e1a8, but I missed that window. This saves 64 bytes of unshared data and prelaces it with 96 bytes shared text. My guess is that some of the calls to memcpy get optimized to something else. text data bss dec hex filename 7847613 220208 27432 8095253 7b8615 i965_dri.so before 7847709 220144 27432 8095285 7b8635 i965_dri.so after Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: Brian Paul <[email protected]>
* i965: Upload 3DSTATE_BINDING_TABLE_POINTERS_HS when !TCS on Gen9+.Kenneth Graunke2016-01-111-3/+4
| | | | | | | | | | | | | | | | | Gen9+ requires us to emit 3DSTATE_BINDING_TABLE_POINTERS_HS for the hull shader push constants to take effect. The passthrough TCS uses push constants for the default tessellation levels. So, when those change, we need to re-upload the binding table as well. Fixes five Piglit tests on Skylake: - spec/arb_tessellation_shader/vs-tes-vertex - spec/arb_tessellation_shader/vs-tes-tessinner-tessouter-inputs-quads - spec/arb_tessellation_shader/vs-tes-tessinner-tessouter-inputs-tris - spec/arb_tessellation_shader/tes-read-texture - spec/arb_tessellation_shader/tess_with_geometry Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* Add missing platform information for KBLMark Janes2016-01-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | In testing KBL, I found: - urb size was not set for slices gt1.5, gt2, and gt3. The value I used for these slices (384) was taken from an earlier patch authored by Ben Widawsky. - slice count was missing. This field was added by a403ad4f5a034e52a3cd845e91c4aa3e6927b731 With this commit, KBL passes piglit at parity with SKL. Note: As requested by Kristian, Sarah modified this patch to drop setting urb size for gt1.5, gt2, and gt3, since the correct default is set in the GEN9 macro by commit c1e38ad37042b0ec261eb0ba5631b7ff0ee7a9da "i965/skl: Use larger URB size where available." Signed-off-by: Mark Janes <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Reviewed-by: Kristian Høgsberg Kristensen <[email protected]> Cc: "11.1" <[email protected]>
* mesa/uniform_query: add IROUNDD and use for doubles->ints (v2)Dave Airlie2016-01-112-1/+8
| | | | | | | | | | | | For the case where we convert a double to an int, we should round the same as we do for floats. This fixes GL41-CTS.gpu_shader_fp64.state_query v2: add IROUNDD (Ilia) Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Update todo regarding StencilOp and StencilOpSeparate.Rhys Kidd2016-01-111-12/+6
| | | | | | | | | | | | | | | | | OpenGL 2.0 function StencilOp() is in part internally implemented via StencilOpSeparate(). This change happened some time ago, however the accompanying doxygen todo comment was not accordingly updated. Replace the outdated portion of this doxygen todo comment, leaving the remainder unchanged. Also better respect the 80 character suggested line length in this file. v2: Fully remove comment, following code review by [email protected] Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: merge bind_atomic_buffers_{base|range}Nicolai Hähnle2016-01-081-106/+49
| | | | | | Reduced code duplication should make the code more maintainable. Reviewed-by: Ian Romanick <[email protected]>
* mesa: merge bind_shader_storage_buffers_{base|range}Nicolai Hähnle2016-01-081-111/+51
| | | | | | Reduced code duplication should make the code more maintainable. Reviewed-by: Ian Romanick <[email protected]>
* mesa: merge bind_uniform_buffers_{base|range}Nicolai Hähnle2016-01-081-108/+50
| | | | | | Reduced code duplication should make the code more maintainable. Reviewed-by: Ian Romanick <[email protected]>
* mesa: merge bind_xfb_buffers_{base|range}Nicolai Hähnle2016-01-081-113/+59
| | | | | | Reduced code duplication should make the code more maintainable. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Move _mesa_shader_stage_to_string/abbrev to shader_enums.cKristian Høgsberg Kristensen2016-01-084-4/+0
| | | | | | | These are used by code that doesn't necessarily link to libglsl.la. Move them to shader_enums.[ch] where we keep similar helpers. Reviewed-by: Matt Turner <[email protected]>
* i965: Move GLSL lowering passes out of libi965_compiler.laKristian Høgsberg Kristensen2016-01-081-5/+5
| | | | | | | | | The scope of libi965_compiler.la is to be able to take nir shaders and generate i965 EU code. As such, we don't want the GLSL IR lowering passes in the library. With this change, libi965_compiler.la no longer needs to link to libglsl.la. Reviewed-by: Matt Turner <[email protected]>
* mesa: Use separate indices for UBO & SSBO during bindingJordan Justen2016-01-081-10/+20
| | | | | | | | | | | Previously we were treating the binding index for Uniform Buffer Objects and Shader Storage Buffer Objects as being part of the combined BufferInterfaceBlocks array. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93322 Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa: Map program UBOs and SSBOs to Interface BlocksJordan Justen2016-01-081-0/+7
| | | | | | | | | | v2: * Fill UboInterfaceBlockIndex and SsboInterfaceBlockIndex in split_ubos_and_ssbos (Iago) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa/main: Avoid `void function returning a value` warning.Jose Fonseca2016-01-081-2/+4
| | | | | | Trivial. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add support for POSITION and FACE system valuesMarek Olšák2016-01-084-16/+44
| | | | | Reviewed-by: Edward O'Callaghan <[email protected] Reviewed-by: Brian Paul <[email protected]>
* program: add a helper for rewriting FP position input to sysvalMarek Olšák2016-01-082-0/+29
| | | | | Reviewed-by: Edward O'Callaghan <[email protected] Reviewed-by: Brian Paul <[email protected]>
* glsl: optionally declare gl_FragCoord & gl_FrontFacing as system valuesMarek Olšák2016-01-082-0/+5
| | | | | Reviewed-by: Edward O'Callaghan <[email protected] Reviewed-by: Brian Paul <[email protected]>
* tgsi/ureg: remove index parameter from ureg_DECL_system_valueMarek Olšák2016-01-082-6/+10
| | | | | | | | It can be trivially derived from the number of already declared system values. This allows ureg users not to worry about which index to choose. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* st/mesa: remove dead code from mesa_to_tgsiMarek Olšák2016-01-081-51/+0
| | | | | | | These aren't part of ARB_fragment_program. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* mesa: check that internalformat of CopyTexImage*D is not 1, 2, 3, 4Nicolai Hähnle2016-01-081-0/+16
| | | | | | | | | The piglit copyteximage check has recently been augmented to test this, but apparently it hasn't been fixed in Mesa so far. This language also already appears in the OpenGL 2.1 spec (Ian). Reviewed-by: Ian Romanick <[email protected]>
* i965/compiler: Enable more lowering in NIRJason Ekstrand2016-01-071-0/+7
| | | | | | | We don't need these for GLSL or ARB, but we need them for SPIR-V Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* st/mesa: expose ARB_indirect_parameters when the backend driver allowsIlia Mirkin2016-01-072-0/+2
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add support for ARB_indirect_parameters draw functionsIlia Mirkin2016-01-073-0/+234
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add parameter buffer, used for ARB_indirect_parametersIlia Mirkin2016-01-074-0/+25
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glapi: add ARB_indirect_parameters definitionsIlia Mirkin2016-01-074-0/+27
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: add support for new mesa indirect draw interfaceIlia Mirkin2016-01-073-9/+84
| | | | | | | | | | This shifts all indirect draws to go through the new function. If the driver doesn't have support for multi draws, we break those up and perform N draws. Otherwise, we pass everything through for just a single draw call. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* vbo: create a new draw function interface for indirect drawsIlia Mirkin2016-01-074-75/+89
| | | | | | | | | | | | | | All indirect draws are passed to the new draw function. By default there's a fallback implementation which pipes it right back to draw_prims, but eventually both the fallback and draw_prim's support for indirect drawing should be removed. This should allow a backend to properly support ARB_multi_draw_indirect and ARB_indirect_parameters. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: use _mesa_delete_buffer_objectNicolai Hähnle2016-01-071-1/+1
| | | | | | | | | This is more future-proof, plugs the memory leak of Label and properly destroys the buffer mutex. Reviewed-by: Marek Olšák <[email protected]> Cc: "11.0 11.1" <[email protected]> Reviewed-by: Ian Romanick <[email protected]>