summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* gallium: remove PIPE_CAP_MAX_COMBINED_SAMPLERSMarek Olšák2014-02-043-6/+0
| | | | | | | This can be derived from the shader caps. All GPUs from ATI/AMD, NVIDIA, and INTEL have separate texture slots for each shader stage.
* nv50, nvc0: update reported glsl version to 330Ilia Mirkin2014-01-272-2/+2
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: add more RGB10A2 formatsChristoph Bumiller2014-01-271-0/+7
|
* nv50: enable seamless cube maps on all hwIlia Mirkin2014-01-271-1/+1
| | | | | | | | | | Some of the hardware support is missing. The NVIDIA-provided driver, which claims seamless cube map support fails the relevant tests as well. As this is the last extension before we can have OpenGL 3.2, doing this allows us to expose geometry shaders without doing the additional work involved in supporting ARB_geometry_shader4. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: report glsl 1.50 now that gp tests passIlia Mirkin2014-01-271-1/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: add support for texelFetch'ing MS textures, ARB_texture_multisampleIlia Mirkin2014-01-277-7/+164
| | | | | | | | | | | | | | Creates two areas in the AUX constbuf: - Sample offsets for MS textures - Per-texture MS settings When executing a texelFetch with a MS sampler, looks up that texture's settings and adjusts the parameters given to the texfetch instruction. With this change, all the ARB_texture_multisample piglits pass, so turn on PIPE_CAP_TEXTURE_MULTISAMPLE. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: copy nvc0's get_sample_position implementationIlia Mirkin2014-01-271-0/+46
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: add comments about CB_AUX contentsIlia Mirkin2014-01-273-5/+15
| | | | | | | Updates a few inconsistencies as well, like the size of the buffer, location of the runout, etc. Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: don't forget to also clear additional layersIlia Mirkin2014-01-271-5/+27
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: don't forget to also clear additional layersIlia Mirkin2014-01-271-5/+27
| | | | | | Fixes most of the tests/spec/gl-3.2/layered-rendering/* piglits. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: allocate an extra code bo to avoid dmesg spamIlia Mirkin2014-01-271-1/+5
| | | | | | | | | Each code BO is a heap that allocates at the end first, and so GPs are allocated at the very end of the allocated space. When executing, we see PAGE_NOT_PRESENT errors for the next page. Just over-allocate to make sure that there's something there. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: GP_REG_ALLOC_RESULT must be positiveIlia Mirkin2014-01-271-0/+2
| | | | | | Set max_out to 1 when there are no outputs. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: VP_RESULT_MAP_SIZE has to be positiveIlia Mirkin2014-01-271-0/+4
| | | | | | | | Make sure that we never try to use a 0-sized map. This can happen when using a gp, so add a dummy mapping when computing vp_gp_mapping in that case. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: enable primitive id generation when it is an FP input without GPIlia Mirkin2014-01-272-9/+8
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: handle gl_Layer writes in GPIlia Mirkin2014-01-274-1/+19
| | | | | | | | Marks gl_Layer as only having one component, and makes sure to keep track of where it is and emit it in the output map, since it is not an input to the FP. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: properly set the PRIMITIVE_ID enable flag when it is a gp input.Ilia Mirkin2014-01-271-0/+3
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: add support for gl_PrimitiveIDInIlia Mirkin2014-01-273-5/+11
| | | | | | | | | | | | | Note that the primitive id is stored in a[0x18], while usually the geometry instructions are of the form a[$a1 + 0x4] which gets mapped to p[] space. We need to avoid the change from a[] to p[] here, so it's keyed on whether the access is indirect or not. Note that there's also a use-case for accessing e.g. a[$r1], however that's not supported for now. (Could be added by checking the register file of the indirect parameter.) Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: fix support for shader input + immediate in gpIlia Mirkin2014-01-272-1/+7
| | | | | | This only works for up to $a3, hopefully we won't go that high. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: disallow shader input + cbuf in same instruction in gpIlia Mirkin2014-01-271-1/+6
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: disallow predicates on emit/restart opsIlia Mirkin2014-01-271-1/+2
|
* nv50: allow vert_count to be >255Ilia Mirkin2014-01-271-1/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: add support for geometry shadersBryan Cain2014-01-274-6/+39
| | | | | | | | | | Layer output probably doesn't work yet, but other than that everything seems to be working. Signed-off-by: Bryan Cain <[email protected]> [calim: fix up minor bugs, code formatting] Signed-off-by: Christoph Bumiller <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: delay calculation of indirect addressesBryan Cain2014-01-273-13/+136
| | | | | | | | | | | | | | Instead of emitting an SHL 4 io an address register on the TGSI ARL and UARL instructions, emit the shift when the loaded address is actually used. This is necessary because input vertex and attribute indices in geometry shaders on nv50 need to be shifted left by 2 instead of 4. Signed-off-by: Bryan Cain <[email protected]> [calim: various updates to the indirect address logic] Signed-off-by: Christoph Bumiller <[email protected]> [imirkin: remove OP_MAD change that calim made, add OP_RESTART handling same as OP_EMIT for code flow analysis] Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: fix PFETCH and add RDSV to get VSTRIDE for GPsChristoph Bumiller2014-01-273-5/+59
|
* nv50/ir: txg not available on nvaa/nvacIlia Mirkin2014-01-271-1/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50, nvc0: only clear out the buffers that we were asked to clearIlia Mirkin2014-01-272-14/+24
| | | | | | | Fixes fbo-drawbuffers-none glClearBuffer piglit test. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* nv50, nvc0: clear out RT on a null cbufIlia Mirkin2014-01-274-8/+52
| | | | | | | | | | | | This is needed since commit 9baa45f78b (st/mesa: bind NULL colorbuffers as specified by glDrawBuffers). This implementation is highly based on a larger commit by Christoph Bumiller <[email protected]> in his gallium-nine branch. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* nv50: don't leak heap on tls alloc failureIlia Mirkin2014-01-271-1/+3
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nouveau/codegen: set dType to S32 for OP_NEG U32Ilia Mirkin2014-01-273-7/+27
| | | | | | | | | | | | | | | | | | | | | | It doesn't make sense to do an OP_NEG from U32 to U32. This was manifested on nv50 in glsl-fs-atan-3 which was generating a UMAD TEMP[0].x, TEMP[0].xxxx, -TEMP[5].xxxx, TEMP[0].xxxx instruction. (For some reason, nvc0 causes a different shader to be generated.) This led to a cvt neg u32 $r1 u32 $r1 Which did not yield the desired result. This changes the final output to cvt neg s32 $r1 u32 $r1 which produces the desired output and the piglit tests passes. My assumption is that this is also what we want on nvc0, but could not test as there was no suitable shader that generated the problem instruction. Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: remove PIPE_CAP_SCALED_RESOLVEMarek Olšák2014-01-232-2/+0
| | | | | | | If any driver doesn't support this, it can use a blit after resolving the samples. Reviewed-by: Brian Paul <[email protected]>
* nv50: drop obsolete check from error pathEmil Velikov2014-01-181-9/+7
| | | | | | | At 'out_err' the nv50_context has been calloc-ated. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access framebuffer.cbufsEmil Velikov2014-01-181-0/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access samplersEmil Velikov2014-01-182-0/+4
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access texturesEmil Velikov2014-01-183-0/+5
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: pass vtxbuf index as unsignedEmil Velikov2014-01-181-1/+1
| | | | | | | | The index passed to the function is already unsigned, and internally we threat it as unsigned. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access vtxbufEmil Velikov2014-01-183-1/+14
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: typecast the result of ffs() to unsignedEmil Velikov2014-01-181-1/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access constbufEmil Velikov2014-01-183-0/+4
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: access only the available amount of constbufEmil Velikov2014-01-181-1/+1
| | | | | | | | | | The textures array is defined as a number of NV50_MAX_PIPE_CONSTBUFS per shader stage. Currently the nv50 driver handles only 3 shader stages, thus we wreck chaos when accessing array-out-of-bounds. Cc: 9.1 9.2 10.0 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: access only the available amount of texturesEmil Velikov2014-01-181-1/+1
| | | | | | | | | | | | The textures array is defined as a number of PIPE_MAX_SAMPLERS per shader stage. Currently nv50 driver handles only 3 shader stages, thus we wreck chaos when accessing array-out-of-bounds. Fixes a segfault in piglit/bin/arb_texture_buffer_object-data-sync -fbo -auto Cc: 9.1 9.2 10.0 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50, nvc0: initialize ctx->sample_mask to ~0Ilia Mirkin2014-01-162-0/+4
| | | | | | | | | | Commit 95bf222603b (cso_context: Fix cso_context::sample_mask initial value.) fixed the cso sample mask to be initialized to ~0. The cso code is also careful not to needlessly call set_sample_mask, so we ended up with the ctx->sample_mask never being set. This broke a number of EXT_framebuffer_multisample piglit tests. Signed-off-by: Ilia Mirkin <[email protected]>
* nouveau: Support DRI Image 7 extensionMaarten Lankhorst2013-12-101-2/+9
| | | | | | Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Christopher James Halse Rogers <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium/winsys/drm: Prepare for passing prime fds in winsys_handleChristopher James Halse Rogers2013-12-101-0/+6
| | | | | | Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* nv50: report 15 max inputs for fragment programsIlia Mirkin2013-12-101-1/+1
| | | | | | | | | | | | First off, nv50_program only has 16 in/out varyings. However reporting 16 makes 'm' become 68 in nv50_fp_linkage_validate with the varying-packing-simple piglit test. (Subverting the assert makes it compile but fail.) With this patch, varying-packing-simple passes. See: https://bugs.freedesktop.org/show_bug.cgi?id=69155 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "9.2 10.0" <[email protected]>
* nouveau: Fix compiler warning regressionMaarten Lankhorst2013-12-101-4/+0
| | | | | | cfg is now unused, remove it. Cc: "10.0" <[email protected]>
* nouveau/video: update a few more h264 picparm field namesIlia Mirkin2013-12-091-16/+17
| | | | | | | | | | | Based on comments by Benjamin Morris <[email protected]> in http://lists.freedesktop.org/archives/nouveau/2013-December/015328.html This adds setting of is_long_term, and updates a few field names we were unclear about. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.0" <[email protected]>
* nouveau/video: update h264 picparm field names based on usageIlia Mirkin2013-12-091-15/+13
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.0" <[email protected]>
* nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)Ilia Mirkin2013-12-092-7/+2
| | | | | | | | | | Create the ref_bo without any storage type flags set for now. The issue probably arises from our use of the additional buffer space at the end of the ref_bo. It should probably be split up in the future. Signed-off-by: Ilia Mirkin <[email protected]> Tested-by: Martin Peres <[email protected]> Cc: "10.0" <[email protected]>
* nvc0: make sure nvd7 gets NVC8_3D_CLASS as wellIlia Mirkin2013-12-091-1/+2
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: TXF already has integer arguments, don't try to convert from f32Ilia Mirkin2013-12-091-7/+9
| | | | | | Fixes the texelFetch piglit tests Signed-off-by: Ilia Mirkin <[email protected]>