History log of /external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4e922c81f616bba71565de8d7fd8f5f6955ce1cc 28-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Process pending commands on Reset

Some nine_state_* and nine_context_* functions
used for Reset() require all pending commands are
flushed.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
d43bc05e8ba0f326273c21b10f714e4d2514adae 28-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Remove duplicated checks

There is no need to check on csmt_active before
calling nine_csmt_process, because the function
checks already.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
8960be0e939bc6c0f9f34c5d4a16891af7e325fd 04-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Allow non-zero resource offset for vertex buffers

Next patches will introduce an offset.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
525a1b292a3d65857db06832e175fba840b75ff8 04-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Add arguments to context's blit and copy_region

The new arguments enable to reference the objects while
the function hasn't run.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
325324c749c2331162e7889efc335bfcfcd27005 04-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Idem for nine_context_gen_mipmap

Will enable to use the bind count as an information for
whether the surface/volume is used in the worker thread.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
7089d88199d607d8a135a9605f14ec6393134205 04-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Bind destination for surface/volume uploads

Will enable to use the bind count as an information for
whether the surface/volume is used in the worker thread.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
c873a2bd0c5a9fcb6e83f23e4494b5f53d71288b 03-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Implement nine_context_box_upload

This function will be used for surface and volume uploads

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
8d3e0f2187d146e7b34abe1f852320ea5e14732e 03-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Implement nine_context_gen_mipmap

To offload mipmap generation as well.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
a78b5f437865fc976154d226eb87b67ef2f098d2 01-Dec-2016 Axel Davy <axel.davy@ens.fr> st/nine: Implement nine_context_range_upload

Will be used to upload buffers.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
9c4b4e8809f1e6e076c01ba7b11dc1636c2a26b4 13-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Avoid flushing the queue for queries GetData

Use the newly introduced counter to know when we don't
need synchronization.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
884166a251ec45f2bfac0139f18b162d31db241e 13-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Use nine_context_clear_render_target

Enables to not wait for the worker thread for ColorFill.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
31262bbce085c69ef7a654528f509cb37415b41f 12-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: use get_pipe_acquire/release when possible

Use the acquire/release semantic when we don't need
to wait for any pending command.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
7a7eeefd7dd858682244e43eb5cb0d2c84fb0b07 12-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Add nine_context_get_pipe_acquire/release

See commit for description.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
fef23f6712064416f02211f1517e387169735e0b 02-Nov-2016 Patrick Rudolph <siro@das-labor.org> st/nine: Use nine_context for resource_copy_region

Use nine_context wrapper for resource_copy_region.
Enables to offload it with CSMT.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
c8913a06b454bd0aca813d2ea362e7d06840216f 27-Oct-2016 Patrick Rudolph <siro@das-labor.org> st/nine: Use nine_context for blit

Enables to offload it with CSMT.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
ac2927335bc7cd4994d2fc0906eb328773b1f923 26-Oct-2016 Patrick Rudolph <siro@das-labor.org> st/nine: Implement gallium nine CSMT

Use an offloading thread for all nine_context functions.
Macros are used to ease the reading of the code.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
1277ceefd1e8c0c495b75de55cfe661a478d1aae 25-Oct-2016 Patrick Rudolph <siro@das-labor.org> st/nine: Add struct nine_clipplane

Required to know the size exact size of the plane.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
bb666b0297cb81fc1b8192ba91efd2e0a69835c5 01-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back swvp in nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
97e4b65e7f7b675ca0d25b6dfe8cf299af2b7a3f 01-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Reimplement nine_context_apply_stateblock

The new version uses nine_context functions instead of
applying the changes directly to nine_context.
This will enable it to work with CSMT.

v2: Fix nine_context_light_enable_stateblock
The memcpy arguments were wrong, and the state
wasn't set dirty.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
8d967abb98d766e44478e4cc78dc844c29d4d360 01-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Decompose nine_context_set_texture

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
69f447752debda137498c9891ffcbc15a3db301a 01-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Decompose nine_context_set_indices

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
08b717dfd33cb733ef3558ef3edf2e051396c462 26-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Decompose nine_context_set_stream_source

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
7ebdbb573b6d784068d92993d1f5f81986cfe279 31-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Do not use NineBaseTexture9 in nine_context

Some fields are subject to modification outside of nine_context
(SetLod, etc).

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
152d0077690199b6cb4913d1596ed1d2048e32ca 30-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move Managed Pool handling out of nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
eb884a4ac2579a8c15a0548e0a72cf9cc07530e0 28-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Integrate nine_pipe_context_clear to nine_context_clear

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
b95205b1f28ba23d88bc24bbb663b1e4938bbb48 28-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move pipe and cso to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
66ad5b1592bb050269216bc64aa7916056cca466 28-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Rename pipe to pipe_data in nine_context

This patch it to avoid name conflict when device->pipe
will be moved to nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
fc49f7df8920df77dfbb0163a11486494f0c7883 28-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Rename cso in nine_context to cso_shader

This patch it to avoid name conflict when device->cso
is moved to nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
6a7541a5aa5ce496cbef4d1b15dc3caeb512606c 27-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move query9 pipe calls to nine_context

This will enable to use threading for them.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
b748b8fd8619ab412517f859dbf9a42b62ef6309 20-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Track dirty state groups in nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
a0a18920c7cdba1ffc6d642aff039476755c1cae 20-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back User Clip Planes to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
c6ca7c747e47127bb0ced0c7ca38beaa760376a4 20-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back ps to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
d671190df907b7643ba00143b2fbf0a1f5bee6c4 20-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back ds to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
1a735a99d0ab4d618802e4044f068f926aaf4513 19-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back all ff states in nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
bb62ea925a9aaebb053f0df14a9b7c995fdb6537 19-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Refactor LightEnable

Call a helper function.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
cbe370020e4e2b6293230bf0908f3f199c2468eb 19-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Refactor SetLight

Call a helper function to set the light.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
c5af96aebd2be165e29124c1e5d5bb3b7021bb30 19-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Put ff data in a separate structure

And make nine_state_access_transform take this
new structure as input.
Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
4a6d83ebc29546e8a70b4187bf1b66f6d745ef2e 19-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back viewport to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
9498613607aa9bf42a36db0462f5e38b1d1f4c60 19-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back scissor to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
7f6e01052b77ee825ec681ee5d9b65f5d182ca4f 19-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back RT to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
aafbd62955f279172b0b57c3fd2b82da54f8035f 19-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back current index buffer to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
b13b217243f1700e9c88bfc91a4d85cc2c17ab60 18-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back all shader constants to nine_context

For device vs shader float constants and may_swvp,
the same tips than for the other constant types is
used.

Also memset the constants properly.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
93ac6dfdcce5260ee06b8c32306cb2af8ee782e3 18-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back sampler states to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
2a698c3df2a940a693d39c77692b32d946ccec1d 17-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back vs to nine_context

And move programmable_vs storage and computation.
Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
43288cf376a280f1f7757e2c47f6ddcaad0c384f 17-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back vdecl to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
63633e2a08b227025f1e479fe26244e6bf37d7e7 16-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move stream freq data to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
848ffc81e4c91414ec29464ee71560547a12cd64 16-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move vtxbuf to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
aea7a019ef67a4a5cb83f97aceafac098275171c 16-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move stream_usage_mask to nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
eed47b748f26363c0de063f51b0c67959e7e5b06 16-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Back textures into nine_context

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
6bbb7b9fc5bc978ac3236064a1de50376177c735 16-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move texture setting to nine_context_*

And move samplers_shadow to nine_context.
Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
c1871e829aa220a7040ca6e423d404f072256db9 16-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Track changed.texture only for stateblocks

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
64e232bd60336591e55e6c95112bac334cb38970 16-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move draw calls to nine_state

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

v2: Release buffers for Draw*Up functions in device9.c,
instead of nine_context. This prevents a leak with csmt
where the wrong pointers were released.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
f72d8719ebecce0937087a56eec24a51bea9e27a 15-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Move core of device clear to nine_state

Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
1b24d5e1f5450e51d79c22679fed5d4b9731004c 15-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Introduce nine_context

nine_context is a new structure which goal will be
to contain all internal states. It will be the states
of the second thread in the to-be-introduced CSMT mode.

This patch moves several internal states to nine_context,
while the next patches add the other fields.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
85811d0e87b4e460a1cf4cc6654482c05628c383 20-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Ignore MULTISAMPLEMASK when RT is not multisampled

We were ignoring MULTISAMPLEMASK for non-maskable multisample
modes, but we were missing the non-multisampled case.

Fixes a crash in Halo.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
461e03167e20451ee2f531120f93894b23d802da 02-Nov-2016 Axel Davy <axel.davy@ens.fr> st/nine: Fix leak in user constant upload path

The new code properly releases the previous buffers
allocated.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
409ad787778461e774b5b0dfa4e6c77f355ca16f 16-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Don't update stream_usage_mask in sw path

The variable is used only in the hw path.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
494ace4b851fc3201bdb0297e53ccf8dfde78510 16-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Add validation to SetSamplerState

Check value validity and mimick Win behaviour.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
25beccb379731b0e6fc728982190779da47aa6fd 18-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Fix leak with integer and boolean constants

Leak introduced by:
a83dce01284f220b1bf932774730e13fca6cdd20

The patch also moves the part to
release changed.vs_const_i and changed.vs_const_b
before the if (!cb.buffer_size) check,
to avoid reuploading every draw call if
integer or boolean constants are dirty, but the shaders
use no constants.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
CC: "13.0" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
09edc0555f91d76001b1ffc0e656b0614abb809a 24-Sep-2016 Patrick Rudolph <siro@das-labor.org> st/nine: Set CLAMP_TO_EDGE on cubetextures

Wine tests show that cubetextures always use
PIPE_TEX_WRAP_CLAMP_TO_EDGE regardless of set
sampler states.

Fixes failing d3d9 wine test test_cube_wrap.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
60624be2033f06b414cf76794c2f3b061dc28332 22-Sep-2016 Patrick Rudolph <siro@das-labor.org> st/nine: Implement MSAA quality levels

Advertise quality levels:
Each supported multisample count matches to one quality level.
The application doesn't know how much samples each quality level has.
For that reason it's not possible to set the multisample mask.

Return errors on quality level missmatch.

Fixes several old games not having multisample support until now.

Fix for issue #73.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
8a50b1244fcb77334dc9d8e470061cd5f9537375 30-Sep-2016 Patrick Rudolph <siro@das-labor.org> st/nine: Prepare update_framebuffer for MS quality levels

Compare resource's nr_samples instead of D3D multisample level.
Required for multisample quality levels to work correct.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
b9639c661fb6b52c8abb96c06263f85ca4bd78c1 19-Sep-2016 Axel Davy <axel.davy@ens.fr> st/nine: Initial ProcessVertices support

For now only VS 3 support is implemented.

This enables The Sims 2 to work.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
3bf02d383fe94a69dfec3ff54ede3e3b2e9dff6b 17-Sep-2016 Axel Davy <axel.davy@ens.fr> st/nine: Partial software vertex processing support

Software Vertex Processing allows:
. Less limitations for shaders (more loops, etc)
. Less limitations for ff (more enabled lights, 255
matrices for VertexBlend)

In particular shaders can get more constants.
This patch implements support for this (not using software
rendering, but hardware rendering, as llvmpipe and dx10+ hw
have the same limits...)

This is considered a second class path. Even apps asking for
"Mixed Vertex processing" (ie the ability to switch to swvp
on demand) do not use the feature much. Some just initialize
more constants than the normal limit at the start of the
application, but never use more than the normal limit.
When the apps do not need the software vertex processing
features, they do not seem to turn it on. This means it is
ok if that path is slow.
Thus no care has been made to make the path optimized.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
f8c8f4424405c4789a044470e64df810720358c8 04-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Rework vs int and bool constants buffer

This will help to support swvp constants.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
a83dce01284f220b1bf932774730e13fca6cdd20 04-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Change dirty tracking for vs int and bool constants

This change makes easier to introduce tracking for
swvp constants.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
f78089b962537364d52ba05aa14dacbe20de995c 04-Oct-2016 Axel Davy <axel.davy@ens.fr> st/nine: Drop unused constant upload path

This path has been disabled for some time because
of some bugs with it. It hasn't been updated to the
new features, and is not faster.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
1ffe77e7bb2486ea74cda077ed2a9622b758395c 16-Jul-2016 Marek Olšák <marek.olsak@amd.com> gallium: split transfer_inline_write into buffer and texture callbacks

to reduce the call indirections with u_resource_vtbl.

The worst call tree you could get was:
- u_transfer_inline_write_vtbl
- u_default_transfer_inline_write
- u_transfer_map_vtbl
- driver_transfer_map
- u_transfer_unmap_vtbl
- driver_transfer_unmap

That's 6 indirect calls. Some drivers only had 5. The goal is to have
1 indirect call for drivers that care. The resource type can be determined
statically at most call sites.

The new interface is:
pipe_context::buffer_subdata(ctx, resource, usage, offset, size, data)
pipe_context::texture_subdata(ctx, resource, level, usage, box, data,
stride, layer_stride)

v2: fix whitespace, correct ilo's behavior

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
b76fa5673924ce09e28f3000808e3bd50ffe4570 14-Jun-2016 Axel Davy <axel.davy@ens.fr> st/nine: Use offset_units_unscaled

offset_units_unscaled enables proper support
for depth bias for gallium nine. Use it
if available.

Solves issues with some games using depth bias.
For example:
https://github.com/iXit/Mesa-3D/issues/220

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
9cae3cdc890b2aa261d635667a5850929a0913f5 03-Apr-2016 Axel Davy <axel.davy@ens.fr> st/nine: Fix usage of rasterizer multisample bit.

pipe_rasterizer multisample bit should be enabled only when really
wanting to do multisampling, thus we should disable when not having
msaa render target.
This fixes some depth calculation precision issues on radeon.
Also disable it when depth and stencil tests are disabled, since in that
case multisampling is same as not multisampled.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
89344a80fc4479fa3ac466cb17706cf12070afe1 06-Mar-2016 Axel Davy <axel.davy@ens.fr> st/nine: Fix Pointsize in programmable shader

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
47b390fe45e5e6f982c60b58985892438959cd8e 17-May-2016 Jan Vesely <jano.vesely@gmail.com> Treewide: Remove Elements() macro

Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
cc0114f30b587a10766ec212afb3ad356099ef23 06-Feb-2016 Axel Davy <axel.davy@ens.fr> st/nine: Implement Managed vertex/index buffers

We were implementing those the same way than
the default pool, which is sub-optimal.

The buffer is supposed to return pointer to
a ram copy when user locks, and automatically
update the vram copy when needed.

v2: Rename NineBuffer9_Validate to NineBuffer9_Upload
Rename validate_buffers to update_managed_buffers
Initialize NineBuffer9 managed fields after the resource
is allocated. In case of allocation failure, when the dtor
is executed, This->base.pool is then rightfully set.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
ee31f0fed4bd97e3c9a0c4547ad908d55607f532 04-Jan-2016 Axel Davy <axel.davy@ens.fr> st/nine: Use fast clears more often for MRTs

This enables to use fast clears in the following
case:

pixel shader renders to 1 RT
4 RT bound
clear
new pixel shader bound that renders to 4 RTs

Previously the fast clear path wouldn't be hit,
because when trying the fast clear path,
the framebuffer state would be configured for 1 RT,
instead of 4.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
56b4222b299ff08da4eda63fcc608dc77fc585f1 16-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Add Render state validation layer

Testing Win behaviour seems to show wrong states
are accepted, but then depending on the states
some specific 'good' behaviours happen.

This adds some validation to catch invalid
states and have these 'good' behaviours
when it happens.

Also reorders SetRenderState to match the expected
optimisation:
(Value == previous Value) => return immediately,
which affects D3D9 hacks too.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
a3e7525ada97fe81fe91fc19b983d2623d7572df 19-Dec-2015 Patrick Rudolph <siro@das-labor.org> st/nine: Use cso for viewport

Use CSO to catch redundant viewport changes.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
04e22a04a61e0388ccc5d8c65f79bc3cfa5ac3bc 12-Dec-2015 Axel Davy <axel.davy@ens.fr> st/nine: Introduce STREAMFREQ state

Previous vertex elements code update
was protected by
'if ((group & (NINE_STATE_VDECL | NINE_STATE_VS)) ||
state->changed.stream_freq & ~1)'
itself protected by
'if (group & (NINE_STATE_COMMON | NINE_STATE_VS))'

If no state is changed except the stream frequency,
no update would happen.

This patch solves the problem by adding a new
NINE_STATE_STREAMFREQ state.
Another way would be to add state->changed.stream_freq & ~1
check to the main test.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
b6bb8d561adece9e10603f560c23c1b1fdd5e0dd 15-Nov-2015 Axel Davy <axel.davy@ens.fr> st/nine: Unset vtxbuf on reset

We forgot to reset vtxbuf.
This fixes some crashes.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
b5876e47623a20c9a123d33927f97bada7c95f3c 07-Nov-2015 Axel Davy <axel.davy@ens.fr> st/nine: Use ff vertex shader when position_t is used

When an application sets a vertex shader, we are supposed
to use it, and when no vertex shader are set, we are supposed
to revert to fixed function vertex shader.

It seems there is an exception: when the vertex declaration
has a position_t index, we should revert to fixed function
vertex shader.

Up to know we were checking if device->state.vs is set
to know whether to use programmable shader or not.

With this commit we determine whether we use programmable shader
or not when vertex shader/declaration are set, but
stateblocks do complicate things a bit.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
e0f932846c91e6eca6495c86b72e87af64dfefb5 19-Dec-2015 Marek Olšák <marek.olsak@amd.com> u_upload_mgr: pass alignment to u_upload_data manually

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
2f02d5e814904d7a5c041d6869751731712e8195 16-Aug-2015 Axel Davy <axel.davy@ens.fr> st/nine: Silent warning in update_vertex_buffer

There was an unused variable
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
f15ff98e2c53f6ce62443b24e3a9cf79c60ddff7 14-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Use CSO cache for sampler views

The CSO cache unbinds views that are not needed anymore,
which we don't do.
It checks for change before committing the views.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
98f786b270b3e55a1e8a7bdc8182e436702748a2 14-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Calculate dummy sampler state only once

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
bae2c7c15444b02a4820e3182c345545bd348561 13-Aug-2015 Axel Davy <axel.davy@ens.fr> st/nine: Remove NINED3DRS_ZBIASSCALE

It wasn't giving the expected result.

This fixes some object being transparents
in games like FEAR.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
fb6c76f1bac039cddc66cb823e85437981ce8bef 16-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Change nine_state_update order

nine_update_state called every draw call.

This patch attemps to change the order
of the checks to have better control flow

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
4a00e4cdc970582df338ebf880168a4ef4ec05d9 14-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Programmable ps D3DTTSS_PROJECTED support

The implementation used Wine tests for conformance

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
fcca7ff38a6ba923abd910f50a8e2bcf6560e6ae 16-Aug-2015 Axel Davy <axel.davy@ens.fr> st/nine: Revert to userbuf path when needed

Automatically switch to userbuf path when
we would need to upload fog or bumpmat
constants

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
8f39ffc11e8b6fdf7c940f9c1853a362a886977a 12-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Finish Fog implementation

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
69de5d626f2e67e74e4de94ce13f7ac50fa52161 11-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Rework shader states

Separate state setting and commit
Changes how the shader key is computed

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
87ec6b56b28c25d4184422c40f576c24ebe7cd75 24-Mar-2015 Axel Davy <axel.davy@ens.fr> st/nine: Rework ff constant buffers

Always use a user constant buffer for ff.
It means we have to:
. commit the user constant buffer for ff when we use it
. commit back the non-ff constant buffer when we stop using it

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
993e68fa6a431a7c7c451c738e07d02a84ea40e4 24-Mar-2015 Axel Davy <axel.davy@ens.fr> st/nine: Rework constant buffer state handling

We have two paths:
. One that uses a fixed constant buffer, and updates it when needed
. One that uses a user constant buffer, and uploads it when needed.

This patch separates the preparation of the constant buffer
and the commit.

It also removes NineDevice9_RestoreNonCSOState, which was
used to restore all states. Instead the commit of the constant
buffer is moved to nine_state, and the other field settings
moved to other functions where more appropriate.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
a3f0d21da9a33e58a4be41f65f77eebe1dd85841 24-Mar-2015 Axel Davy <axel.davy@ens.fr> st/nine: Rework blend states

Separate state preparation and state commit

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
b06f3ee6f4ebf6ad403e7ee917c54bef85899c19 03-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Improve fallback when driver doesn't support user buffers.

For now the path updated is only used by Amd drivers, but a later
patch will make it used by all drivers. Some drivers like llvmpipe
doesn't support the uploading of constants from user buffers, so improve
the path to work for all drivers

Inspired from the gl state tracker.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
5a2302b5ece2edf944b474eeb19ad7fc17906e7d 24-Mar-2015 Axel Davy <axel.davy@ens.fr> st/nine: Rework rasterizer states

Separate state preparation and state commit

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
71616d0c501077a04deb4f2a3cc115b50634763d 15-May-2015 Axel Davy <axel.davy@ens.fr> st/nine: Reorder DSA state settings

Separate state preparation and state commit

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
06285530566ea3387b6eb3f8e1a0443132c3659b 24-Mar-2015 Axel Davy <axel.davy@ens.fr> st/nine: Reorder nine_state.

Instead of mixing state preparation (filling pipe_****)
and state commit (pipe->set_*****),
begin doing so in two separate functions.

This will allow to implement efficient Stateblocks,
and eventually lead to optimisation where the complete
pipe_*** structure is only partially updated.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
99537f68db829bd4708eb8e1b1ef0948f3dd3c66 15-Feb-2015 Axel Davy <axel.davy@ens.fr> st/nine: Remove group_mask argument from nine_update_state

It was only used to discriminate update framebuffer vs update
everything. Instead use two functions.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
360ba5b74858b3854784e3d4678c242140088395 30-Jan-2015 Tiziano Bacocco <tizbac2@gmail.com> st/nine: Implement TEXBEM,TEXBEML and BEM

Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
34708783833bb99e9e42cd40a745fed1354317f2 15-Feb-2015 Axel Davy <axel.davy@ens.fr> st/nine: fix D3DRS_DITHERENABLE wrong state group

D3DRS_DITHERENABLE was assigned to the rasterizer state
group, but it was used for the blend group.

Assign it to the blend group.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
1b645df2f309833cca5dbeaa2deceeda36a7426c 19-Apr-2015 Patrick Rudolph <siro@das-labor.org> st/nine: Account POINTSIZE_MIN and POINTSIZE_MAX for point size

When using D3DRS_POINTSIZE make sure the value is at least
D3DRS_POINTSIZE_MIN but not greater than D3DRS_POINTSIZE_MAX.

Fixes some Wine tests.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
a2a1a5805fd617e7f3cc8be44dd79b50da07ebb9 21-Jul-2015 Ilia Mirkin <imirkin@alum.mit.edu> gallium: replace INLINE with inline

Generated by running:
git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g'
git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g'
git checkout src/gallium/state_trackers/clover/Doxyfile

and manual edits to
src/gallium/include/pipe/p_compiler.h
src/gallium/README.portability

to remove mentions of the inline define.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
e558ce98f2b01e11ff79c29efaea2877121ae04a 19-Feb-2015 Axel Davy <axel.davy@ens.fr> st/nine: Encapsulate variables for MANAGED resource

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
54f8e8a18da58c85a2f515d5fd0552fa4f5547bb 23-Mar-2015 Axel Davy <axel.davy@ens.fr> st/nine: Fix update_vertex_elements bad rebase

This code was supposed to be removed, but a rebase seems to have
made it stay.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
4acbf420d1101bd32e8f23acadff5fe6c6fa9b26 20-Feb-2015 Axel Davy <axel.davy@ens.fr> st/nine: Rework update_vertex_buffers

Previous code was trying to optimise to call set_vertex_buffers on
big packets, and thus avoids as many calls as possible.

However in practice doing so won't be faster (drivers implement
set_vertex_buffers by a loop over the buffers we want to bind)

When we want to unbind a buffer, we were calling set_vertex_buffers
on a buffer with vtxbuf->buffer = NULL. It works on some drivers,
but not on all of them, because it isn't in Gallium spec.
This patch fixes that.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
907f28f87e3858028bce4477f0b57f7e5d76060a 23-Apr-2015 Axel Davy <axel.davy@ens.fr> st/nine: Fix comment in update_viewport

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
6e825b69bd4fb163cba0a565616ed966fb1a8929 23-Apr-2015 Axel Davy <axel.davy@ens.fr> st/nine: Workaround barycentrics issue on some cards

Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
17abefa12be1d5e7d436bfbb082c3eba19adf26c 30-Jan-2015 Tiziano Bacocco <tizbac2@gmail.com> st/nine: Implement dummy vbo behaviour when vs is missing inputs

Use a dummy vertex buffer object when vs inputs have no corresponding
entries in the vertex declaration. This dummy buffer will give to the
shader float4(0,0,0,0).

This fixes several artifacts on some games.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
2c54d154e86cd93caed527824166f468a6c24c70 24-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Dummy sampler should have a=1

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
9ac74e604bbce3b24565a9c277dc8f8fe9826e97 23-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Fix update_framebuffer binding cbufs the pixel shader wouldn't render to

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
dfe5e84e74b184748c48cf07d58c79c2c5685a2d 18-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Implement fallback behaviour when rts and ds don't match

This seems to be the behaviour on Win. Previous behaviour led
to different issues depending on the driver.

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
0a4aaf1d411360c2a557fb016ffcb41f2701b9a2 14-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Implement AMD alpha to coverage

This D3D hack is supposed to be supported
by all AMD SM2+ cards. Apps use it without
checking if they are on AMD.

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
65ce2b2848eafe0d51375edca15fbb91956668e4 07-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Commit sampler views again if srgb state changed.

This fixes a wine test and some minor visual issues on some games.

The patch is not optimal, there is probably a more efficient way to
fix this issue, but the code there already has some innefficiencies.
There is plans to rewrite that part of the code to make it more
efficient.

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
77fcff37cfdcc762ef0e0c5da3e9ce7addc18440 05-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Change comment relating to vertex shader inputs not matching declaration

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
f8a74410f16b8a01da329975d10b631cb2a928e5 03-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Allocate vs constbuf buffer for indirect addressing once.

When the shader does indirect addressing on the constants,
we allocate a temporary constant buffer to which we copy
the constants from the app given user constants and
the constants filled in the shader.

This patch makes this buffer be allocated once.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
e0f75044c8d2793b6a5bd9832c57c5d199822486 02-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Allocate the correct size for the user constant buffer

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
a721987077ae22e0c373ea118113361aada2024e 07-Dec-2014 Axel Davy <axel.davy@ens.fr> st/nine: Fix sm3 relative addressing for non-debug build

Relative addressing needs the constant buffer to get all
the correct constants, even those defined by the shader.

The code to copy the shader constants to the constant buffer
was enabled only for debug build. Enable it always.

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
4b7a9cfddb1b8b47aeb2b466f66973d962555542 07-Dec-2014 Axel Davy <axel.davy@ens.fr> st/nine: Remove unused code for ps

Since constant indirect adressing is not allowed for ps,
we can remove our code to handle that.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
d9d18fe39f7b4f628af23b78576e961fd452921f 02-Jan-2015 Axel Davy <axel.davy@ens.fr> st/nine: Rework of boolean constants

Convert them to shader booleans at earlier stage.
Previous code is fine, but later patch will make
integers being converted at earlier stage, so do
the same for booleans

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
3bc75fcf2298315a81385e527a1e6f28d7d8c0bf 21-Dec-2014 Axel Davy <axel.davy@ens.fr> st/nine: Fix clip state logic

The clip state was reset everytime, incurring an overhead.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
712a4c5438d0ce257344b5196c20ad7929b54a0e 26-Nov-2014 Axel Davy <axel.davy@ens.fr> st/nine: Fix vertex declarations for non-standard (usage/index)

Nine code to match vertex declaration to vs inputs was limiting
the number of possible combinations.

Some sm3 games have issues with that, because arbitrary (usage/index)
can be used.

This patch does the following changes to fix the problem:
. Change the numbers given to (usage/index) combinations to uint16
. Do not put limits on the indices when it doesn't make sense
. change the conversion rule (usage/index) -> number to fit all combinations
. Instead of having a table usage_map mapping a (usage/index) number to
an input index, usage_map maps input indices to their (usage/index)

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Tested-by: Yaroslav Andrusyak <pontostroy@gmail.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
90fea6b3e0153c12d8d1a0f817c56a3efa0ce99c 25-Nov-2014 David Heidelberg <david@ixit.cz> st/nine: remove unused pipe_viewport_state::translate[3] and scale[3]

2efabd9f5a711a7f6cd1846630244b7814bf25b3 removed them as unused.

This caused random memory overwrites (reported by Coverity).

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: David Heidelberg <david@ixit.cz>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
614d9387c796f384a26c85e156768d71bb17baeb 25-Nov-2014 Axel Davy <axel.davy@ens.fr> st/nine: fix wrong variable reset

Error detected by Coverity (COPY_PASTE_ERROR)

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: David Heidelberg <david@ixit.cz>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c
fdd96578ef2dfe9c4ad5aab5858036298d444a64 04-Aug-2011 Joakim Sindholt <opensource@zhasha.com> nine: Add state tracker nine for Direct3D9 (v3)

Work of Joakim Sindholt (zhasha) and Christoph Bumiller (chrisbmr).
DRI3 port done by Axel Davy (mannerov).

v2: - nine_debug.c: klass extended from 32 chars to 96 (for sure) by glennk
- Nine improvements by Axel Davy (which also fixed some wine tests)
- by Emil Velikov:
- convert to static/shared drivers
- Sort and cleanup the includes
- Use AM_CPPFLAGS for the defines
- Add the linker garbage collector
- Restrict the exported symbols (think llvm)

v3: - small nine fixes
- build system improvements by Emil Velikov

v4: [Emil Velikov]
- Do no link against libudev. No longer needed.

Acked-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: David Heidelberg <david@ixit.cz>
/external/mesa3d/src/gallium/state_trackers/nine/nine_state.c