summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nve4_compute.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2013-07-25 10:35:35 +0200
committerChristoph Bumiller <[email protected]>2013-08-06 22:22:49 +0200
commit9dcd7888e6338f08a6999abfbc2ca1008f741bf8 (patch)
treec441cee524f6784fb2d2b7467cd5131f008a604d /src/gallium/drivers/nvc0/nve4_compute.c
parent981b5891016580a72c2d6a457c6e8ef2dd5a9c95 (diff)
nvc0: implement compute support for nvc0
Tested on nvc0, nvc1, nvcf and nvd9.
Diffstat (limited to 'src/gallium/drivers/nvc0/nve4_compute.c')
-rw-r--r--src/gallium/drivers/nvc0/nve4_compute.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/src/gallium/drivers/nvc0/nve4_compute.c b/src/gallium/drivers/nvc0/nve4_compute.c
index abadd601a68..8b39f7342b4 100644
--- a/src/gallium/drivers/nvc0/nve4_compute.c
+++ b/src/gallium/drivers/nvc0/nve4_compute.c
@@ -23,6 +23,7 @@
*/
#include "nvc0_context.h"
+#include "nvc0_compute.h"
#include "nve4_compute.h"
#include "nv50/codegen/nv50_ir_driver.h"
@@ -298,38 +299,9 @@ nve4_compute_set_tex_handles(struct nvc0_context *nvc0)
static boolean
-nve4_compute_validate_program(struct nvc0_context *nvc0)
-{
- struct nvc0_program *prog = nvc0->compprog;
-
- if (prog->mem)
- return TRUE;
-
- if (!prog->translated) {
- prog->translated = nvc0_program_translate(
- prog, nvc0->screen->base.device->chipset);
- if (!prog->translated)
- return FALSE;
- }
- if (unlikely(!prog->code_size))
- return FALSE;
-
- if (likely(prog->code_size)) {
- if (nvc0_program_upload_code(nvc0, prog)) {
- struct nouveau_pushbuf *push = nvc0->base.pushbuf;
- BEGIN_NVC0(push, NVE4_COMPUTE(FLUSH), 1);
- PUSH_DATA (push, NVE4_COMPUTE_FLUSH_CODE);
- return TRUE;
- }
- }
- return FALSE;
-}
-
-
-static boolean
nve4_compute_state_validate(struct nvc0_context *nvc0)
{
- if (!nve4_compute_validate_program(nvc0))
+ if (!nvc0_compute_validate_program(nvc0))
return FALSE;
if (nvc0->dirty_cp & NVC0_NEW_CP_TEXTURES)
nve4_compute_validate_textures(nvc0);