summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300
AgeCommit message (Collapse)AuthorFilesLines
2013-05-25gallium: Add support for multiple viewportsZack Rusin2-8/+12
Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-14draw: try to prevent overflows on index buffersZack Rusin1-1/+1
Pass in the size of the index buffer, when available, and use it to handle out of bounds conditions. The behavior in the case of an overflow needs to be the same as with other overflows in the vertex processing pipeline meaning that a vertex should still be generated but all attributes in it set to zero. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-14draw: don't crash on vertex buffer overflowZack Rusin1-2/+2
We would crash when stride was bigger than the size of the buffer. The correct behavior is to just fetch zero's in this case. Unfortunatly with user_buffer's there's no way to validate the size because currently we're just not getting it. Adjust the draw interface to pass the size along the mapped buffer, which works perfectly for buffer backed vertex_buffers and, in future, it will allow us to plumb user_buffer sizes through the same interface. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-11gallium: add PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE for GLMarek Olšák1-0/+1
v2: fix typo 65535 -> 65536 Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-04gallium: fix type of flags in pipe_context::flush()Chia-I Wu1-1/+1
It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> [olv: document the parameter now that the type is unsigned]
2013-05-03scons: remove radeon buildAndreas Boll1-24/+0
One build system for linux/unix only drivers should be enough. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48694 Acked-by: Jose Fonseca <jfonseca@vmware.com>
2013-04-25winsys/radeon: consolidate tracing into winsys v2Jerome Glisse2-4/+4
This move the tracing timeout and printing into winsys and add an debug environement variable for it (R600_DEBUG=trace_cs). Lot of file touched because of winsys API changes. v2: Do not write lockup file if ib uniq id does not match last one Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-04-18st/mesa: optionally apply texture swizzle to border color v2Christoph Bumiller1-0/+1
This is the only sane solution for nv50 and nvc0 (really, trust me), but since on other hardware the border colour is tightly coupled with texture state they'd have to undo the swizzle, so I've added a cap. The dependency of update_sampler on the texture updates was introduced to avoid doing the apply_depthmode to the swizzle twice. v2: Moved swizzling helper to u_format.c, extended the CAP to provide more accurate information.
2013-04-17gallium: Eliminate TGSI_OPCODE_IFC.José Fonseca1-1/+0
Never used or implemented. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-12r300g: Fix bug in OMOD optimizationTom Stellard1-1/+3
https://bugs.freedesktop.org/show_bug.cgi?id=60503 NOTE: This is a candidate for the stable branches.
2013-04-03gallium: add PIPE_CAP_QUERY_PIPELINE_STATISTICSChristoph Bumiller1-0/+1
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-03-26r300g: fix crash while binding a NULL constant bufferMarek Olšák1-1/+1
2013-03-23gallium,st/mesa: don't use blit-based transfers with software rasterizersMarek Olšák1-0/+1
The blit-based paths for TexImage, GetTexImage, and ReadPixels aren't very fast with software rasterizer. Now Gallium drivers have the ability to turn them off. Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
2013-03-20gallium: add TGSI_SEMANTIC_TEXCOORD,PCOORD v3Christoph Bumiller1-0/+2
This makes it possible to identify gl_TexCoord and gl_PointCoord for drivers where sprite coordinate replacement is restricted. The new PIPE_CAP_TGSI_TEXCOORD decides whether these varyings should be hidden behind the GENERIC semantic or not. With this patch only nvc0 and nv30 will request that they be used. v2: introduce a CAP so other drivers don't have to bother with the new semantic v3: adapt to introduction gl_varying_slot enum
2013-02-26r300g: implement 3D transfersMarek Olšák1-2/+18
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=61351
2013-02-21r300g/compiler: Fix bug in OMOD foldingTom Stellard3-1/+77
The OMOD value was only being folded to one instruction in cases where the MUL instruction was reading a value written by more than one instruction. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21r300g/tests: Add helper functions for creating a full programTom Stellard2-8/+75
Now you can convert assembly strings into a full struct radeon_compiler object and use it to test individual compiler pases. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21r300g/tests: Exit test runner with a valid status codeTom Stellard5-6/+22
This way make check can report whether or not the tests pass. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21r300g/complier: Make r300_vertprog_swizzle_caps visible in other filesTom Stellard2-1/+3
This will be used by the test suite in later commits. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21r300g/compiler: Fix typo in commentTom Stellard1-1/+1
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21r300g/compiler: Add missing license headersTom Stellard13-1/+339
These are all files that I authored, but forgot to add the license headers. NOTE: This is a candidate for the stable branches. Signed-off-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-14r300g: add support for red-alpha render targetsMarek Olšák3-0/+20
2013-02-07r300g: put textures with usage=staging in GTT and make them linearMarek Olšák2-1/+6
2013-02-07r300g: fix blending and alpha-test with RGBX16F and enable MSAA for itMarek Olšák6-14/+45
2013-02-07r300g: use new RGBX formatsMarek Olšák2-3/+22
2013-02-06r300g: try to use color varyings for texcoords if max texcoord limit is exceededMarek Olšák6-5/+71
+35 piglits
2013-02-06r300/compiler: copy-propagate saturate mode when possibleMarek Olšák1-2/+19
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-02-06r300/compiler: add support for saturate output modifier in r500 vertex shadersMarek Olšák2-10/+19
The GLSL compiler can simplify clamp(v,0,1) to saturate. The state tracker doesn't use it yet, but it will. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-02-06r300g: fix blending with RGBX formatsMarek Olšák3-122/+202
Change DST_ALPHA to ONE.
2013-02-06r300g: fix blending with blend color and RGBA formatsMarek Olšák1-0/+11
NOTE: This is a candidate for the stable branches.
2013-02-04gallium/drivers: handle PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED queryBrian Paul1-0/+2
Initially, only softpipe/llvmpipe support SQRT.
2013-02-04gallium: handle unhandled PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENTAndreas Boll1-0/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60098 Signed-off-by: Brian Paul <brianp@vmware.com>
2013-02-01r300g: always put MSAA resources in VRAMMarek Olšák1-3/+3
This along with the latest drm-fixes branch should help with bad performance of MSAA. Remember: Nx MSAA can't be more than N times slower (where N=2,4,6). Anyway, I recommend at least 512 MB of VRAM for Full HD 6x MSAA. NOTE: This is a candidate for the 9.1 branch.
2013-01-28radeon/winsys: add dma ring support to winsys v3Jerome Glisse1-1/+1
Add ring support, you can create a cs for each ring. DMA ring is bit special regarding relocation as you must emit as much relocation as there is use of the buffer. v2: - Improved comment on relocation changes - Use a single thread to queue cs submittion this simplify driver code while not impacting performances. Rational for this is that you have to wait for all previous submission to have completed so there was never a case while we could have 2 different thread submitting a command stream at the same time. This code just consolidate submission into one single thread per winsys. v3: - Do not use semaphore for empty queue signaling, instead use cond var. This is because it's tricky to maintain an even number of call to semaphore wait and semaphore signal (the number of cs in the stack would for instance make that number vary). Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2013-01-21r300g: add a workaround for the AA colorbuffer addressing bug on R500Marek Olšák2-7/+42
2013-01-21r300g: allow resolutions up to 1280x1024 with AA optimizations on 1-pipe cardsMarek Olšák2-3/+6
because single-pipe cards have bigger CMASK RAM
2013-01-21r300g: enable AA optimizations for the RGBA16F formatMarek Olšák3-1/+11
2013-01-15r300g: fix and cleanup flushing before clearing CMASK, ZMASK, and HIZMarek Olšák4-18/+17
2013-01-15r300g: implement MSAA compression and fast MSAA color clearMarek Olšák13-6/+211
These are optimizations which make MSAA a lot faster. The MSAA work is complete with this commit. (except for enablement of AA optimizations for RGBA16F, for which a patch is ready and waiting until the kernel CS checker fix lands) MSAA can't be made any faster as far as hw programming is concerned. The catch is only one process and one colorbuffer can use the optimizations at a time. There usually is only one MSAA colorbuffer, so it shouldn't be an issue. Also, there is a limit on the size of MSAA colorbuffer resolution in terms of megapixels. If the limit is surpassed, the AA optimizations are disabled. The limit is: - 1 Mpix on low-end and some mid-level chipsets (1024x768 and 1280x720) - 2 Mpix on some mid-level chipsets (1600x1200 and 1920x1080) - 3 or 4 Mpix on high-end chipsets (2048x1536 or 2560x1600, respectively) It corresponds to the number of raster pipes (= GB pipes) available, each pipe can hold 1 Mpix of AA compression data. If it's enabled, the driver prints to stdout: radeon: Acquired access to AA optimizations.
2013-01-15gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATEMarek Olšák1-1/+0
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-14r300g: set a dummy vertex buffer in context_createMarek Olšák1-0/+1
so that the driver doesn't crash if an app doesn't set any vertex buffers.
2013-01-14r300g: fix MSAA resolve to an untiled textureMarek Olšák3-3/+10
RB3D_DEBUG_CTL doesn't help, so I resolve to a tiled temporary texture and then blitting it to the destination one, which we also do in other situations.
2013-01-14r300g: advertise MSAA support for the RGB10_A2 format on r500Marek Olšák2-12/+47
It seems to be working just fine.
2013-01-14r300g: allow separate depth and stencil clearMarek Olšák1-1/+1
The handling of the CAP is broken in st/mesa anyway. Let's just kill it. This commit pretty much enables fast Z clear for FBOs with Z24S8. The driver falls back to clearing with a quad if the fast clear cannot be used. It can still do fast color clear, for example.
2013-01-14r300g: if both Z and stencil are present, they must be fast-cleared togetherMarek Olšák1-6/+11
2013-01-14r300g: allow HiZ with a 16-bit zbufferMarek Olšák1-1/+0
2013-01-14r300g: random hyperz cleanupsMarek Olšák2-3/+2
2013-01-13Remove hacks for static MakefilesMatt Turner1-5/+0
v2: Andreas Boll <andreas.boll.dev@gmail.com> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <andreas.boll.dev@gmail.com> - remove more obsolete hacks v4: Andreas Boll <andreas.boll.dev@gmail.com> - add a previously removed TOP variable to fix vgapi build
2013-01-10Clean up .gitignore filesMatt Turner1-1/+0
2013-01-10r300g: Link ralloc.c and register_allocate.c into separate libraryMatt Turner1-4/+13