Age | Commit message (Collapse) | Author |
|
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
|
|
The idea behind this is that anything touching registers should be in
r600_state.c or evergreen_state.c. This is also consistent with
evergreen_pipe_shader_vs().
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
|
|
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
|
|
Avoid setting the same gpu register several times in a r600_pipe_state.
Compute the final value of the register and set that one time. This avoids
some overhead in r600_context_pipe_state_set().
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
|
|
|
|
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
|
|
This reverts commit b6d40213935da702570eca2c0861bd4b1d7f5254.
This actually breaks gears here on my rv670.
|
|
TRUNC is neither a scalar instruction nor exclusive to the Trans unit.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This adds EXT_texture_array support to r600g, it passes the piglit
array-texture test but I suspect may not be complete.
It currently requires a kernel patch to fix the CS checker to allow
these, so you need to use R600_ARRAY_TEXTURE=true for now
to enable them.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Relative addressing of constant buffers can't work properly through the
kcache, since you can only address within the currently locked kcache window.
Instead, this patch binds the constant buffer as a shader resource, and then
explicitly fetches the constant using a vertex fetch with fetch type
VTX_FETCH_NO_INDEX_OFFSET from the shader. There's probably still some room
for improvement, doing the fetch right before the instruction that needs the
value may not be quite optimal for example.
|
|
|
|
r600_shader_from_tgsi().
|
|
The r600_bc_alu_src structure is used in two different ways, as a vector and
for the individual channels of that same vector. This is somewhat fragile,
and probably confusing.
|
|
This is much easier to work with, and allows use to get rid of some of the
literal handling hacks.
|
|
|
|
|
|
|
|
Join multiple exports into just one instruction
instead of exporting each register separately.
|
|
This only works on r600/r700 so far, evergreen doesn't appear
to have the multiwrite enable bit in the color control, so we
may have to actually do a shader rewrite on EG hardware.
remove some duplicate code reg defines also.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This fixes Bug 33262
|
|
|
|
|
|
If a literal slot isn't used it should be set
to 0 instead of an uninitialized value. Also the
channels for pre R700 trig functions were incorrect.
And most important literals were not counted against ndw,
resulting in an invalid force_add_cf detection.
|
|
|
|
|
|
|
|
|
|
If last instruction is an CF_INST_ALU we don't need to emit an
additional CF_INST_POP for stack clean up after an IF ELSE ENDIF.
|
|
|
|
|
|
|
|
tgsi_helper_copy is used on several occasions to copy a temporary result
into the real destination register to emulate writemasks for OP3 and
reduction operations. According to R600 ISA that's unnecessary.
This patch fixes this use for MAD, CMP and DP4.
|
|
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
|
|
|
|
|
|
should fix https://bugs.freedesktop.org/show_bug.cgi?id=32619
Need to add proper support for properties later.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
We have to use the non-IEEE compliant version of MUL here, since
log2(0) is -inf, and 0 * -inf is NaN in IEEE arithmetic.
candidates for 7.10 branch
|
|
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
Avoid rebuilding constant shader state at each draw call,
factor out spi update that might change at each draw call.
Best would be to update spi only when revealent states
change (likely only flat shading & sprite point).
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
Vertex elements change are less frequent than draw call, those to
avoid rebuilding fetch shader to often build the fetch shader along
vertex elements. This also allow to move vertex buffer setup out
of draw path and make update to it less frequent.
Shader update can still be improved to only update SPI regs (based
on some rasterizer state like flat shading or point sprite ...).
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
|
|
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
|
|
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
|
|
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
|
|
Now that we have fetch shaders, the full range of VS resources
can be used for sampling.
|
|
Makes the code much clearer.
|