summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* radv: don't crash if we have no framebufferDave Airlie2017-08-251-0/+4
| | | | | | | | | | | | Recording secondaries with no framebuffer attachment may make this happen, though this might not be the complete solution. (esp if someone does meta stuff in there, would we have to save things, not sure). Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: gfx9 has buffer sizing rules like pre-VI.Dave Airlie2017-08-251-1/+1
| | | | | | | | | This fixes: dEQP-VK.robustness.buffer_access.* on GFX9. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix predication on gfx9Dave Airlie2017-08-251-1/+3
| | | | | | | | When I added gfx9 I did it wrong, this fixes it. Fixes: 5247b311e9 "radv/gfx9: fix set predication packet." Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* anv,i965: Move CS shared lowering into anvJason Ekstrand2017-08-242-2/+5
| | | | | | | | | | | Right now, OpenGL uses the GLSL lowering for shared variables and anv uses NIR to lower them. For a long time, we've done this weird thing where we do the NIR lowering unconditionally and then add the SLM sizes from the two together. This works because one of them will always be 0 but it's a bit sketchy. Let's just move the NIR-based lowering into anv_pipeline and get rid of the sketch. Reviewed-by: Jordan Justen <[email protected]>
* ac/debug: use util_strchrnul() to fix android build errorMauro Rossi2017-08-241-1/+2
| | | | | | | | | | | | | | | | | | | | | Similar to e09d04cd56 "radeonsi: use util_strchrnul() to fix android build error" Android Bionic does not support strchrnul() string function, gallium auxiliary util/u_string.h provides util_strchrnul() This change avoids the following warning and error: external/mesa/src/amd/common/ac_debug.c:501:15: warning: implicit declaration of function 'strchrnul' is invalid in C99 char *end = strchrnul(out, '\n'); ^ external/mesa/src/amd/common/ac_debug.c:501:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' char *end = strchrnul(out, '\n'); ^ ~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. Fixes: c2c3912410 "ac/debug: annotate IB dumps with the raw values" Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* radeonsi: get the raster config from AMDGPU on SIMarek Olšák2017-08-243-0/+22
| | | | | | Not sure yet if we wanna do this on CIK and VI too. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: clean up setting GRBM_GFX_INDEXMarek Olšák2017-08-241-19/+22
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move PA_SC_RASTER_CONFIG emission into a separate functionMarek Olšák2017-08-241-70/+73
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* include: Sync Khronos headers for OpenGL 4.6Adam Jackson2017-08-241-47/+214
| | | | | | | | Taken from c21e602b9fda1d3bbaecb08194592f67e6a0649b from OpenGL-Registry. (This time without breaking glext.h.) Signed-off-by: Adam Jackson <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* radv: Expose VK_KHX_multiview.Bas Nieuwenhuizen2017-08-242-0/+18
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement multiview draws.Bas Nieuwenhuizen2017-08-242-33/+112
| | | | | | | v2: - Use for_each_bit. - split emitting the draw packets out to separate functions. Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement determining the has_multiview_view_index key.Bas Nieuwenhuizen2017-08-241-4/+16
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Add shader support for multiviews.Bas Nieuwenhuizen2017-08-244-2/+44
| | | | | | | | | It uses an user SGPR to pass the view index to the shaders, except for the fragment shader where we use layer=view (which comes in handy when we want to do the NV ext that allows us to execute pre-FS stages once instead of per view). Reviewed-by: Dave Airlie <[email protected]>
* radv: Add multiview clears.Bas Nieuwenhuizen2017-08-243-19/+47
| | | | | | v2: Use for_each_bit. Reviewed-by: Dave Airlie <[email protected]>
* radv: Store multiview info in renderpass.Bas Nieuwenhuizen2017-08-242-1/+27
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Make shader key a struct.Bas Nieuwenhuizen2017-08-244-22/+24
| | | | | | | Some bits can be passed to almost every shader, and I don't like adding 5 variables. Reviewed-by: Dave Airlie <[email protected]>
* radv: Use 0 for the layer id if the vertex shader does not export it.Bas Nieuwenhuizen2017-08-241-3/+4
| | | | | | | To use when we have e.g. input attachments, but there is no layer export in the previous shader and hence no layered rendering. Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Implement input attachments with layered rendering.Bas Nieuwenhuizen2017-08-241-2/+11
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Determine if input attachments are used in the info pass.Bas Nieuwenhuizen2017-08-242-1/+11
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Cast sources of integer ops to int.Bas Nieuwenhuizen2017-08-241-0/+16
| | | | | | | | | The int32->float semantic conversion got dropped in a testcase, because the src was already float. On closer inspection I decided to add a few more casts for integer op operands to be safe too. Cc: 17.2 <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* Revert "include: Sync Khronos headers for OpenGL 4.6"Adam Jackson2017-08-241-214/+47
| | | | | | Broke the BUILDING_MESA bit, oops. This reverts commit ef1e87e6cdbd80e74a8bc6d48b0b174a0812fe69.
* include: Sync Khronos headers for OpenGL 4.6Adam Jackson2017-08-241-47/+214
| | | | | | | | Taken from c21e602b9fda1d3bbaecb08194592f67e6a0649b from OpenGL-Registry. Signed-off-by: Adam Jackson <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* i965: add missing `const` in function signatureEric Engestrom2017-08-241-1/+1
| | | | | | | | | | | | | Gets rid of a few warnings of the form: src/mesa/drivers/dri/i965/intel_screen.c:918:49: warning: passing argument 2 of ‘modifier_is_supported’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] !modifier_is_supported(&screen->devinfo, f, 0, modifier)) ^ src/mesa/drivers/dri/i965/intel_screen.c:301:1: note: expected ‘struct intel_image_format *’ but argument is of type ‘const struct intel_image_format *’ Fixes: 1efd73df39b39589d26f "i965: Advertise the CCS modifier" Cc: Ben Widawsky <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* egl/android: add missing includeEric Engestrom2017-08-241-0/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Rob Herring <[email protected]>
* vbo: fix glVertexAttrib(index=0)Brian Paul2017-08-242-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on which extension or GL spec you read the behavior of glVertexAttrib(index=0) either sets the current value for generic attribute 0, or it emits a vertex just like glVertex(). I believe it should do either, depending on context (see below). The piglit gl-2.0-vertex-const-attr test declares two vertex attributes: attribute vec2 vertex; attribute vec4 attr; and the GLSL linker assigns "vertex" to location 0 and "attr" to location 1. The test passes. But if the declarations were reversed such that "attr" was location 0 and "vertex" was location 1, the test would fail to draw properly. The problem is the call to glVertexAttrib(index=0) to set attr's value was interpreted as glVertex() and did not set generic attribute[0]'s value. Interesting, calling glVertex() outside glBegin/End (which is effectively what the piglit test does) does not generate a GL error. I believe the behavior of glVertexAttrib(index=0) should depend on whether it's called inside or outside of glBegin/glEnd(). If inside glBegin/End(), it should act like glVertex(). Else, it should behave like glVertexAttrib(index > 0). This seems to be what NVIDIA does. This patch makes two changes: 1. Check if we're inside glBegin/End for glVertexAttrib() 2. Fix the vertex array binding for recalculate_input_bindings(). As it was, we were using &vbo->currval[VBO_ATTRIB_POS], but that's interpreted as a zero-stride attribute and doesn't make sense for array drawing. No Piglit regressions. Fixes updated gl-2.0-vertex-const-attr test and passes new gl-2.0-vertex-attrib-0 test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101941 Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* gallivm: remove unused variableBrian Paul2017-08-241-2/+0
| | | | Trivial.
* st/mesa: add const qualifiers in st_extensions.cBrian Paul2017-08-241-5/+5
| | | | Trivial.
* st/mesa: whitespace/indentation fixes in st_init_extensions()Brian Paul2017-08-241-5/+6
|
* pipe-loader: use MAYBE_UNUSED to silence warningBrian Paul2017-08-241-1/+2
| | | | Trivial.
* nv50/ir: properly set sType for TXF ops to U32Ilia Mirkin2017-08-241-0/+3
| | | | | | | | | | | | All of the coordinates and LOD args are integers for TXF. This mostly doesn't matter, except for converting into a levelZero=true operation by removing an explicit zero LOD. For the comparison against zero to work properly, the sType of the instruction has to be set correctly. Fixes: KHR-GL45.robust_buffer_access_behavior.texel_fetch Reported-by: Karol Herbst <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* mesa: remove duplicate assignments in bind_xfb_buffers()Samuel Pitoiset2017-08-241-3/+0
| | | | | | | | Useless to do that before checking errors. It's now similar to the other bind_XXX_buffers() helpers. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix debug/error messages in glColorMaski()Samuel Pitoiset2017-08-241-4/+4
| | | | | | | Trivial. While we are at it, adjust indentation. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: stop adding pointers from bindless structs to the cacheTimothy Arceri2017-08-241-4/+8
| | | | | | | This is so we always create reproducible cache entries. Consistency is required for verification of any third party distributed shaders. Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: stop adding pointers from shader_info to the cacheTimothy Arceri2017-08-241-6/+25
| | | | | | | This is so we always create reproducible cache entries. Consistency is required for verification of any third party distributed shaders. Reviewed-by: Samuel Pitoiset <[email protected]>
* compiler: move pointers to the start of shader_infoTimothy Arceri2017-08-241-3/+3
| | | | | | | This will allow us to easily skip them when writting the struct to disk cache. Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: always write a name/label string to the cacheTimothy Arceri2017-08-241-4/+7
| | | | | | | | | In the following patch we will stop writing the pointer to cache. Unfortunately adding empty strings to that cache seems to be the only thing we can do here once we no longer have the pointers. Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: don't write uniform storage offset if there isn't oneTimothy Arceri2017-08-241-3/+10
| | | | | | | This is so we always create reproducible cache entries. Consistency is required for verification of any third party distributed shaders. Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: add has_uniform_storage() helper to shader cacheTimothy Arceri2017-08-241-6/+13
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: stop adding pointers from glsl_struct_field to the cacheTimothy Arceri2017-08-241-7/+38
| | | | | | | This is so we always create reproducible cache entries. Consistency is required for verification of any third party distributed shaders. Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: stop adding pointers from gl_shader_variable to the cacheTimothy Arceri2017-08-241-12/+28
| | | | | | | This is so we always create reproducible cache entries. Consistency is required for verification of any third party distributed shaders. Reviewed-by: Samuel Pitoiset <[email protected]>
* glsl: allow NULL to be passed to encode_type_to_blob()Timothy Arceri2017-08-241-0/+10
| | | | | | This will be used by the following commit. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/gfx9: don't expose linear depth on vega.Dave Airlie2017-08-241-0/+4
| | | | | | | | This just zeros out the linear flags for gfx9 + depth formats. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't degrade tiling mode for small compressed or depth texture.Dave Airlie2017-08-241-6/+10
| | | | | | | | | This is what radeonsi does, so we should do the same, also vega doesn't support linear depth textures anyways. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: only minify image view width/height/depth before gfx9.Dave Airlie2017-08-242-7/+15
| | | | | | | | | | | For gfx9 the addressing for images has changed, so we need to provide the hw with the level0, however we still need to scale for format block differences (so our compressed upload paths still work). Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/image: don't rescale width/height if the format isn't changingDave Airlie2017-08-241-4/+6
| | | | | | | | | If the image view has the same format, we don't need to rescale the w/h. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: cleanup some image view descriptor setup.Dave Airlie2017-08-242-13/+21
| | | | | | | | | | | | Avoid passing the vulkan image creation into the image view descriptor setup. This cleans up the usage of range inside the init, instead using the properly inited values in the image view. This is just a cleanup but some future vega changes will depend on it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: emit sx_mrt_blend registersDave Airlie2017-08-243-3/+134
| | | | | | | | | | | | | GFX9 needs the SX MRT blend registers programmed, port over the code from radeonsi to workout the values from the blend state, and program the registers on rbplus systems. This fixes lots of: dEQP-VK.pipeline.blend.* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: bump space check for indexed draw.Dave Airlie2017-08-241-1/+1
| | | | | | | | | | | For the GFX9 packet we need one more dword. Fixes an assert in: dEQP-VK.draw.shader_draw_parameters.base_vertex.draw_indexed Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: fixup db/stencil disable.Dave Airlie2017-08-241-3/+7
| | | | | | | | This fixes disabled Z/stencil. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: fix level count in color register setup.Dave Airlie2017-08-241-1/+1
| | | | | | | | There was an off by one here. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>